[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)
+	.globl	movt
+	.type	movt,%function
+	.p2align	2
+movt:
+	movt r0, :upper16:data_symbol
+	.size	movt,	.-movt
+
+    .data
+	.global data_symbol
+data_symbol:
+    .long 1073741822
+
+    .text
----------------
weliveindetail wrote:

Broken indentation. This is minor, but in assembly files let's stick with tab indents everywhere.

https://github.com/llvm/llvm-project/pull/66219


More information about the llvm-commits mailing list