[llvm] [JITlink][AArch32] Implement ELF::R_ARM_MOVT_ABS and R_ARM_MOVW_ABS_NC (PR #66219)
Stefan Gränitz via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 13 09:18:57 PDT 2023
================
@@ -50,6 +50,36 @@ jump24_target:
bx lr
.size jump24_target, .-jump24_target
+
+# CHECK-TYPE: {{[0-9a-f]+}} R_ARM_MOVW_ABS_NC data_symbol
+# CHECK-INSTR: 00000010 <movw>:
+# CHECK-INSTR: 10: e3000000 movw r0, #0x0
+# jitlink-check: decode_operand(movw, 1) = (data_symbol&0x0000ffff)
+ .globl movw
+ .type movw,%function
+ .p2align 2
+movw:
+ movw r0, :lower16:data_symbol
+ .size movw, .-movw
+
+# CHECK-TYPE: {{[0-9a-f]+}} R_ARM_MOVT_ABS data_symbol
+# CHECK-INSTR: 00000014 <movt>:
+# CHECK-INSTR: 14: e3400000 movt r0, #0x0
+# jitlink-check: decode_operand(movt, 2) = (data_symbol&0xffff0000>>16)
----------------
weliveindetail wrote:
I assume we have to check the operand at index 2 here, because the disassembler adds an implicit predicate operand? That was the case with the `BL` instruction:
https://github.com/llvm/llvm-project/blob/b6f66c94bce7d9c0ef029d133b85925ba23198b4/llvm/test/ExecutionEngine/JITLink/AArch32/ELF_static_thumb_reloc.s#L16-L26
Might be worth a comment.
https://github.com/llvm/llvm-project/pull/66219
More information about the llvm-commits
mailing list