[llvm] [RISCV][MC] Implement ISA mapping symbols (PR #67541)

Jessica Clarke via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 30 16:15:22 PDT 2023


================
@@ -0,0 +1,47 @@
+## Instruction mapping symbols with ISA string
+
+# RUN: llvm-mc -triple=riscv32 -filetype=obj -o %t.o %s
+# RUN: llvm-objdump -t %t.o | FileCheck %s -check-prefix=CHECK-MAPPINGSYMBOLS
+# RUN: llvm-mc -triple=riscv64 -filetype=obj -o %t.o %s
+# RUN: llvm-objdump -t %t.o | FileCheck %s -check-prefix=CHECK-MAPPINGSYMBOLS
+
+.text
+.attribute arch, "rv32i"
+nop
+# CHECK-MAPPINGSYMBOLS: $xrv32i2p1
+
+.attribute arch, "rv32i"
----------------
jrtc27 wrote:

.attribute arch is global, .option arch is local, no?

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


More information about the llvm-commits mailing list