brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 730fc69 Raw
77 lines · plain
1// RUN: %clang -c -o %t %s2// RUN: %llvm_jitlink %t3//4// Test that basic ELF TLS work by adding together TLSs with values5// 0, 1, and -1, and returning the result (0 for success). This setup6// tests both zero-initialized (.tbss) and non-zero-initialized7// (.tdata) sections.8 9	.text10	.abiversion 211	.file	"tlstest.cpp"12	.globl	main                            # -- Begin function main13	.p2align	414	.type	main,@function15main:                                   # @main16.Lfunc_begin0:17.Lfunc_gep0:18	addis 2, 12, .TOC.-.Lfunc_gep0@ha19	addi 2, 2, .TOC.-.Lfunc_gep0@l20.Lfunc_lep0:21	.localentry	main, .Lfunc_lep0-.Lfunc_gep022# %bb.0:                                # %entry23	mflr 024	std 30, -16(1)                          # 8-byte Folded Spill25	stdu 1, -48(1)26	addis 3, 2, x@got@tlsgd@ha27	std 0, 64(1)28	addi 3, 3, x@got@tlsgd@l29	bl __tls_get_addr(x@tlsgd)30	nop31	lwz 30, 0(3)32	addis 3, 2, y@got@tlsgd@ha33	addi 3, 3, y@got@tlsgd@l34	bl __tls_get_addr(y@tlsgd)35	nop36	lwz 3, 0(3)37	addis 4, 2, z@got@tlsgd@ha38	add 30, 3, 3039	addi 3, 4, z@got@tlsgd@l40	bl __tls_get_addr(z@tlsgd)41	nop42	lwz 3, 0(3)43	add 3, 30, 344	extsw 3, 345	addi 1, 1, 4846	ld 0, 16(1)47	ld 30, -16(1)                           # 8-byte Folded Reload48	mtlr 049	blr50	.long	051	.quad	052.Lfunc_end0:53	.size	main, .Lfunc_end0-.Lfunc_begin054                                        # -- End function55	.type	x,@object                       # @x56	.section	.tbss,"awT",@nobits57	.globl	x58	.p2align	2, 0x059x:60	.long	0                               # 0x061	.size	x, 462 63	.type	y,@object                       # @y64	.section	.tdata,"awT",@progbits65	.globl	y66	.p2align	2, 0x067y:68	.long	1                               # 0x169	.size	y, 470 71	.type	z,@object                       # @z72	.globl	z73	.p2align	2, 0x074z:75	.long	4294967295                      # 0xffffffff76	.size	z, 477