[llvm] 5e430af - [test] Remove CHECK lines for MCAsmStreamer's fixup output
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 17 18:55:25 PDT 2025
Author: Fangrui Song
Date: 2025-04-17T18:55:20-07:00
New Revision: 5e430afb84c3cbf285d8fe15c0ae23e0920e946b
URL: https://github.com/llvm/llvm-project/commit/5e430afb84c3cbf285d8fe15c0ae23e0920e946b
DIFF: https://github.com/llvm/llvm-project/commit/5e430afb84c3cbf285d8fe15c0ae23e0920e946b.diff
LOG: [test] Remove CHECK lines for MCAsmStreamer's fixup output
As mentioned in #136088 , the fixup output is a debug aid and should not
be used to test target-specific relocation generation implementation.
The llvm-mc -filetype=obj output is what truly matters.
Added:
Modified:
llvm/test/MC/LoongArch/Relocations/relocations.s
llvm/test/MC/RISCV/fixups-binary-expression.s
llvm/test/MC/RISCV/function-call.s
llvm/test/MC/RISCV/linker-relaxation.s
llvm/test/MC/RISCV/option-exact.s
llvm/test/MC/RISCV/pseudo-jump.s
llvm/test/MC/RISCV/relocations.s
llvm/test/MC/RISCV/tail-call.s
llvm/test/MC/RISCV/xqcilb-relocations.s
llvm/test/MC/RISCV/xqcili-relocations.s
Removed:
################################################################################
diff --git a/llvm/test/MC/LoongArch/Relocations/relocations.s b/llvm/test/MC/LoongArch/Relocations/relocations.s
index f91a941295d9e..bd8ecd085496b 100644
--- a/llvm/test/MC/LoongArch/Relocations/relocations.s
+++ b/llvm/test/MC/LoongArch/Relocations/relocations.s
@@ -1,11 +1,10 @@
-# RUN: llvm-mc --triple=loongarch64 < %s --show-encoding \
-# RUN: | FileCheck --check-prefixes=INSTR,FIXUP %s
-# RUN: llvm-mc --filetype=obj --triple=loongarch64 < %s \
+# RUN: llvm-mc --triple=loongarch64 %s --show-encoding \
+# RUN: | FileCheck --check-prefix=INSTR %s
+# RUN: llvm-mc --filetype=obj --triple=loongarch64 %s \
# RUN: | llvm-readobj -r - | FileCheck --check-prefix=RELOC %s
## Check prefixes:
## RELOC - Check the relocation in the object.
-## FIXUP - Check the fixup on the instruction.
## INSTR - Check the instruction is handled properly by the ASMPrinter.
.long foo
@@ -17,324 +16,259 @@
bne $t1, $t2, %b16(foo)
# RELOC: R_LARCH_B16
# INSTR: bne $t1, $t2, %b16(foo)
-# FIXUP: fixup A - offset: 0, value: %b16(foo), kind: fixup_loongarch_b16
bnez $t1, %b21(foo)
# RELOC: R_LARCH_B21
# INSTR: bnez $t1, %b21(foo)
-# FIXUP: fixup A - offset: 0, value: %b21(foo), kind: fixup_loongarch_b21
bl %plt(foo)
# RELOC: R_LARCH_B26
# INSTR: bl %plt(foo)
-# FIXUP: fixup A - offset: 0, value: %plt(foo), kind: fixup_loongarch_b26
bl foo
# RELOC: R_LARCH_B26
# INSTR: bl foo
-# FIXUP: fixup A - offset: 0, value: foo, kind: fixup_loongarch_b26
lu12i.w $t1, %abs_hi20(foo)
# RELOC: R_LARCH_ABS_HI20 foo 0x0
# INSTR: lu12i.w $t1, %abs_hi20(foo)
-# FIXUP: fixup A - offset: 0, value: %abs_hi20(foo), kind: fixup_loongarch_abs_hi20
ori $t1, $t1, %abs_lo12(foo)
# RELOC: R_LARCH_ABS_LO12 foo 0x0
# INSTR: ori $t1, $t1, %abs_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %abs_lo12(foo), kind: fixup_loongarch_abs_lo12
lu32i.d $t1, %abs64_lo20(foo)
# RELOC: R_LARCH_ABS64_LO20 foo 0x0
# INSTR: lu32i.d $t1, %abs64_lo20(foo)
-# FIXUP: fixup A - offset: 0, value: %abs64_lo20(foo), kind: fixup_loongarch_abs64_lo20
lu52i.d $t1, $t1, %abs64_hi12(foo)
# RELOC: R_LARCH_ABS64_HI12 foo 0x0
# INSTR: lu52i.d $t1, $t1, %abs64_hi12(foo)
-# FIXUP: fixup A - offset: 0, value: %abs64_hi12(foo), kind: fixup_loongarch_abs64_hi12
pcalau12i $t1, %pc_hi20(foo)
# RELOC: R_LARCH_PCALA_HI20 foo 0x0
# INSTR: pcalau12i $t1, %pc_hi20(foo)
-# FIXUP: fixup A - offset: 0, value: %pc_hi20(foo), kind: FK_NONE
pcalau12i $t1, %pc_hi20(foo+4)
# RELOC: R_LARCH_PCALA_HI20 foo 0x4
# INSTR: pcalau12i $t1, %pc_hi20(foo+4)
-# FIXUP: fixup A - offset: 0, value: %pc_hi20(foo+4), kind: FK_NONE
addi.d $t1, $t1, %pc_lo12(foo)
# RELOC: R_LARCH_PCALA_LO12 foo 0x0
# INSTR: addi.d $t1, $t1, %pc_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %pc_lo12(foo), kind: FK_NONE
addi.d $t1, $t1, %pc_lo12(foo+4)
# RELOC: R_LARCH_PCALA_LO12 foo 0x4
# INSTR: addi.d $t1, $t1, %pc_lo12(foo+4)
-# FIXUP: fixup A - offset: 0, value: %pc_lo12(foo+4), kind: FK_NONE
jirl $zero, $t1, %pc_lo12(foo)
# RELOC: R_LARCH_PCALA_LO12 foo 0x0
# INSTR: jirl $zero, $t1, %pc_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %pc_lo12(foo), kind: FK_NONE
st.b $t1, $a2, %pc_lo12(foo)
# RELOC: R_LARCH_PCALA_LO12 foo 0x0
# INSTR: st.b $t1, $a2, %pc_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %pc_lo12(foo), kind: FK_NONE
st.b $t1, $a2, %pc_lo12(foo+4)
# RELOC: R_LARCH_PCALA_LO12 foo 0x4
# INSTR: st.b $t1, $a2, %pc_lo12(foo+4)
-# FIXUP: fixup A - offset: 0, value: %pc_lo12(foo+4), kind: FK_NONE
lu32i.d $t1, %pc64_lo20(foo)
# RELOC: R_LARCH_PCALA64_LO20 foo 0x0
# INSTR: lu32i.d $t1, %pc64_lo20(foo)
-# FIXUP: fixup A - offset: 0, value: %pc64_lo20(foo), kind: FK_NONE
lu52i.d $t1, $t1, %pc64_hi12(foo)
# RELOC: R_LARCH_PCALA64_HI12 foo 0x0
# INSTR: lu52i.d $t1, $t1, %pc64_hi12(foo)
-# FIXUP: fixup A - offset: 0, value: %pc64_hi12(foo), kind: FK_NONE
pcalau12i $t1, %got_pc_hi20(foo)
# RELOC: R_LARCH_GOT_PC_HI20 foo 0x0
# INSTR: pcalau12i $t1, %got_pc_hi20(foo)
-# FIXUP: fixup A - offset: 0, value: %got_pc_hi20(foo), kind: FK_NONE
ld.d $t1, $a2, %got_pc_lo12(foo)
# RELOC: R_LARCH_GOT_PC_LO12 foo 0x0
# INSTR: ld.d $t1, $a2, %got_pc_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %got_pc_lo12(foo), kind: FK_NONE
lu32i.d $t1, %got64_pc_lo20(foo)
# RELOC: R_LARCH_GOT64_PC_LO20 foo 0x0
# INSTR: lu32i.d $t1, %got64_pc_lo20(foo)
-# FIXUP: fixup A - offset: 0, value: %got64_pc_lo20(foo), kind: FK_NONE
lu52i.d $t1, $t1, %got64_pc_hi12(foo)
# RELOC: R_LARCH_GOT64_PC_HI12 foo 0x0
# INSTR: lu52i.d $t1, $t1, %got64_pc_hi12(foo)
-# FIXUP: fixup A - offset: 0, value: %got64_pc_hi12(foo), kind: FK_NONE
lu12i.w $t1, %got_hi20(foo)
# RELOC: R_LARCH_GOT_HI20 foo 0x0
# INSTR: lu12i.w $t1, %got_hi20(foo)
-# FIXUP: fixup A - offset: 0, value: %got_hi20(foo), kind: FK_NONE
ori $t1, $a2, %got_lo12(foo)
# RELOC: R_LARCH_GOT_LO12 foo 0x0
# INSTR: ori $t1, $a2, %got_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %got_lo12(foo), kind: FK_NONE
lu32i.d $t1, %got64_lo20(foo)
# RELOC: R_LARCH_GOT64_LO20 foo 0x0
# INSTR: lu32i.d $t1, %got64_lo20(foo)
-# FIXUP: fixup A - offset: 0, value: %got64_lo20(foo), kind: FK_NONE
lu52i.d $t1, $t1, %got64_hi12(foo)
# RELOC: R_LARCH_GOT64_HI12 foo 0x0
# INSTR: lu52i.d $t1, $t1, %got64_hi12(foo)
-# FIXUP: fixup A - offset: 0, value: %got64_hi12(foo), kind: FK_NONE
lu12i.w $t1, %le_hi20(foo)
# RELOC: R_LARCH_TLS_LE_HI20 foo 0x0
# INSTR: lu12i.w $t1, %le_hi20(foo)
-# FIXUP: fixup A - offset: 0, value: %le_hi20(foo), kind: fixup_loongarch_tls_le_hi20
ori $t1, $a2, %le_lo12(foo)
# RELOC: R_LARCH_TLS_LE_LO12 foo 0x0
# INSTR: ori $t1, $a2, %le_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %le_lo12(foo), kind: fixup_loongarch_tls_le_lo12
lu32i.d $t1, %le64_lo20(foo)
# RELOC: R_LARCH_TLS_LE64_LO20 foo 0x0
# INSTR: lu32i.d $t1, %le64_lo20(foo)
-# FIXUP: fixup A - offset: 0, value: %le64_lo20(foo), kind: fixup_loongarch_tls_le64_lo20
lu52i.d $t1, $t1, %le64_hi12(foo)
# RELOC: R_LARCH_TLS_LE64_HI12 foo 0x0
# INSTR: lu52i.d $t1, $t1, %le64_hi12(foo)
-# FIXUP: fixup A - offset: 0, value: %le64_hi12(foo), kind: fixup_loongarch_tls_le64_hi12
pcalau12i $t1, %ie_pc_hi20(foo)
# RELOC: R_LARCH_TLS_IE_PC_HI20 foo 0x0
# INSTR: pcalau12i $t1, %ie_pc_hi20(foo)
-# FIXUP: fixup A - offset: 0, value: %ie_pc_hi20(foo), kind: FK_NONE
ld.d $t1, $a2, %ie_pc_lo12(foo)
# RELOC: R_LARCH_TLS_IE_PC_LO12 foo 0x0
# INSTR: ld.d $t1, $a2, %ie_pc_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %ie_pc_lo12(foo), kind: FK_NONE
lu32i.d $t1, %ie64_pc_lo20(foo)
# RELOC: R_LARCH_TLS_IE64_PC_LO20 foo 0x0
# INSTR: lu32i.d $t1, %ie64_pc_lo20(foo)
-# FIXUP: fixup A - offset: 0, value: %ie64_pc_lo20(foo), kind: FK_NONE
lu52i.d $t1, $t1, %ie64_pc_hi12(foo)
# RELOC: R_LARCH_TLS_IE64_PC_HI12 foo 0x0
# INSTR: lu52i.d $t1, $t1, %ie64_pc_hi12(foo)
-# FIXUP: fixup A - offset: 0, value: %ie64_pc_hi12(foo), kind: FK_NONE
lu12i.w $t1, %ie_hi20(foo)
# RELOC: R_LARCH_TLS_IE_HI20 foo 0x0
# INSTR: lu12i.w $t1, %ie_hi20(foo)
-# FIXUP: fixup A - offset: 0, value: %ie_hi20(foo), kind: FK_NONE
ori $t1, $a2, %ie_lo12(foo)
# RELOC: R_LARCH_TLS_IE_LO12 foo 0x0
# INSTR: ori $t1, $a2, %ie_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %ie_lo12(foo), kind: FK_NONE
lu32i.d $t1, %ie64_lo20(foo)
# RELOC: R_LARCH_TLS_IE64_LO20 foo 0x0
# INSTR: lu32i.d $t1, %ie64_lo20(foo)
-# FIXUP: fixup A - offset: 0, value: %ie64_lo20(foo), kind: FK_NONE
lu52i.d $t1, $t1, %ie64_hi12(foo)
# RELOC: R_LARCH_TLS_IE64_HI12 foo 0x0
# INSTR: lu52i.d $t1, $t1, %ie64_hi12(foo)
-# FIXUP: fixup A - offset: 0, value: %ie64_hi12(foo), kind: FK_NONE
pcalau12i $t1, %ld_pc_hi20(foo)
# RELOC: R_LARCH_TLS_LD_PC_HI20 foo 0x0
# INSTR: pcalau12i $t1, %ld_pc_hi20(foo)
-# FIXUP: fixup A - offset: 0, value: %ld_pc_hi20(foo), kind: FK_NONE
lu12i.w $t1, %ld_hi20(foo)
# RELOC: R_LARCH_TLS_LD_HI20 foo 0x0
# INSTR: lu12i.w $t1, %ld_hi20(foo)
-# FIXUP: fixup A - offset: 0, value: %ld_hi20(foo), kind: FK_NONE
pcalau12i $t1, %gd_pc_hi20(foo)
# RELOC: R_LARCH_TLS_GD_PC_HI20 foo 0x0
# INSTR: pcalau12i $t1, %gd_pc_hi20(foo)
-# FIXUP: fixup A - offset: 0, value: %gd_pc_hi20(foo), kind: FK_NONE
lu12i.w $t1, %gd_hi20(foo)
# RELOC: R_LARCH_TLS_GD_HI20 foo 0x0
# INSTR: lu12i.w $t1, %gd_hi20(foo)
-# FIXUP: fixup A - offset: 0, value: %gd_hi20(foo), kind: FK_NONE
pcaddu18i $t1, %call36(foo)
# RELOC: R_LARCH_CALL36 foo 0x0
# INSTR: pcaddu18i $t1, %call36(foo)
-# FIXUP: fixup A - offset: 0, value: %call36(foo), kind: FK_NONE
pcalau12i $t1, %desc_pc_hi20(foo)
# RELOC: R_LARCH_TLS_DESC_PC_HI20 foo 0x0
# INSTR: pcalau12i $t1, %desc_pc_hi20(foo)
-# FIXUP: fixup A - offset: 0, value: %desc_pc_hi20(foo), kind: FK_NONE
addi.d $t1, $t1, %desc_pc_lo12(foo)
# RELOC: R_LARCH_TLS_DESC_PC_LO12 foo 0x0
# INSTR: addi.d $t1, $t1, %desc_pc_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %desc_pc_lo12(foo), kind: FK_NONE
lu32i.d $t1, %desc64_pc_lo20(foo)
# RELOC: R_LARCH_TLS_DESC64_PC_LO20 foo 0x0
# INSTR: lu32i.d $t1, %desc64_pc_lo20(foo)
-# FIXUP: fixup A - offset: 0, value: %desc64_pc_lo20(foo), kind: FK_NONE
lu52i.d $t1, $t1, %desc64_pc_hi12(foo)
# RELOC: R_LARCH_TLS_DESC64_PC_HI12 foo 0x0
# INSTR: lu52i.d $t1, $t1, %desc64_pc_hi12(foo)
-# FIXUP: fixup A - offset: 0, value: %desc64_pc_hi12(foo), kind: FK_NONE
ld.d $ra, $t1, %desc_ld(foo)
# RELOC: R_LARCH_TLS_DESC_LD foo 0x0
# INSTR: ld.d $ra, $t1, %desc_ld(foo)
-# FIXUP: fixup A - offset: 0, value: %desc_ld(foo), kind: FK_NONE
jirl $ra, $ra, %desc_call(foo)
# RELOC: R_LARCH_TLS_DESC_CALL foo 0x0
# INSTR: jirl $ra, $ra, %desc_call(foo)
-# FIXUP: fixup A - offset: 0, value: %desc_call(foo), kind: FK_NONE
lu12i.w $t1, %desc_hi20(foo)
# RELOC: R_LARCH_TLS_DESC_HI20 foo 0x0
# INSTR: lu12i.w $t1, %desc_hi20(foo)
-# FIXUP: fixup A - offset: 0, value: %desc_hi20(foo), kind: FK_NONE
ori $t1, $t1, %desc_lo12(foo)
# RELOC: R_LARCH_TLS_DESC_LO12 foo 0x0
# INSTR: ori $t1, $t1, %desc_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %desc_lo12(foo), kind: FK_NONE
lu32i.d $t1, %desc64_lo20(foo)
# RELOC: R_LARCH_TLS_DESC64_LO20 foo 0x0
# INSTR: lu32i.d $t1, %desc64_lo20(foo)
-# FIXUP: fixup A - offset: 0, value: %desc64_lo20(foo), kind: FK_NONE
lu52i.d $t1, $t1, %desc64_hi12(foo)
# RELOC: R_LARCH_TLS_DESC64_HI12 foo 0x0
# INSTR: lu52i.d $t1, $t1, %desc64_hi12(foo)
-# FIXUP: fixup A - offset: 0, value: %desc64_hi12(foo), kind: FK_NONE
lu12i.w $t1, %le_hi20_r(foo)
# RELOC: R_LARCH_TLS_LE_HI20_R foo 0x0
# INSTR: lu12i.w $t1, %le_hi20_r(foo)
-# FIXUP: fixup A - offset: 0, value: %le_hi20_r(foo), kind: FK_NONE
add.d $t1, $t2, $tp, %le_add_r(foo)
# RELOC: R_LARCH_TLS_LE_ADD_R foo 0x0
# INSTR: add.d $t1, $t2, $tp, %le_add_r(foo)
-# FIXUP: fixup A - offset: 0, value: %le_add_r(foo), kind: FK_NONE
addi.d $t1, $a2, %le_lo12_r(foo)
# RELOC: R_LARCH_TLS_LE_LO12_R foo 0x0
# INSTR: addi.d $t1, $a2, %le_lo12_r(foo)
-# FIXUP: fixup A - offset: 0, value: %le_lo12_r(foo), kind: FK_NONE
pcaddi $t1, %pcrel_20(foo)
# RELOC: R_LARCH_PCREL20_S2 foo 0x0
# INSTR: pcaddi $t1, %pcrel_20(foo)
-# FIXUP: fixup A - offset: 0, value: %pcrel_20(foo), kind: FK_NONE
pcaddi $t1, %ld_pcrel_20(foo)
# RELOC: R_LARCH_TLS_LD_PCREL20_S2 foo 0x0
# INSTR: pcaddi $t1, %ld_pcrel_20(foo)
-# FIXUP: fixup A - offset: 0, value: %ld_pcrel_20(foo), kind: FK_NONE
pcaddi $t1, %gd_pcrel_20(foo)
# RELOC: R_LARCH_TLS_GD_PCREL20_S2 foo 0x0
# INSTR: pcaddi $t1, %gd_pcrel_20(foo)
-# FIXUP: fixup A - offset: 0, value: %gd_pcrel_20(foo), kind: FK_NONE
pcaddi $t1, %desc_pcrel_20(foo)
# RELOC: R_LARCH_TLS_DESC_PCREL20_S2 foo 0x0
# INSTR: pcaddi $t1, %desc_pcrel_20(foo)
-# FIXUP: fixup A - offset: 0, value: %desc_pcrel_20(foo), kind: FK_NONE
fld.s $ft1, $a0, %pc_lo12(foo)
# RELOC: R_LARCH_PCALA_LO12 foo 0x0
# INSTR: fld.s $ft1, $a0, %pc_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %pc_lo12(foo), kind: FK_NONE
fst.d $ft1, $a0, %pc_lo12(foo)
# RELOC: R_LARCH_PCALA_LO12 foo 0x0
# INSTR: fst.d $ft1, $a0, %pc_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %pc_lo12(foo), kind: FK_NONE
vld $vr9, $a0, %pc_lo12(foo)
# RELOC: R_LARCH_PCALA_LO12 foo 0x0
# INSTR: vld $vr9, $a0, %pc_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %pc_lo12(foo), kind: FK_NONE
vst $vr9, $a0, %pc_lo12(foo)
# RELOC: R_LARCH_PCALA_LO12 foo 0x0
# INSTR: vst $vr9, $a0, %pc_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %pc_lo12(foo), kind: FK_NONE
xvld $xr9, $a0, %pc_lo12(foo)
# RELOC: R_LARCH_PCALA_LO12 foo 0x0
# INSTR: xvld $xr9, $a0, %pc_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %pc_lo12(foo), kind: FK_NONE
xvst $xr9, $a0, %pc_lo12(foo)
# RELOC: R_LARCH_PCALA_LO12 foo 0x0
# INSTR: xvst $xr9, $a0, %pc_lo12(foo)
-# FIXUP: fixup A - offset: 0, value: %pc_lo12(foo), kind: FK_NONE
diff --git a/llvm/test/MC/RISCV/fixups-binary-expression.s b/llvm/test/MC/RISCV/fixups-binary-expression.s
index 325a54ceeda9e..457d44968fd6e 100644
--- a/llvm/test/MC/RISCV/fixups-binary-expression.s
+++ b/llvm/test/MC/RISCV/fixups-binary-expression.s
@@ -1,5 +1,3 @@
-# RUN: llvm-mc -triple riscv32 -mattr=+c -M no-aliases < %s -show-encoding \
-# RUN: | FileCheck -check-prefix=CHECK-FIXUP %s
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c < %s \
# RUN: | llvm-objdump -M no-aliases -d - \
# RUN: | FileCheck -check-prefix=CHECK-INSTR %s
@@ -11,21 +9,17 @@
.LBB1:
jal zero, .LBB0+16
-# CHECK-FIXUP: fixup A - offset: 0, value: .LBB0+16, kind: fixup_riscv_jal
# CHECK-INSTR: jal zero, 0x10
# CHECK-RELOC: R_RISCV_JAL
beq a0, a1, .LBB1+32
-# CHECK-FIXUP: fixup A - offset: 0, value: .LBB1+32, kind: fixup_riscv_branch
# CHECK-INSTR: beq a0, a1, 0x20
# CHECK-RELOC: R_RISCV_BRANCH
c.j .+32
-# CHECK: fixup A - offset: 0, value: .Ltmp0+32, kind: fixup_riscv_rvc_jump
# CHECK-INSTR: c.j 0x28
# CHECK-RELOC: R_RISCV_RVC_JUMP
c.beqz a0, .-2
-# CHECK-FIXUP: fixup A - offset: 0, value: .Ltmp1-2, kind: fixup_riscv_rvc_branch
# CHECK-INSTR: c.beqz a0, 0x8
# CHECK-RELOC: R_RISCV_RVC_BRANCH
diff --git a/llvm/test/MC/RISCV/function-call.s b/llvm/test/MC/RISCV/function-call.s
index 1521ae7e55e19..7e7a29dbc2d7e 100644
--- a/llvm/test/MC/RISCV/function-call.s
+++ b/llvm/test/MC/RISCV/function-call.s
@@ -2,8 +2,6 @@
# RUN: | llvm-objdump -d - | FileCheck --check-prefix=INSTR %s
# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
# RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
-# RUN: llvm-mc -triple riscv32 < %s -show-encoding \
-# RUN: | FileCheck -check-prefix=FIXUP %s
.long foo
@@ -11,12 +9,10 @@ call foo
# RELOC: R_RISCV_CALL_PLT foo 0x0
# INSTR: auipc ra, 0
# INSTR: jalr ra
-# FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_call
call bar
# RELOC: R_RISCV_CALL_PLT bar 0x0
# INSTR: auipc ra, 0
# INSTR: jalr ra
-# FIXUP: fixup A - offset: 0, value: bar, kind: fixup_riscv_call
# Ensure that calls to functions whose names coincide with register names work.
@@ -24,25 +20,21 @@ call zero
# RELOC: R_RISCV_CALL_PLT zero 0x0
# INSTR: auipc ra, 0
# INSTR: jalr ra
-# FIXUP: fixup A - offset: 0, value: zero, kind: fixup_riscv_call
call f1
# RELOC: R_RISCV_CALL_PLT f1 0x0
# INSTR: auipc ra, 0
# INSTR: jalr ra
-# FIXUP: fixup A - offset: 0, value: f1, kind: fixup_riscv_call
call ra
# RELOC: R_RISCV_CALL_PLT ra 0x0
# INSTR: auipc ra, 0
# INSTR: jalr ra
-# FIXUP: fixup A - offset: 0, value: ra, kind: fixup_riscv_call
call mstatus
# RELOC: R_RISCV_CALL_PLT mstatus 0x0
# INSTR: auipc ra, 0
# INSTR: jalr ra
-# FIXUP: fixup A - offset: 0, value: mstatus, kind: fixup_riscv_call
# Ensure that calls to procedure linkage table symbols work.
@@ -50,7 +42,6 @@ call foo at plt
# RELOC: R_RISCV_CALL_PLT foo 0x0
# INSTR: auipc ra, 0
# INSTR: jalr ra
-# FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_call_plt
# Ensure that an explicit register operand can be parsed.
@@ -58,10 +49,8 @@ call a0, foo
# RELOC: R_RISCV_CALL_PLT foo 0x0
# INSTR: auipc a0, 0
# INSTR: jalr a0
-# FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_call
call a0, foo at plt
# RELOC: R_RISCV_CALL_PLT foo 0x0
# INSTR: auipc a0, 0
# INSTR: jalr a0
-# FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_call_plt
diff --git a/llvm/test/MC/RISCV/linker-relaxation.s b/llvm/test/MC/RISCV/linker-relaxation.s
index 6d0a05fb4267f..7ecc14cc779e4 100644
--- a/llvm/test/MC/RISCV/linker-relaxation.s
+++ b/llvm/test/MC/RISCV/linker-relaxation.s
@@ -2,14 +2,10 @@
# RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELAX-RELOC %s
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=-relax < %s \
# RUN: | llvm-readobj -r - | FileCheck -check-prefix=NORELAX-RELOC %s
-# RUN: llvm-mc -triple riscv32 -mattr=+relax < %s -show-encoding \
-# RUN: | FileCheck -check-prefix=RELAX-FIXUP %s
# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+relax < %s \
# RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELAX-RELOC %s
# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=-relax < %s \
# RUN: | llvm-readobj -r - | FileCheck -check-prefix=NORELAX-RELOC %s
-# RUN: llvm-mc -triple riscv64 -mattr=+relax < %s -show-encoding \
-# RUN: | FileCheck -check-prefix=RELAX-FIXUP %s
.long foo
@@ -18,32 +14,24 @@ call foo
# NORELAX-RELOC-NOT: R_RISCV_RELAX
# RELAX-RELOC: R_RISCV_CALL_PLT foo 0x0
# RELAX-RELOC: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_call
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
lui t1, %hi(foo)
# NORELAX-RELOC: R_RISCV_HI20 foo 0x0
# NORELAX-RELOC-NOT: R_RISCV_RELAX
# RELAX-RELOC: R_RISCV_HI20 foo 0x0
# RELAX-RELOC: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %hi(foo), kind: fixup_riscv_hi20
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
addi t1, t1, %lo(foo)
# NORELAX-RELOC: R_RISCV_LO12_I foo 0x0
# NORELAX-RELOC-NOT: R_RISCV_RELAX
# RELAX-RELOC: R_RISCV_LO12_I foo 0x0
# RELAX-RELOC: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %lo(foo), kind: fixup_riscv_lo12_i
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
sb t1, %lo(foo)(a2)
# NORELAX-RELOC: R_RISCV_LO12_S foo 0x0
# NORELAX-RELOC-NOT: R_RISCV_RELAX
# RELAX-RELOC: R_RISCV_LO12_S foo 0x0
# RELAX-RELOC: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %lo(foo), kind: fixup_riscv_lo12_s
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
1:
auipc t1, %pcrel_hi(foo)
@@ -51,24 +39,18 @@ auipc t1, %pcrel_hi(foo)
# NORELAX-RELOC-NOT: R_RISCV_RELAX
# RELAX-RELOC: R_RISCV_PCREL_HI20 foo 0x0
# RELAX-RELOC: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %pcrel_hi(foo), kind: fixup_riscv_pcrel_hi20
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
addi t1, t1, %pcrel_lo(1b)
# NORELAX-RELOC: R_RISCV_PCREL_LO12_I .Ltmp0 0x0
# NORELAX-RELOC-NOT: R_RISCV_RELAX
# RELAX-RELOC: R_RISCV_PCREL_LO12_I .Ltmp0 0x0
# RELAX-RELOC: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %pcrel_lo(.Ltmp0), kind: fixup_riscv_pcrel_lo12_i
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
sb t1, %pcrel_lo(1b)(a2)
# NORELAX-RELOC: R_RISCV_PCREL_LO12_S .Ltmp0 0x0
# NORELAX-RELOC-NOT: R_RISCV_RELAX
# RELAX-RELOC: R_RISCV_PCREL_LO12_S .Ltmp0 0x0
# RELAX-RELOC: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %pcrel_lo(.Ltmp0), kind: fixup_riscv_pcrel_lo12_s
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
# Check behaviour when a locally defined symbol is referenced.
@@ -77,40 +59,30 @@ bar:
beq s1, s1, bar
# NORELAX-RELOC-NOT: R_RISCV_BRANCH
# RELAX-RELOC: R_RISCV_BRANCH bar 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: bar, kind: fixup_riscv_branch
-# RELAX-FIXUP-NOT: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
call bar
# NORELAX-RELOC-NOT: R_RISCV_CALL
# NORELAX-RELOC-NOT: R_RISCV_RELAX
# RELAX-RELOC: R_RISCV_CALL_PLT bar 0x0
# RELAX-RELOC: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: bar, kind: fixup_riscv_call
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
lui t1, %hi(bar)
# NORELAX-RELOC: R_RISCV_HI20 bar 0x0
# NORELAX-RELOC-NOT: R_RISCV_RELAX
# RELAX-RELOC: R_RISCV_HI20 bar 0x0
# RELAX-RELOC: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %hi(bar), kind: fixup_riscv_hi20
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
addi t1, t1, %lo(bar)
# NORELAX-RELOC: R_RISCV_LO12_I bar 0x0
# NORELAX-RELOC-NOT: R_RISCV_RELAX
# RELAX-RELOC: R_RISCV_LO12_I bar 0x0
# RELAX-RELOC: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %lo(bar), kind: fixup_riscv_lo12_i
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
sb t1, %lo(bar)(a2)
# NORELAX-RELOC: R_RISCV_LO12_S bar 0x0
# NORELAX-RELOC-NOT: R_RISCV_RELAX
# RELAX-RELOC: R_RISCV_LO12_S bar 0x0
# RELAX-RELOC: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %lo(bar), kind: fixup_riscv_lo12_s
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
2:
auipc t1, %pcrel_hi(bar)
@@ -118,47 +90,35 @@ auipc t1, %pcrel_hi(bar)
# NORELAX-RELOC-NOT: R_RISCV_RELAX
# RELAX-RELOC: R_RISCV_PCREL_HI20 bar 0x0
# RELAX-RELOC: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %pcrel_hi(bar), kind: fixup_riscv_pcrel_hi20
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
addi t1, t1, %pcrel_lo(2b)
# NORELAX-RELOC-NOT: R_RISCV_PCREL_LO12_I
# NORELAX-RELOC-NOT: R_RISCV_RELAX
# RELAX-RELOC: R_RISCV_PCREL_LO12_I .Ltmp1 0x0
# RELAX-RELOC: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %pcrel_lo(.Ltmp1), kind: fixup_riscv_pcrel_lo12_i
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
sb t1, %pcrel_lo(2b)(a2)
# NORELAX-RELOC-NOT: R_RISCV_PCREL_LO12_S
# NORELAX-RELOC-NOT: R_RISCV_RELAX
# RELAX-RELOC: R_RISCV_PCREL_LO12_S .Ltmp1 0x0
# RELAX-RELOC: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %pcrel_lo(.Ltmp1), kind: fixup_riscv_pcrel_lo12_s
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
## %hi/%lo on an absolute symbol (not yet defined) leads to relocations when relaxation is enabled.
lui t2, %hi(abs)
# NORELAX-RELOC-NOT: R_RISCV_
# RELAX-RELOC: R_RISCV_HI20 - 0x12345
# RELAX-RELOC-NEXT: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %hi(abs), kind: fixup_riscv_hi20
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
addi t2, t2, %lo(abs)
# NORELAX-RELOC-NOT: R_RISCV_
# RELAX-RELOC: R_RISCV_LO12_I - 0x12345
# RELAX-RELOC-NEXT: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %lo(abs), kind: fixup_riscv_lo12_i
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
.set abs, 0x12345
lui t3, %hi(abs)
# RELAX-RELOC: R_RISCV_HI20 - 0x12345
# RELAX-RELOC-NEXT: R_RISCV_RELAX - 0x0
-# RELAX-FIXUP: fixup A - offset: 0, value: %hi(74565), kind: fixup_riscv_hi20
-# RELAX-FIXUP: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
# Check that a relocation is not emitted for a symbol
diff erence which has
# been folded to a fixup with an absolute value. This can happen when a
diff --git a/llvm/test/MC/RISCV/option-exact.s b/llvm/test/MC/RISCV/option-exact.s
index f90bd00621c42..83e25817bfc08 100644
--- a/llvm/test/MC/RISCV/option-exact.s
+++ b/llvm/test/MC/RISCV/option-exact.s
@@ -29,8 +29,6 @@ c.lw a0, 0(a0)
# CHECK-ASM: call undefined
# CHECK-ASM-SAME: # encoding: [0x97'A',A,A,A,0xe7'A',0x80'A',A,A]
-# CHECK-ASM-NEXT: fixup A - offset: 0, value: undefined, kind: fixup_riscv_call_plt
-# CHECK-ASM-NEXT: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
# CHECK-OBJDUMP: auipc ra, 0
# CHECK-OBJDUMP-NEXT: R_RISCV_CALL_PLT undefined
# CHECK-OBJDUMP-NEXT: R_RISCV_RELAX *ABS*
@@ -39,7 +37,6 @@ call undefined at plt
# CHECK-ASM: beq a0, a1, undefined
# CHECK-ASM-SAME: # encoding: [0x63'A',A,0xb5'A',A]
-# CHECK-ASM-NEXT: fixup A - offset: 0, value: undefined, kind: fixup_riscv_branch
# CHECK-OBJDUMP: bne a0, a1, 0x14
# CHECK-OBJDUMP-NEXT: jal zero, 0x10
# CHECK-OBJDUMP-NEXT: R_RISCV_JAL undefined
@@ -47,7 +44,6 @@ beq a0, a1, undefined
# CHECK-ASM: c.j undefined
# CHECK-ASM-SAME: # encoding: [0bAAAAAA01,0b101AAAAA]
-# CHECK-ASM-NEXT: fixup A - offset: 0, value: undefined, kind: fixup_riscv_rvc_jump
# CHECK-OBJDUMP: jal zero, 0x14
# CHECK-OBJDUMP-NEXT: R_RISCV_JAL undefined
c.j undefined
@@ -67,8 +63,6 @@ c.lw a0, 0(a0)
# CHECK-ASM: call undefined
# CHECK-ASM-SAME: # encoding: [0x97'A',A,A,A,0xe7'A',0x80'A',A,A]
-# CHECK-ASM-NEXT: fixup A - offset: 0, value: undefined, kind: fixup_riscv_call_plt
-# CHECK-ASM-NOT: fixup_riscv_relax
# CHECK-OBJDUMP: auipc ra, 0
# CHECK-OBJDUMP-NEXT: R_RISCV_CALL_PLT undefined
# CHECK-OBJDUMP-NOT: R_RISCV_RELAX
@@ -77,14 +71,12 @@ call undefined at plt
# CHECK-ASM: beq a0, a1, undefined
# CHECK-ASM-SAME: # encoding: [0x63'A',A,0xb5'A',A]
-# CHECK-ASM-NEXT: fixup A - offset: 0, value: undefined, kind: fixup_riscv_branch
# CHECK-OBJDUMP: beq a0, a1, 0x26
# CHECK-OBJDUMP-NEXT: R_RISCV_BRANCH undefined
beq a0, a1, undefined
# CHECK-ASM: c.j undefined
# CHECK-ASM-SAME: # encoding: [0bAAAAAA01,0b101AAAAA]
-# CHECK-ASM-NEXT: fixup A - offset: 0, value: undefined, kind: fixup_riscv_rvc_jump
# CHECK-OBJDUMP: c.j 0x2a
# CHECK-OBJDUMP-NEXT: R_RISCV_RVC_JUMP undefined
c.j undefined
@@ -104,8 +96,6 @@ c.lw a0, 0(a0)
# CHECK-ASM: call undefined
# CHECK-ASM-SAME: # encoding: [0x97'A',A,A,A,0xe7'A',0x80'A',A,A]
-# CHECK-ASM-NEXT: fixup A - offset: 0, value: undefined, kind: fixup_riscv_call_plt
-# CHECK-ASM-NEXT: fixup B - offset: 0, value: 0, kind: fixup_riscv_relax
# CHECK-OBJDUMP: auipc ra, 0
# CHECK-OBJDUMP-NEXT: R_RISCV_CALL_PLT undefined
# CHECK-OBJDUMP-NEXT: R_RISCV_RELAX *ABS*
@@ -114,7 +104,6 @@ call undefined at plt
# CHECK-ASM: beq a0, a1, undefined
# CHECK-ASM-SAME: # encoding: [0x63'A',A,0xb5'A',A]
-# CHECK-ASM-NEXT: fixup A - offset: 0, value: undefined, kind: fixup_riscv_branch
# CHECK-OBJDUMP: bne a0, a1, 0x40
# CHECK-OBJDUMP-NEXT: jal zero, 0x3c
# CHECK-OBJDUMP-NEXT: R_RISCV_JAL undefined
@@ -122,7 +111,6 @@ beq a0, a1, undefined
# CHECK-ASM: c.j undefined
# CHECK-ASM-SAME: # encoding: [0bAAAAAA01,0b101AAAAA]
-# CHECK-ASM-NEXT: fixup A - offset: 0, value: undefined, kind: fixup_riscv_rvc_jump
# CHECK-OBJDUMP: jal zero, 0x40
# CHECK-OBJDUMP-NEXT: R_RISCV_JAL undefined
c.j undefined
diff --git a/llvm/test/MC/RISCV/pseudo-jump.s b/llvm/test/MC/RISCV/pseudo-jump.s
index 8c72547c5bcc2..644dee0945f64 100644
--- a/llvm/test/MC/RISCV/pseudo-jump.s
+++ b/llvm/test/MC/RISCV/pseudo-jump.s
@@ -2,8 +2,6 @@
# RUN: | llvm-objdump -d - | FileCheck --check-prefix=INSTR %s
# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
# RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
-# RUN: llvm-mc -triple riscv32 < %s -show-encoding \
-# RUN: | FileCheck -check-prefix=FIXUP %s
.long foo
@@ -11,7 +9,6 @@ jump foo, x31
# RELOC: R_RISCV_CALL_PLT foo 0x0
# INSTR: auipc t6, 0
# INSTR: jr t6
-# FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_call
# Ensure that jumps to symbols whose names coincide with register names work.
@@ -19,10 +16,8 @@ jump zero, x1
# RELOC: R_RISCV_CALL_PLT zero 0x0
# INSTR: auipc ra, 0
# INSTR: ret
-# FIXUP: fixup A - offset: 0, value: zero, kind: fixup_riscv_call
1:
jump 1b, x31
# INSTR: auipc t6, 0
# INSTR: jr t6
-# FIXUP: fixup A - offset: 0, value: .Ltmp0, kind: fixup_riscv_call
diff --git a/llvm/test/MC/RISCV/relocations.s b/llvm/test/MC/RISCV/relocations.s
index 85a25fee118ed..e1d56885aaf3b 100644
--- a/llvm/test/MC/RISCV/relocations.s
+++ b/llvm/test/MC/RISCV/relocations.s
@@ -1,11 +1,10 @@
-# RUN: llvm-mc -triple riscv32 -M no-aliases < %s -show-encoding \
-# RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
-# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c < %s \
+# RUN: llvm-mc -triple riscv32 -M no-aliases %s -show-encoding \
+# RUN: | FileCheck -check-prefix=INSTR %s
+# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c %s \
# RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
# Check prefixes:
# RELOC - Check the relocation in the object.
-# FIXUP - Check the fixup on the instruction.
# INSTR - Check the instruction is handled properly by the ASMPrinter
.long foo
@@ -17,99 +16,80 @@
lui t1, %hi(foo)
# RELOC: R_RISCV_HI20 foo 0x0
# INSTR: lui t1, %hi(foo)
-# FIXUP: fixup A - offset: 0, value: %hi(foo), kind: fixup_riscv_hi20
lui t1, %hi(foo+4)
# RELOC: R_RISCV_HI20 foo 0x4
# INSTR: lui t1, %hi(foo+4)
-# FIXUP: fixup A - offset: 0, value: %hi(foo+4), kind: fixup_riscv_hi20
lui t1, %tprel_hi(foo)
# RELOC: R_RISCV_TPREL_HI20 foo 0x0
# INSTR: lui t1, %tprel_hi(foo)
-# FIXUP: fixup A - offset: 0, value: %tprel_hi(foo), kind: fixup_riscv_tprel_hi20
lui t1, %tprel_hi(foo+4)
# RELOC: R_RISCV_TPREL_HI20 foo 0x4
# INSTR: lui t1, %tprel_hi(foo+4)
-# FIXUP: fixup A - offset: 0, value: %tprel_hi(foo+4), kind: fixup_riscv_tprel_hi20
addi t1, t1, %lo(foo)
# RELOC: R_RISCV_LO12_I foo 0x0
# INSTR: addi t1, t1, %lo(foo)
-# FIXUP: fixup A - offset: 0, value: %lo(foo), kind: fixup_riscv_lo12_i
addi t1, t1, %lo(foo+4)
# RELOC: R_RISCV_LO12_I foo 0x4
# INSTR: addi t1, t1, %lo(foo+4)
-# FIXUP: fixup A - offset: 0, value: %lo(foo+4), kind: fixup_riscv_lo12_i
addi t1, t1, %tprel_lo(foo)
# RELOC: R_RISCV_TPREL_LO12_I foo 0x0
# INSTR: addi t1, t1, %tprel_lo(foo)
-# FIXUP: fixup A - offset: 0, value: %tprel_lo(foo), kind: fixup_riscv_tprel_lo12_i
addi t1, t1, %tprel_lo(foo+4)
# RELOC: R_RISCV_TPREL_LO12_I foo 0x4
# INSTR: addi t1, t1, %tprel_lo(foo+4)
-# FIXUP: fixup A - offset: 0, value: %tprel_lo(foo+4), kind: fixup_riscv_tprel_lo12_i
sb t1, %lo(foo)(a2)
# RELOC: R_RISCV_LO12_S foo 0x0
# INSTR: sb t1, %lo(foo)(a2)
-# FIXUP: fixup A - offset: 0, value: %lo(foo), kind: fixup_riscv_lo12_s
sb t1, %lo(foo+4)(a2)
# RELOC: R_RISCV_LO12_S foo 0x4
# INSTR: sb t1, %lo(foo+4)(a2)
-# FIXUP: fixup A - offset: 0, value: %lo(foo+4), kind: fixup_riscv_lo12_s
sb t1, %tprel_lo(foo)(a2)
# RELOC: R_RISCV_TPREL_LO12_S foo 0x0
# INSTR: sb t1, %tprel_lo(foo)(a2)
-# FIXUP: fixup A - offset: 0, value: %tprel_lo(foo), kind: fixup_riscv_tprel_lo12_s
sb t1, %tprel_lo(foo+4)(a2)
# RELOC: R_RISCV_TPREL_LO12_S foo 0x4
# INSTR: sb t1, %tprel_lo(foo+4)(a2)
-# FIXUP: fixup A - offset: 0, value: %tprel_lo(foo+4), kind: fixup_riscv_tprel_lo12_s
.L0:
auipc t1, %pcrel_hi(foo)
# RELOC: R_RISCV_PCREL_HI20 foo 0x0
# INSTR: auipc t1, %pcrel_hi(foo)
-# FIXUP: fixup A - offset: 0, value: %pcrel_hi(foo), kind: fixup_riscv_pcrel_hi20
auipc t1, %pcrel_hi(foo+4)
# RELOC: R_RISCV_PCREL_HI20 foo 0x4
# INSTR: auipc t1, %pcrel_hi(foo+4)
-# FIXUP: fixup A - offset: 0, value: %pcrel_hi(foo+4), kind: fixup_riscv_pcrel_hi20
addi t1, t1, %pcrel_lo(.L0)
# RELOC: R_RISCV_PCREL_LO12_I .L0 0x0
# INSTR: addi t1, t1, %pcrel_lo(.L0)
-# FIXUP: fixup A - offset: 0, value: %pcrel_lo(.L0), kind: fixup_riscv_pcrel_lo12_i
sb t1, %pcrel_lo(.L0)(a2)
# RELOC: R_RISCV_PCREL_LO12_S .L0 0x0
# INSTR: sb t1, %pcrel_lo(.L0)(a2)
-# FIXUP: fixup A - offset: 0, value: %pcrel_lo(.L0), kind: fixup_riscv_pcrel_lo12_s
.L1:
auipc t1, %got_pcrel_hi(foo)
# RELOC: R_RISCV_GOT_HI20 foo 0x0
# INSTR: auipc t1, %got_pcrel_hi(foo)
-# FIXUP: fixup A - offset: 0, value: %got_pcrel_hi(foo), kind: fixup_riscv_got_hi20
addi t1, t1, %pcrel_lo(.L1)
# RELOC: R_RISCV_PCREL_LO12_I .L1 0x0
# INSTR: addi t1, t1, %pcrel_lo(.L1)
-# FIXUP: fixup A - offset: 0, value: %pcrel_lo(.L1), kind: fixup_riscv_pcrel_lo12_i
sb t1, %pcrel_lo(.L1)(a2)
# RELOC: R_RISCV_PCREL_LO12_S .L1 0x0
# INSTR: sb t1, %pcrel_lo(.L1)(a2)
-# FIXUP: fixup A - offset: 0, value: %pcrel_lo(.L1), kind: fixup_riscv_pcrel_lo12_s
# Check that GOT relocations aren't evaluated to a constant when the symbol is
# in the same object file.
@@ -117,83 +97,67 @@ sb t1, %pcrel_lo(.L1)(a2)
auipc t1, %got_pcrel_hi(.L1)
# RELOC: R_RISCV_GOT_HI20 .L1 0x0
# INSTR: auipc t1, %got_pcrel_hi(.L1)
-# FIXUP: fixup A - offset: 0, value: %got_pcrel_hi(.L1), kind: fixup_riscv_got_hi20
addi t1, t1, %pcrel_lo(.L2)
# RELOC: R_RISCV_PCREL_LO12_I .L2 0x0
# INSTR: addi t1, t1, %pcrel_lo(.L2)
-# FIXUP: fixup A - offset: 0, value: %pcrel_lo(.L2), kind: fixup_riscv_pcrel_lo12_i
sb t1, %pcrel_lo(.L2)(a2)
# RELOC: R_RISCV_PCREL_LO12_S .L2 0x0
# INSTR: sb t1, %pcrel_lo(.L2)(a2)
-# FIXUP: fixup A - offset: 0, value: %pcrel_lo(.L2), kind: fixup_riscv_pcrel_lo12_s
.L3:
auipc t1, %tls_ie_pcrel_hi(foo)
# RELOC: R_RISCV_TLS_GOT_HI20 foo 0x0
# INSTR: auipc t1, %tls_ie_pcrel_hi(foo)
-# FIXUP: fixup A - offset: 0, value: %tls_ie_pcrel_hi(foo), kind: fixup_riscv_tls_got_hi20
addi t1, t1, %pcrel_lo(.L3)
# RELOC: R_RISCV_PCREL_LO12_I .L3 0x0
# INSTR: addi t1, t1, %pcrel_lo(.L3)
-# FIXUP: fixup A - offset: 0, value: %pcrel_lo(.L3), kind: fixup_riscv_pcrel_lo12_i
sb t1, %pcrel_lo(.L3)(a2)
# RELOC: R_RISCV_PCREL_LO12_S .L3 0x0
# INSTR: sb t1, %pcrel_lo(.L3)(a2)
-# FIXUP: fixup A - offset: 0, value: %pcrel_lo(.L3), kind: fixup_riscv_pcrel_lo12_s
.L4:
auipc t1, %tls_gd_pcrel_hi(foo)
# RELOC: R_RISCV_TLS_GD_HI20 foo 0x0
# INSTR: auipc t1, %tls_gd_pcrel_hi(foo)
-# FIXUP: fixup A - offset: 0, value: %tls_gd_pcrel_hi(foo), kind: fixup_riscv_tls_gd_hi20
addi t1, t1, %pcrel_lo(.L4)
# RELOC: R_RISCV_PCREL_LO12_I .L4 0x0
# INSTR: addi t1, t1, %pcrel_lo(.L4)
-# FIXUP: fixup A - offset: 0, value: %pcrel_lo(.L4), kind: fixup_riscv_pcrel_lo12_i
sb t1, %pcrel_lo(.L4)(a2)
# RELOC: R_RISCV_PCREL_LO12_S .L4 0x0
# INSTR: sb t1, %pcrel_lo(.L4)(a2)
-# FIXUP: fixup A - offset: 0, value: %pcrel_lo(.L4), kind: fixup_riscv_pcrel_lo12_s
add t1, t1, tp, %tprel_add(foo)
# RELOC: R_RISCV_TPREL_ADD foo 0x0
# INSTR: add t1, t1, tp, %tprel_add(foo)
-# FIXUP: fixup A - offset: 0, value: %tprel_add(foo), kind: fixup_riscv_tprel_add
jal zero, foo
# RELOC: R_RISCV_JAL
# INSTR: jal zero, foo
-# FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_jal
# Since foo is undefined, this will be relaxed to (bltu; jal)
bgeu a0, a1, foo
# RELOC: R_RISCV_JAL
# INSTR: bgeu a0, a1, foo
-# FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_branch
.L5:
auipc a0, %tlsdesc_hi(a_symbol)
# RELOC: R_RISCV_TLSDESC_HI20
# INSTR: auipc a0, %tlsdesc_hi(a_symbol)
-# FIXUP: fixup A - offset: 0, value: %tlsdesc_hi(a_symbol), kind: fixup_riscv_tlsdesc_hi20
lw a1, %tlsdesc_load_lo(.L5)(a0)
# RELOC: R_RISCV_TLSDESC_LOAD_LO12
# INSTR: lw a1, %tlsdesc_load_lo(.L5)(a0)
-# FIXUP: fixup A - offset: 0, value: %tlsdesc_load_lo(.L5), kind: fixup_riscv_tlsdesc_load_lo12
addi a0, a0, %tlsdesc_add_lo(.L5)
# RELOC: R_RISCV_TLSDESC_ADD_LO12
# INSTR: addi a0, a0, %tlsdesc_add_lo(.L5)
-# FIXUP: fixup A - offset: 0, value: %tlsdesc_add_lo(.L5), kind: fixup_riscv_tlsdesc_add_lo12
jalr t0, 0(a1), %tlsdesc_call(.L5)
# RELOC: R_RISCV_TLSDESC_CALL
# INSTR: jalr t0, 0(a1), %tlsdesc_call(.L5)
-# FIXUP: fixup A - offset: 0, value: %tlsdesc_call(.L5), kind: fixup_riscv_tlsdesc_call
diff --git a/llvm/test/MC/RISCV/tail-call.s b/llvm/test/MC/RISCV/tail-call.s
index 7c9f28bdfacda..1c55bf5223caa 100644
--- a/llvm/test/MC/RISCV/tail-call.s
+++ b/llvm/test/MC/RISCV/tail-call.s
@@ -2,29 +2,21 @@
# RUN: | llvm-objdump -d - | FileCheck --check-prefix=INSTR %s
# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
# RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
-# RUN: llvm-mc -triple riscv32 < %s -show-encoding \
-# RUN: | FileCheck -check-prefix=FIXUP %s
# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
# RUN: | llvm-objdump -d - | FileCheck --check-prefix=INSTR %s
# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
# RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
-# RUN: llvm-mc -triple riscv64 < %s -show-encoding \
-# RUN: | FileCheck -check-prefix=FIXUP %s
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-zicfilp < %s \
# RUN: | llvm-objdump -d - | FileCheck --check-prefix=INSTR-ZICFILP %s
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-zicfilp < %s \
# RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
-# RUN: llvm-mc -triple riscv32 -mattr=+experimental-zicfilp < %s -show-encoding \
-# RUN: | FileCheck -check-prefix=FIXUP %s
# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+experimental-zicfilp < %s \
# RUN: | llvm-objdump -d - | FileCheck --check-prefix=INSTR-ZICFILP %s
# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+experimental-zicfilp < %s \
# RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
-# RUN: llvm-mc -triple riscv64 -mattr=+experimental-zicfilp < %s -show-encoding \
-# RUN: | FileCheck -check-prefix=FIXUP %s
.long foo
@@ -34,7 +26,6 @@ tail foo
# INSTR: jr t1
# INSTR-ZICFILP: auipc t2, 0
# INSTR-ZICFILP: jr t2
-# FIXUP: fixup A - offset: 0, value: foo, kind:
tail bar
# RELOC: R_RISCV_CALL_PLT bar 0x0
@@ -42,7 +33,6 @@ tail bar
# INSTR: jr t1
# INSTR-ZICFILP: auipc t2, 0
# INSTR-ZICFILP: jr t2
-# FIXUP: fixup A - offset: 0, value: bar, kind:
# Ensure that tail calls to functions whose names coincide with register names
# work.
@@ -53,7 +43,6 @@ tail zero
# INSTR: jr t1
# INSTR-ZICFILP: auipc t2, 0
# INSTR-ZICFILP: jr t2
-# FIXUP: fixup A - offset: 0, value: zero, kind:
tail f1
# RELOC: R_RISCV_CALL_PLT f1 0x0
@@ -61,7 +50,6 @@ tail f1
# INSTR: jr t1
# INSTR-ZICFILP: auipc t2, 0
# INSTR-ZICFILP: jr t2
-# FIXUP: fixup A - offset: 0, value: f1, kind:
tail ra
# RELOC: R_RISCV_CALL_PLT ra 0x0
@@ -69,7 +57,6 @@ tail ra
# INSTR: jr t1
# INSTR-ZICFILP: auipc t2, 0
# INSTR-ZICFILP: jr t2
-# FIXUP: fixup A - offset: 0, value: ra, kind:
tail foo at plt
# RELOC: R_RISCV_CALL_PLT foo 0x0
@@ -77,4 +64,3 @@ tail foo at plt
# INSTR: jr t1
# INSTR-ZICFILP: auipc t2, 0
# INSTR-ZICFILP: jr t2
-# FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_call_plt
diff --git a/llvm/test/MC/RISCV/xqcilb-relocations.s b/llvm/test/MC/RISCV/xqcilb-relocations.s
index 92e543d94f6b6..66f052283812e 100644
--- a/llvm/test/MC/RISCV/xqcilb-relocations.s
+++ b/llvm/test/MC/RISCV/xqcilb-relocations.s
@@ -1,11 +1,10 @@
# RUN: llvm-mc -triple riscv32 -mattr=+experimental-xqcilb %s -show-encoding \
-# RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
+# RUN: | FileCheck -check-prefix=INSTR %s
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-xqcilb %s -o %t.o
# RUN: llvm-readobj -r %t.o | FileCheck -check-prefix=RELOC %s
# Check prefixes:
# RELOC - Check the relocation in the object.
-# FIXUP - Check the fixup on the instruction.
# INSTR - Check the instruction is handled properly by the ASMPrinter.
.text
@@ -13,32 +12,26 @@
qc.e.j foo
# RELOC: R_RISCV_CUSTOM195 foo 0x0
# INSTR: qc.e.j foo
-# FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_qc_e_jump_plt
qc.e.jal foo
# RELOC: R_RISCV_CUSTOM195 foo 0x0
# INSTR: qc.e.jal foo
-# FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_qc_e_jump_plt
# Check that a label in a
diff erent section is handled similar to an undefined symbol
qc.e.j .bar
# RELOC: R_RISCV_CUSTOM195 .bar 0x0
# INSTR: qc.e.j .bar
-# FIXUP: fixup A - offset: 0, value: .bar, kind: fixup_riscv_qc_e_jump_plt
qc.e.jal .bar
# RELOC: R_RISCV_CUSTOM195 .bar 0x0
# INSTR: qc.e.jal .bar
-# FIXUP: fixup A - offset: 0, value: .bar, kind: fixup_riscv_qc_e_jump_plt
# Check that jumps to a defined symbol are handled correctly
qc.e.j .L1
# INSTR:qc.e.j .L1
-# FIXUP: fixup A - offset: 0, value: .L1, kind: fixup_riscv_qc_e_jump_plt
qc.e.jal .L1
# INSTR:qc.e.jal .L1
-# FIXUP: fixup A - offset: 0, value: .L1, kind: fixup_riscv_qc_e_jump_plt
.L1:
ret
diff --git a/llvm/test/MC/RISCV/xqcili-relocations.s b/llvm/test/MC/RISCV/xqcili-relocations.s
index b0a3f3bae11d5..b7fcb405d27bb 100644
--- a/llvm/test/MC/RISCV/xqcili-relocations.s
+++ b/llvm/test/MC/RISCV/xqcili-relocations.s
@@ -1,11 +1,10 @@
# RUN: llvm-mc -triple riscv32 -mattr=+experimental-xqcili %s -show-encoding \
-# RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
+# RUN: | FileCheck -check-prefix=INSTR %s
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-xqcili %s -o %t.o
# RUN: llvm-readobj -r %t.o | FileCheck -check-prefix=RELOC %s
# Check prefixes:
# RELOC - Check the relocation in the object.
-# FIXUP - Check the fixup on the instruction.
# INSTR - Check the instruction is handled properly by the ASMPrinter.
.text
@@ -13,32 +12,26 @@
qc.li x4, %qc.abs20(foo)
# RELOC: R_RISCV_CUSTOM192 foo 0x0
# INSTR: qc.li tp, %qc.abs20(foo)
-# FIXUP: fixup A - offset: 0, value: %qc.abs20(foo), kind: fixup_riscv_qc_abs20_u
qc.e.li x5, foo
# RELOC: R_RISCV_CUSTOM194 foo 0x0
# INSTR: qc.e.li t0, foo
-# FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_qc_e_32
# Check that a label in a
diff erent section is handled similar to an undefined symbol
qc.li x9, %qc.abs20(.bar)
# RELOC: R_RISCV_CUSTOM192 .bar 0x0
# INSTR: qc.li s1, %qc.abs20(.bar)
-# FIXUP: fixup A - offset: 0, value: %qc.abs20(.bar), kind: fixup_riscv_qc_abs20_u
qc.e.li x8, .bar
# RELOC: R_RISCV_CUSTOM194 .bar 0x0
# INSTR: qc.e.li s0, .bar
-# FIXUP: fixup A - offset: 0, value: .bar, kind: fixup_riscv_qc_e_32
# Check that branches to a defined symbol are handled correctly
qc.li x7, %qc.abs20(.L1)
# INSTR: qc.li t2, %qc.abs20(.L1)
-# FIXUP: fixup A - offset: 0, value: %qc.abs20(.L1), kind: fixup_riscv_qc_abs20_u
qc.e.li x6, .L1
# INSTR: qc.e.li t1, .L1
-# FIXUP: fixup A - offset: 0, value: .L1, kind: fixup_riscv_qc_e_32
.L1:
ret
More information about the llvm-commits
mailing list