mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
b390d5a473
Summary: Now that llvm-objdump allows target-specific options, we match the `no-aliases` and `numeric` options for RISC-V, as supported by GNU objdump. This is done by overriding the variables used for the command-line options, so that the command-line options are still supported. This patch updates all tests using `llvm-objdump -riscv-no-aliases` to use `llvm-objdump -M no-aliases`. Reviewers: luismarques, asb Reviewed By: luismarques, asb Subscribers: pzheng, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66139 llvm-svn: 371534
64 lines
1.7 KiB
ArmAsm
64 lines
1.7 KiB
ArmAsm
# RUN: llvm-mc %s -triple=riscv32 -mattr=+c -riscv-no-aliases -show-encoding \
|
|
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
|
|
# RUN: llvm-mc %s -triple riscv64 -mattr=+c -riscv-no-aliases -show-encoding \
|
|
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
|
|
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+c < %s \
|
|
# RUN: | llvm-objdump -M no-aliases -d -r - \
|
|
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
|
|
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+c < %s \
|
|
# RUN: | llvm-objdump -M no-aliases -d -r - \
|
|
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
|
|
|
|
# CHECK-ASM-AND-OBJ: c.nop 8
|
|
# CHECK-ASM: encoding: [0x21,0x00]
|
|
c.nop 8
|
|
|
|
# CHECK-ASM: c.addi zero, 7
|
|
# CHECK-ASM: encoding: [0x1d,0x00]
|
|
# CHECK-OBJ: c.nop 7
|
|
c.addi x0, 7
|
|
|
|
# CHECK-ASM-AND-OBJ: c.addi a0, 0
|
|
# CHECK-ASM: encoding: [0x01,0x05]
|
|
c.addi a0, 0
|
|
|
|
# CHECK-ASM-AND-OBJ: c.li zero, 0
|
|
# CHECK-ASM: encoding: [0x01,0x40]
|
|
c.li x0, 0
|
|
|
|
# CHECK-ASM-AND-OBJ: c.li zero, 1
|
|
# CHECK-ASM: encoding: [0x05,0x40]
|
|
c.li x0, 1
|
|
|
|
# CHECK-ASM-AND-OBJ: c.lui zero, 1
|
|
# CHECK-ASM: encoding: [0x05,0x60]
|
|
c.lui x0, 1
|
|
|
|
# CHECK-ASM-AND-OBJ: c.mv zero, a0
|
|
# CHECK-ASM: encoding: [0x2a,0x80]
|
|
c.mv x0, a0
|
|
|
|
# CHECK-ASM-AND-OBJ: c.add zero, a0
|
|
# CHECK-ASM: encoding: [0x2a,0x90]
|
|
c.add x0, a0
|
|
|
|
# CHECK-ASM-AND-OBJ: c.slli zero, 1
|
|
# CHECK-ASM: encoding: [0x06,0x00]
|
|
c.slli x0, 1
|
|
|
|
# CHECK-ASM-AND-OBJ: c.slli64 zero
|
|
# CHECK-ASM: encoding: [0x02,0x00]
|
|
c.slli64 x0
|
|
|
|
# CHECK-ASM-AND-OBJ: c.slli64 a0
|
|
# CHECK-ASM: encoding: [0x02,0x05]
|
|
c.slli64 a0
|
|
|
|
# CHECK-ASM-AND-OBJ: c.srli64 a1
|
|
# CHECK-ASM: encoding: [0x81,0x81]
|
|
c.srli64 a1
|
|
|
|
# CHECK-ASM-AND-OBJ: c.srai64 a0
|
|
# CHECK-ASM: encoding: [0x01,0x85]
|
|
c.srai64 a0
|