[llvm] [AVR] Add AVR MOVW/ADIW/SUBIW disassembly (PR #146360)

Patryk Wychowaniec via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 1 06:16:33 PDT 2025


Patryk27 wrote:

> @Patryk27, what's your opinion on my solution ?

Oh, I haven't played with the disassembler before, so I didn't even realize LLVM is supposed to auto-disassemble instructions (so `AVRDisassembler.cpp` is supposed to contain only exceptions where LLVM for some reason fails to auto-disassemble, right?).

I think your suggestion is correct, i.e. the fundamental issue is that not all instructions are included in the base instruction set and LLVM will fail to "auto-disassemble" those which require to be opt-in.

*.elf files can already encode different AVR architectures (EF_AVR_ARCH), so what we should do is teach llvm-objdump to read that field.

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


More information about the llvm-commits mailing list