[AVR] Implement disassembly of 32-bit instructions
authorAyke van Laethem <aykevanlaethem@gmail.com>
Tue, 16 Jun 2020 19:39:09 +0000 (21:39 +0200)
committerAyke van Laethem <aykevanlaethem@gmail.com>
Thu, 18 Jun 2020 09:26:58 +0000 (11:26 +0200)
commit15bf42d503b9c388135308d37e1d153a05b33699
tree8cff0d7de15bd3fdc4f61424c6be233ef0a82845
parent1d7b4a7e5e4a25605ec9926da1fb461840a1f216
[AVR] Implement disassembly of 32-bit instructions

This needed two fixes:

  * 32-bit instructions were read in the wrong order. The machine code
    swaps the two 16-bit instruction words, which wasn't undone when
    decoding instructions.
  * Jump and call instructions don't encode the lowest address bit,
    which is always zero. Therefore, the address needed to be shifted by
    one to fix that.

Differential Revision: https://reviews.llvm.org/D81961
llvm/lib/Target/AVR/AVRInstrInfo.td
llvm/lib/Target/AVR/Disassembler/AVRDisassembler.cpp
llvm/test/MC/AVR/inst-call.s
llvm/test/MC/AVR/inst-jmp.s
llvm/test/MC/AVR/inst-lds.s
llvm/test/MC/AVR/inst-sts.s