[llvm] [feature][riscv] handle target address calculation in llvm-objdump disassembly for riscv (PR #144620)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 23 00:26:32 PDT 2025
================
@@ -0,0 +1,31 @@
+# RUN: %clang --target=fuchsia-elf-riscv32 -march=rv32g_zclsd_zilsd %s -nostdlib -o %t
+# RUN: llvm-objdump -d %t | FileCheck %s
+
+# CHECK: 00001000 <_start>:
+# CHECK-NEXT: 1000: 00000517 auipc a0, 0x0
+# CHECK-NEXT: 1004: 0559 addi a0, a0, 0x16 <target>
+# CHECK-NEXT: 1006: 00000517 auipc a0, 0x0
+# CHECK-NEXT: 100a: 6910 ld a2, 0x10(a0) <target>
+# CHECK-NEXT: 100c: 00000517 auipc a0, 0x0
+# CHECK-NEXT: 1010: 00c53523 sd a2, 0xa(a0) <target>
+# CHECK-NEXT: 1014: 0000 unimp
+
+# the structure of this test file is similar to that of riscv64-ar-coverage
+# with the major difference being that these tests are focused on instructions
+# for 32 bit architecture
----------------
jh7370 wrote:
Nit: here and in various other places, comments in test should follow the standard LLVM coding style for comments, i.e. leading capital letter and trailing full stop.
https://github.com/llvm/llvm-project/pull/144620
More information about the llvm-commits
mailing list