mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
218109597e
This makes the llvm-objdump output much more readable and closer to binutils objdump. This builds on D76591 It requires changing the OperandType for certain immediates to "OPERAND_PCREL" so tablegen will generate code to pass the instruction's address. This means we can't do the generic check on these instructions in verifyInstruction any more. Should I add it back with explicit opcode checks? Or should we add a new operand flag to control the passing of address instead of matching the name? Differential Revision: https://reviews.llvm.org/D92147
16 lines
570 B
ArmAsm
16 lines
570 B
ArmAsm
# 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
|