llvm-for-llvmta/test/MC/RISCV/rv64-relax-all.s

16 lines
570 B
ArmAsm
Raw Normal View History

2022-04-25 10:02:23 +02:00
# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+c %s | llvm-objdump -d -M no-aliases --no-show-raw-insn - | FileCheck %s --check-prefix=INSTR
# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+c %s --mc-relax-all | llvm-objdump -d -M no-aliases --no-show-raw-insn - | FileCheck %s --check-prefix=RELAX-INSTR
## Check the instructions are relaxed correctly
NEAR:
# INSTR: c.beqz a0, 0x0 <NEAR>
# RELAX-INSTR: beq a0, zero, 0x0 <NEAR>
c.beqz a0, NEAR
# INSTR: c.j 0x0 <NEAR>
# RELAX-INSTR: jal zero, 0x0 <NEAR>
c.j NEAR