Skip to content

Commit 45509a8

Browse files
committed
M68,test: Remove CHECK lines for MCAsmStreamer's fixup output
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. The FIXUP code was likely copied from RISC-V, which has been cleaned up.
1 parent 6ec27f1 commit 45509a8

File tree

13 files changed

+13
-52
lines changed

13 files changed

+13
-52
lines changed

llvm/test/MC/M68k/Relaxations/PIC/branch.s

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
; RUN: llvm-mc -triple=m68k -motorola-integers -filetype=obj --position-independent < %s \
22
; RUN: | llvm-objdump -d - | FileCheck %s
33
; RUN: llvm-mc -triple m68k -show-encoding --position-independent %s -o - \
4-
; RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
4+
; RUN: | FileCheck -check-prefix=INSTR %s
55

66
; CHECK-LABEL: <TIGHT>:
77
TIGHT:
88
; CHECK: bra $7f
99
; INSTR: bra .LBB0_2 ; encoding: [0x60,A]
10-
; FIXUP: fixup A - offset: 1, value: .LBB0_2-1, kind: FK_PCRel_1
1110
bra .LBB0_2
1211
.space 0x7F ; i8::MAX
1312
.LBB0_2:
@@ -18,7 +17,6 @@ TIGHT:
1817
RELAXED:
1918
; CHECK: bra $82
2019
; INSTR: bra .LBB1_2 ; encoding: [0x60,A]
21-
; FIXUP: fixup A - offset: 1, value: .LBB1_2-1, kind: FK_PCRel_1
2220
bra .LBB1_2
2321
.space 0x80 ; Greater than i8::MAX
2422
.LBB1_2:
@@ -29,7 +27,6 @@ RELAXED:
2927
ZERO:
3028
; CHECK: bra $2
3129
; INSTR: bra .LBB3_1 ; encoding: [0x60,A]
32-
; FIXUP: fixup A - offset: 1, value: .LBB3_1-1, kind: FK_PCRel_1
3330
bra .LBB3_1
3431
.LBB3_1:
3532
add.l #0, %d0

llvm/test/MC/M68k/Relaxations/PIC/branch32.s

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; RUN: llvm-mc -triple=m68k --mcpu=M68020 -motorola-integers -filetype=obj --position-independent < %s \
22
; RUN: | llvm-objdump -d - | FileCheck %s
33
; RUN: llvm-mc -triple m68k --mcpu=M68020 -show-encoding --position-independent %s -o - \
4-
; RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
4+
; RUN: | FileCheck -check-prefix=INSTR %s
55

66
; Branch relocations are relaxed as part of object layout, so -show-encoding still
77
; shows them as 1-byte relocactions
@@ -10,7 +10,6 @@
1010
TIGHT:
1111
; CHECK: bra $7f
1212
; INSTR: bra .LBB0_2 ; encoding: [0x60,A]
13-
; FIXUP: fixup A - offset: 1, value: .LBB0_2-1, kind: FK_PCRel_1
1413
bra .LBB0_2
1514
.space 0x7F ; i8::MAX
1615
.LBB0_2:
@@ -21,7 +20,6 @@ TIGHT:
2120
RELAXED:
2221
; CHECK: bra $82
2322
; INSTR: bra .LBB1_2 ; encoding: [0x60,A]
24-
; FIXUP: fixup A - offset: 1, value: .LBB1_2-1, kind: FK_PCRel_1
2523
bra .LBB1_2
2624
.space 0x80 ; Greater than i8::MAX
2725
.LBB1_2:
@@ -34,7 +32,6 @@ RELAXED_32:
3432
; CHECK-NEXT: 00 00
3533
; CHECK-NEXT: 80 04
3634
; INSTR: bra .LBB2_1 ; encoding: [0x60,A]
37-
; FIXUP: fixup A - offset: 1, value: .LBB2_1-1, kind: FK_PCRel_1
3835
bra .LBB2_1
3936
.space 0x8000 ; Greater than i16::MAX.
4037
.LBB2_1:
@@ -45,7 +42,6 @@ RELAXED_32:
4542
ZERO:
4643
; CHECK: bra $2
4744
; INSTR: bra .LBB3_1 ; encoding: [0x60,A]
48-
; FIXUP: fixup A - offset: 1, value: .LBB3_1-1, kind: FK_PCRel_1
4945
bra .LBB3_1
5046
.LBB3_1:
5147
add.l #0, %d0

llvm/test/MC/M68k/Relaxations/branch32.s

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
; RUN: llvm-mc -triple=m68k --mcpu=M68020 -motorola-integers -filetype=obj < %s \
22
; RUN: | llvm-objdump -d - | FileCheck %s
33
; RUN: llvm-mc -triple m68k --mcpu=M68020 -show-encoding --position-independent %s -o - \
4-
; RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
4+
; RUN: | FileCheck -check-prefix=INSTR %s
55

