Skip to content

Commit 3cb21ed

Browse files
committed
some fixes accroding to SixWeining's review.
1 parent 0ff13d8 commit 3cb21ed

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

lld/test/ELF/loongarch-pc-hi20-lo12-got.s

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
# CHECK-NEXT: pcalau12i $a5, 2
2929
# CHECK-NEXT: ld.d $a5, $a6, -2048
3030

31-
# RUN: ld.lld a.o -T underflow-range.t -o a
32-
# RUN: llvm-objdump -d --no-show-raw-insn a | FileCheck --check-prefix=OUTRANGE %s
31+
# RUN: ld.lld a.o -T underflow-range.t -o a-underflow
32+
# RUN: llvm-objdump -d --no-show-raw-insn a-underflow | FileCheck --check-prefix=OUTRANGE %s
3333

34-
# RUN: ld.lld a.o -T overflow-range.t -o a
35-
# RUN: llvm-objdump -d --no-show-raw-insn a | FileCheck --check-prefix=OUTRANGE %s
34+
# RUN: ld.lld a.o -T overflow-range.t -o a-overflow
35+
# RUN: llvm-objdump -d --no-show-raw-insn a-overflow | FileCheck --check-prefix=OUTRANGE %s
3636

3737
# OUTRANGE: pcalau12i $a0, 1
3838
# OUTRANGE-NEXT: ld.d $a0, $a0, 0
@@ -44,7 +44,7 @@
4444
# UNPAIRED: pcalau12i $a0, 2
4545
# UNPAIRED-NEXT: b 8
4646
# UNPAIRED-NEXT: pcalau12i $a0, 2
47-
# UNPAIRED: ld.d $a0, $a0, -2048
47+
# UNPAIRED: ld.d $a0, $a0, -2048
4848

4949
## Relocations do not appear in pairs, no relaxations should be applied.
5050
# RUN: ld.lld lone-ldr.o -T within-range.t -o lone-ldr
@@ -84,12 +84,9 @@ SECTIONS {
8484
SECTIONS {
8585
.text 0x1000: { *(.text) }
8686
.got 0x2000: { *(.got) }
87-
.rodate 0x80000800 : { *(.rodata) } /* 0x1000+2GB-0x800 */
87+
.rodata 0x80000800 : { *(.rodata) } /* 0x1000+2GB-0x800 */
8888
}
8989

90-
## This linker script ensures that .rodata and .text are sufficiently (>4GB)
91-
## far apart so that the pcalau12i + ld pair cannot be relaxed to pcalau12i + add.
92-
9390
#--- a.s
9491
## Symbol 'x' is nonpreemptible, the optimization should be applied.
9592
.rodata

0 commit comments

Comments
 (0)