binutils-gdb/ld/testsuite/ld-loongarch-elf/tls-relax-compatible-check-old.s
changjiachen 90827b4eef LoongArch: ld: Add support for tls le relax.
Add tls le relax related testsuites in ld.

The new test cases are mainly tested in three aspects:

1. tls le relax function correctness test.
2. tls le relax boundary check test.
3. tls le relax function compatibility test.

ld/testsuite/ChangeLog:

	* ld/testsuite/ld-loongarch-elf/relax.exp: Modify test.
	* ld/testsuite/ld-loongarch-elf/old-tls-le.s: New test.
	* ld/testsuite/ld-loongarch-elf/relax-bound-check-tls-le.s: Likewise.
	* ld/testsuite/ld-loongarch-elf/tls-relax-compatible-check-new.s: Likewise.
	* ld/testsuite/ld-loongarch-elf/relax-tls-le.s: Likewise.
	* ld/testsuite/ld-loongarch-elf/tls-relax-compatible-check-old.s: Likewise.
2023-12-29 15:11:01 +08:00

33 lines
702 B
ArmAsm

/* This test case mainly carries out ld compatibility test.
This test case is the old tls le instruction sequence,
which will be linked with tls-relax-compatible-check-new.s.
If the link is normal, it indicates that there is no
compatibility problem. */
.text
.globl older
.section .tbss,"awT",@nobits
.align 2
.type older, @object
.size older, 4
older:
.space 4
.text
.align 2
.globl old
.type old, @function
old:
.LFB0 = .
addi.d $r3,$r3,-16
st.d $r22,$r3,8
addi.d $r22,$r3,16
lu12i.w $r12,%le_hi20(older)
ori $r12,$r12,%le_lo12(older)
add.d $r12,$r12,$r2
addi.w $r13,$r0,1 # 0x1
stptr.w $r13,$r12,0
nop
or $r4,$r12,$r0
ld.d $r22,$r3,8
addi.d $r3,$r3,16
jr $r1