brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 8cbda28 Raw
57 lines · plain
1// RUN: llvm-mc -triple=powerpc64-pc-linux -filetype=obj %s -o - | \2// RUN: llvm-readobj -r - | FileCheck %s3 4// Test correct relocation generation for thread-local storage using5// the general dynamic model and integrated assembly.6 7 8	.file	"/home/espindola/llvm/llvm/test/CodeGen/PowerPC/tls-gd-obj.ll"9	.text10	.globl	main11	.align	212	.type	main,@function13	.section	.opd,"aw",@progbits14main:                                   # @main15	.align	316	.quad	.L.main17	.quad	.TOC.@tocbase18	.quad	019	.text20.L.main:21# %bb.0:                                # %entry22	addis 3, 2, a@got@tlsgd@ha23	addi 3, 3, a@got@tlsgd@l24	li 4, 025	bl __tls_get_addr(a@tlsgd)26	nop27	stw 4, -4(1)28	lwz 4, 0(3)29	extsw 3, 430	blr31	.long	032	.quad	033.Ltmp0:34	.size	main, .Ltmp0-.L.main35 36	.type	a,@object               # @a37	.section	.tbss,"awT",@nobits38	.globl	a39	.align	240a:41	.long	0                       # 0x042	.size	a, 443 44 45// Verify generation of R_PPC64_GOT_TLSGD16_HA, R_PPC64_GOT_TLSGD16_LO,46// and R_PPC64_TLSGD for accessing external variable a, and R_PPC64_REL2447// for the call to __tls_get_addr.48//49// CHECK: Relocations [50// CHECK:   Section {{.*}} .rela.text {51// CHECK:     0x{{[0-9,A-F]+}} R_PPC64_GOT_TLSGD16_HA a52// CHECK:     0x{{[0-9,A-F]+}} R_PPC64_GOT_TLSGD16_LO a53// CHECK:     0x{{[0-9,A-F]+}} R_PPC64_TLSGD          a54// CHECK:     0x{{[0-9,A-F]+}} R_PPC64_REL24          __tls_get_addr55// CHECK:   }56// CHECK: ]57