[PATCH] D140815: [AVR] Fix incorrect decoding of RJMP and RCALL

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 22:40:28 PST 2023


benshi001 added a comment.

In D140815#4032938 <https://reviews.llvm.org/D140815#4032938>, @MaskRay wrote:

>> llvm-objdump only affects address offsets of rjmp/rcall that are after linking, so we have to test them in the lld tests.
>
> It's not appropriate to add a lld test to test an assembly issue (https://maskray.me/blog/2021-08-08-toolchain-testing#the-test-checks-at-the-wrong-layer). Such tests live in llvm/test/MC/
>
> If you want to disassembly an arbitrary instruction, you may use directives like `.word`: after disassembly, an instruction isn't differentiable with a `.word xxx`.
> If you want to craft an ET_EXEC or ET_DYN file, use yaml2obj. See llvm/test/tools/llvm-{objcopy,readobj} for some examples.
>
> You can use `llvm-readelf -x ...` to dump the content of a section.

Thanks. Using the `.short` seems the most clear way !


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140815/new/

https://reviews.llvm.org/D140815



More information about the llvm-commits mailing list