[llvm-branch-commits] [llvm] [llvm-objdump] Support --symbolize-operand on AArch64 (PR #145009)
Fangrui Song via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jun 24 09:35:20 PDT 2025
================
@@ -0,0 +1,67 @@
+# RUN: yaml2obj %s -o %t
+# RUN: llvm-objdump %t -d --symbolize-operands --no-show-raw-insn --no-leading-addr | \
+# RUN: FileCheck %s --match-full-lines -DABS_ADRP_VAL=0x6000
+# RUN: llvm-objdump %t -d --symbolize-operands --no-show-raw-insn --no-leading-addr --adjust-vma=0x2000 | \
+# RUN: FileCheck %s --match-full-lines -DABS_ADRP_VAL=0x8000
+
+## Expect to find the branch labels and global variable name.
+# CHECK: <_start>:
+# CHECK-NEXT: ldr x0, <symbol>
+# CHECK-NEXT: <L0>:
+# CHECK-NEXT: adrp x1, [[ABS_ADRP_VAL]] <symbol+0xff4>
+# CHECK-NEXT: adr x2, <symbol>
+# CHECK-NEXT: cmp x1, x2
+# CHECK-NEXT: b.eq <L1>
+# CHECK-NEXT: b <L0>
+# CHECK-NEXT: <L1>:
+# CHECK-NEXT: cbz x2, <L0>
+# CHECK-NEXT: ret
+
+## Machine code generated with:
----------------
MaskRay wrote:
Consider adopting llvm/utils/update_test_body.py to make this easier to re-create https://llvm.org/docs/TestingGuide.html#elaborated-tests
https://github.com/llvm/llvm-project/pull/145009
More information about the llvm-branch-commits
mailing list