Details
- Reviewers
aykevl dylanmckay - Commits
- rGcef2739d682e: [MC][AVR] Implement decoding STD/LDD
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AVR/Disassembler/AVRDisassembler.cpp | ||
---|---|---|
279 | LDD/STD should be fully decoded by decodeMemri, but due to very complex reason, decodeMemri only correctly decodes LDD/STD with offset > 7, and the case offset <= 7 falls into decodeLoadStore (decoder method of LD/ST). We should re-think the organization of definition of LD/ST/LDD/STD in TD files to avoid that. But currently I can not figure out a proper way, it invloves register allocation. |
This patch fixes the crash reported in https://github.com/llvm/llvm-project/issues/54776.
But properly decoding LD/ST with postinc/predec will be fixed in a new patch.
Looks good to me.
llvm/test/MC/AVR/inst-ldd.s | ||
---|---|---|
12 | This instruction is not tested with an INST: line, is that intentional? Same for std in the next file. |
llvm/test/MC/AVR/inst-ldd.s | ||
---|---|---|
12 | That is intentional, since foo is an unresolved symbol. |
LDD/STD should be fully decoded by decodeMemri, but due to very complex reason, decodeMemri only correctly decodes LDD/STD with offset > 7, and the case offset <= 7 falls into decodeLoadStore (decoder method of LD/ST).
We should re-think the organization of definition of LD/ST/LDD/STD in TD files to avoid that. But currently I can not figure out a proper way, it invloves register allocation.