binutils-gdb/ld/testsuite/ld-powerpc/tlsopt4_32.s
Alan Modra 663a1470e1 bfd/
* elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where
	old-style __tls_get_addr calls without marker relocs don't match
	their arg setup insn one for one.  If such mismatches are found
	report the reloc and don't do any tls optimization.
	* elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
ld/testsuite/
	* ld-powerpc/tlsmark.s: Delete non-optimizable section.
	* ld-powerpc/tlsmark32.s: Likewise.
	* ld-powerpc/tlsmark.d: Adjust to suit.
	* ld-powerpc/tlsmark32.d: Likewise.
	* ld-powerpc/tlsopt1.d, * ld-powerpc/tlsopt1.s: New.
	* ld-powerpc/tlsopt2.d, * ld-powerpc/tlsopt2.s: New.
	* ld-powerpc/tlsopt3.d, * ld-powerpc/tlsopt3.s: New.
	* ld-powerpc/tlsopt4.d, * ld-powerpc/tlsopt4.s: New.
	* ld-powerpc/tlsopt1_32.d, * ld-powerpc/tlsopt1_32.s: New.
	* ld-powerpc/tlsopt2_32.d, * ld-powerpc/tlsopt2_32.s: New.
	* ld-powerpc/tlsopt3_32.d, * ld-powerpc/tlsopt3_32.s: New.
	* ld-powerpc/tlsopt4_32.d, * ld-powerpc/tlsopt4_32.s: New.
	* ld-powerpc/powerpc.exp: Run new tests.
2011-03-23 15:25:06 +00:00

35 lines
524 B
ArmAsm

.section ".tbss","awT",@nobits
.global gd0
.align 3
gd0: .space 8
.section ".opt1", "ax", %progbits
addi 3,13,gd@got@tlsgd
cmpwi 4,0
beq 0f
bl __tls_get_addr(gd@tlsgd)
b 1f
0:
bl __tls_get_addr(gd@tlsgd)
1:
.section ".opt2", "ax", %progbits
addi 3,13,gd@got@tlsgd
cmpwi 4,0
beq 0f
addi 3,13,gd@got@tlsgd
0:
bl __tls_get_addr(gd@tlsgd)
.section ".opt3", "ax", %progbits
addi 3,13,gd@got@tlsgd
b 0f
addi 3,13,gd0@got@tlsgd
b 1f
0:
bl __tls_get_addr(gd@tlsgd)
b 2f
1:
bl __tls_get_addr(gd0@tlsgd)
2: