[llvm] [llvm-objdump][AVR] Detect AVR architecture from ELF flags for disassembling (PR #174731)

Ruoyu Qiu via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 23 00:29:36 PST 2026


================
@@ -0,0 +1,44 @@
+## When --mattr and --mcpu are both empty, disassemble ELF with e_flags derived feature.
+# RUN: yaml2obj -DARCH_ARCHVERSION=ARCH_AVR1 %s -o %t.avr1
+# RUN: llvm-objdump -d %t.avr1 | FileCheck %s --check-prefixes=AVR1
+# RUN: yaml2obj -DARCH_ARCHVERSION=ARCH_AVR3 %s -o %t.avr3
+# RUN: llvm-objdump -d %t.avr3 | FileCheck %s --check-prefixes=ALL
+
+## If --mattr or --mcpu is specified, don't default to the file's e_flags derived feature.
----------------
cabbaken wrote:

Added in the latest commit.

https://github.com/llvm/llvm-project/pull/174731


More information about the llvm-commits mailing list