66
; CHECK-LABEL: <TIGHT>:
77
TIGHT:
88
; CHECK: bra $7f
99
; INSTR: bra .LBB0_2 ; encoding: [0x60,A]
10-
; FIXUP: fixup A - offset: 1, value: .LBB0_2-1, kind: FK_PCRel_1
1110
bra .LBB0_2
1211
.space 0x7F ; i8::MAX
1312
.LBB0_2:
@@ -18,7 +17,6 @@ TIGHT:
1817
RELAXED:
1918
; CHECK: bra $82
2019
; INSTR: bra .LBB1_2 ; encoding: [0x60,A]
21-
; FIXUP: fixup A - offset: 1, value: .LBB1_2-1, kind: FK_PCRel_1
2220
bra .LBB1_2
2321
.space 0x80 ; Greater than i8::MAX
2422
.LBB1_2:
@@ -31,7 +29,6 @@ RELAXED_32:
3129
; CHECK-NEXT: 00 00
3230
; CHECK-NEXT: 80 04
3331
; INSTR: bra .LBB2_1 ; encoding: [0x60,A]
34-
; FIXUP: fixup A - offset: 1, value: .LBB2_1-1, kind: FK_PCRel_1
3532
bra .LBB2_1
3633
.space 0x8000 ; Greater than i16::MAX.
3734
.LBB2_1:
@@ -42,7 +39,6 @@ RELAXED_32:
4239
ZERO:
4340
; CHECK: bra $2
4441
; INSTR: bra .LBB3_1 ; encoding: [0x60,A]
45-
; FIXUP: fixup A - offset: 1, value: .LBB3_1-1, kind: FK_PCRel_1
4642
bra .LBB3_1
4743
.LBB3_1:
4844
add.l #0, %d0
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
; RUN: llvm-mc -triple m68k -filetype=obj --position-independent %s -o - \
22
; RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
33
; RUN: llvm-mc -triple m68k -show-encoding --position-independent %s -o - \
4-
; RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
4+
; RUN: | FileCheck -check-prefix=INSTR %s
55

66
; RELOC: R_68K_32 dst 0x0
77
; INSTR: move.l dst, %d0
8-
; FIXUP: fixup A - offset: 2, value: dst, kind: FK_Data_4
98
move.l dst, %d0
109

1110
; Relocating immediate values
1211

1312
; RELOC: R_68K_8 str8 0x0
1413
; INSTR: move.b #str8, (4,%sp)
15-
; FIXUP: fixup A - offset: 3, value: str8, kind: FK_Data_1
1614
move.b #str8, (4,%sp)
1715

1816
; RELOC: R_68K_16 str16 0x0
1917
; INSTR: move.w #str16, (4,%sp)
20-
; FIXUP: fixup A - offset: 2, value: str16, kind: FK_Data_2
2118
move.w #str16, (4,%sp)
2219

2320
; RELOC: R_68K_32 str32 0x0
2421
; INSTR: move.l #str32, (4,%sp)
25-
; FIXUP: fixup A - offset: 2, value: str32, kind: FK_Data_4
2622
move.l #str32, (4,%sp)
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
; RUN: llvm-mc -triple m68k -filetype=obj --position-independent %s -o - \
22
; RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
33
; RUN: llvm-mc -triple m68k -show-encoding --position-independent %s -o - \
4-
; RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
4+
; RUN: | FileCheck -check-prefix=INSTR %s
55

66
; RELOC: R_68K_GOTOFF8 dst1 0x0
77
; INSTR: move.l (dst1@GOTOFF,%a5,%d0), %d0
8-
; FIXUP: fixup A - offset: 3, value: dst1@GOTOFF, kind: FK_Data_1
98
move.l (dst1@GOTOFF,%a5,%d0), %d0
109

1110
; RELOC: R_68K_GOTOFF16 dst2 0x0
1211
; INSTR: move.l (dst2@GOTOFF,%a5), %d0
13-
; FIXUP: fixup A - offset: 2, value: dst2@GOTOFF, kind: FK_Data_2
1412
move.l (dst2@GOTOFF,%a5), %d0
1513

1614
; RELOC: R_68K_GOTPCREL16 dst3 0x0
1715
; INSTR: lea (dst3@GOTPCREL,%pc), %a5
18-
; FIXUP: fixup A - offset: 2, value: dst3@GOTPCREL, kind: FK_PCRel_2
1916
lea (dst3@GOTPCREL,%pc), %a5
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
; RUN: llvm-mc -triple m68k -filetype=obj --position-independent %s -o - \
22
; RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
33
; RUN: llvm-mc -triple m68k -show-encoding --position-independent %s -o - \
4-
; RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
4+
; RUN: | FileCheck -check-prefix=INSTR %s
55

66
; RELOC: R_68K_GOTPCREL8 dst1 0x1
77
; INSTR: move.l (dst1@GOTPCREL,%pc,%d0), %a0
8-
; FIXUP: fixup A - offset: 3, value: dst1@GOTPCREL+1, kind: FK_PCRel_1
98
move.l (dst1@GOTPCREL,%pc,%d0), %a0
109

