[PATCH] D66539: [ELF][ARM] Simplify some llvm-objdump tests with both ARM/Thumb states
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 08:03:01 PDT 2019
MaskRay created this revision.
MaskRay added reviewers: efriedma, grimar, peter.smith, ruiu.
Herald added subscribers: llvm-commits, kristof.beyls, arichardson, javed.absar, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
llvm-objdump can switch between ARM/Thumb states after D60927 <https://reviews.llvm.org/D60927>.
In a few lld tests, we run both
- llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t
- llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t
to test ARM/Thumb parts of the same file. In many cases we can just
run one command. There is a problem that prevents us from cleaning
more tests (e.g. test/ELF/arm-thumb-interwork-thunk.s):
In llvm-objdump, while we have ARM/Thumb (primary and secondary)
MCDisassembler and MCSubtargetInfo, we have just one MCInstrAnalysis
which is used to resolve the targets of calls in both ARM/Thumb parts.
// ThumbMCInstrAnalysis evaluating ARM parts or ARMMCInstrAnalysis evaluating Thumb parts
// will have incorrect offsets.
// An example of llvm-objdump -d -triple=thumbv7a on ARM part:
1304: 3d ff ff fa blx #-780 # no <...>
1308: 06 00 00 ea b #24 <arm_caller+0x24> # wrong target due to wrong offset
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D66539
Files:
test/ELF/arm-bl-v6-inrange.s
test/ELF/arm-blx.s
test/ELF/arm-thumb-blx.s
test/ELF/arm-thumb-interwork-shared.s
test/ELF/arm-thumb-interwork-thunk-v5.s
test/ELF/arm-thumb-plt-reloc.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66539.216406.patch
Type: text/x-patch
Size: 21658 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190821/a111579b/attachment-0001.bin>
More information about the llvm-commits
mailing list