[llvm] [MC][Aarch32][Assembly] Emit relocs for LDRs (PR #72873)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 06:44:12 PST 2023


================
@@ -0,0 +1,39 @@
+@ RUN: llvm-mc -filetype=obj -triple=armv7 %s -o %t
+@ RUN: llvm-readelf -r %t | FileCheck %s --check-prefix=ARM
+@ RUN: llvm-objdump -d --triple=armv7 %t | FileCheck %s --check-prefix=ARM_ADDEND
+
+@ ARM: R_ARM_LDRS_PC_G0
+@ ARM: foo1
+@ ARM: R_ARM_LDRS_PC_G0
+@ ARM: foo2
+@ ARM: R_ARM_LDRS_PC_G0
+@ ARM: foo3
+
+// Value is decimal at the moment but hex in other cases (things could change)
----------------
DavidSpickett wrote:

I'm not sure what this comment is saying.

Currently they're emitted as decimal, but it would also be valid to emit these as hex. And the test is written to cope with either? Is that the correct interpretation?

Perhaps be more specific like `values are usually decimal but could be hex in future, these checks are valid for both formats`.

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


More information about the llvm-commits mailing list