1110
; RELOC: R_68K_GOTPCREL16 dst2 0x0
1211
; INSTR: move.l (dst2@GOTPCREL,%pc), %a0
13-
; FIXUP: fixup A - offset: 2, value: dst2@GOTPCREL, kind: FK_PCRel_2
1412
move.l (dst2@GOTPCREL,%pc), %a0
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
; RUN: llvm-mc -triple m68k -filetype=obj --position-independent %s -o - \
22
; RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
33
; RUN: llvm-mc -triple m68k -show-encoding --position-independent %s -o - \
4-
; RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
4+
; RUN: | FileCheck -check-prefix=INSTR %s
55

66
; RELOC: R_68K_PC8 dst1 0x1
77
; INSTR: move.l (dst1,%pc,%a0), %a0
8-
; FIXUP: fixup A - offset: 3, value: dst1+1, kind: FK_PCRel_1
98
move.l (dst1,%pc,%a0), %a0
109

1110
; RELOC: R_68K_PC16 dst2 0x0
1211
; INSTR: move.l (dst2,%pc), %a0
13-
; FIXUP: fixup A - offset: 2, value: dst2, kind: FK_PCRel_2
1412
move.l (dst2,%pc), %a0
1513

1614
; Shouldn't have any relocation
1715
; RELOC-NOT: R_68K_PC
1816
; INSTR: move.l (0,%pc), %a0
19-
; FIXUP-NOT: fixup
2017
move.l (0,%pc), %a0
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
; RUN: llvm-mc -triple m68k --mcpu=M68020 --position-independent -filetype=obj %s -o - \
22
; RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
33
; RUN: llvm-mc -triple m68k --mcpu=M68020 --position-independent -show-encoding %s -o - \
4-
; RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
4+
; RUN: | FileCheck -check-prefix=INSTR %s
55

66
; RELOC: R_68K_PLT16 target 0x0
77
; INSTR: jsr (target@PLT,%pc)
8-
; FIXUP: fixup A - offset: 2, value: target@PLT, kind: FK_PCRel_2
98
jsr (target@PLT,%pc)
109

1110
; RELOC: R_68K_PLT32 __tls_get_addr 0x0
1211
; INSTR: bsr.l __tls_get_addr@PLT
13-
; FIXUP: fixup A - offset: 2, value: __tls_get_addr@PLT, kind: FK_PCRel_4
1412
bsr.l __tls_get_addr@PLT
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
; RUN: llvm-mc -triple m68k -filetype=obj %s -o - \
22
; RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
33
; RUN: llvm-mc -triple m68k -show-encoding %s -o - \
4-
; RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
4+
; RUN: | FileCheck -check-prefix=INSTR %s
55

66
; RELOC: R_68K_32 dst 0x0
77
; INSTR: move.l dst, %d0
8-
; FIXUP: fixup A - offset: 2, value: dst, kind: FK_Data_4
98
move.l dst, %d0
109

1110
; Relocating immediate values
1211

1312
; RELOC: R_68K_8 str8 0x0
1413
; INSTR: move.b #str8, (4,%sp)
15-
; FIXUP: fixup A - offset: 3, value: str8, kind: FK_Data_1
1614
move.b #str8, (4,%sp)
1715

1816
; RELOC: R_68K_16 str16 0x0
1917
; INSTR: move.w #str16, (4,%sp)
20-
; FIXUP: fixup A - offset: 2, value: str16, kind: FK_Data_2
2118
move.w #str16, (4,%sp)
2219

2320
; RELOC: R_68K_32 str32 0x0
2421
; INSTR: move.l #str32, (4,%sp)
25-
; FIXUP: fixup A - offset: 2, value: str32, kind: FK_Data_4
2622
move.l #str32, (4,%sp)
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
; RUN: llvm-mc -triple m68k -filetype=obj %s -o - \
22
; RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
33
; RUN: llvm-mc -triple m68k -show-encoding %s -o - \
4-
; RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
4+
; RUN: | FileCheck -check-prefix=INSTR %s
55

66
; RELOC: R_68K_GOTOFF8 dst1 0x0
77
; INSTR: move.l (dst1@GOTOFF,%a5,%d0), %d0
8-
; FIXUP: fixup A - offset: 3, value: dst1@GOTOFF, kind: FK_Data_1
98
move.l (dst1@GOTOFF,%a5,%d0), %d0
109

1110
; RELOC: R_68K_GOTOFF16 dst2 0x0
1211
; INSTR: move.l (dst2@GOTOFF,%a5), %d0
13-
; FIXUP: fixup A - offset: 2, value: dst2@GOTOFF, kind: FK_Data_2
1412
move.l (dst2@GOTOFF,%a5), %d0
1513

1614
; RELOC: R_68K_GOTPCREL16 dst3 0x0
1715
; INSTR: lea (dst3@GOTPCREL,%pc), %a5
18-
; FIXUP: fixup A - offset: 2, value: dst3@GOTPCREL, kind: FK_PCRel_2
1916
lea (dst3@GOTPCREL,%pc), %a5

0 commit comments

Comments
 (0)