[InstCombine] Signed saturation patterns
[llvm-core.git] / test / MC / PowerPC / tls-gd-obj.s
blob66c8fa0138bd65c0b929d6dbd8f0eefe0748967f
1 // RUN: llvm-mc -triple=powerpc64-pc-linux -filetype=obj %s -o - | \
2 // RUN: llvm-readobj -r | FileCheck %s
4 // Test correct relocation generation for thread-local storage using
5 // the general dynamic model and integrated assembly.
8 .file "/home/espindola/llvm/llvm/test/CodeGen/PowerPC/tls-gd-obj.ll"
9 .text
10 .globl main
11 .align 2
12 .type main,@function
13 .section .opd,"aw",@progbits
14 main: # @main
15 .align 3
16 .quad .L.main
17 .quad .TOC.@tocbase
18 .quad 0
19 .text
20 .L.main:
21 # %bb.0: # %entry
22 addis 3, 2, a@got@tlsgd@ha
23 addi 3, 3, a@got@tlsgd@l
24 li 4, 0
25 bl __tls_get_addr(a@tlsgd)
26 nop
27 stw 4, -4(1)
28 lwz 4, 0(3)
29 extsw 3, 4
30 blr
31 .long 0
32 .quad 0
33 .Ltmp0:
34 .size main, .Ltmp0-.L.main
36 .type a,@object # @a
37 .section .tbss,"awT",@nobits
38 .globl a
39 .align 2
41 .long 0 # 0x0
42 .size a, 4
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_REL24
47 // for the call to __tls_get_addr.
49 // CHECK: Relocations [
50 // CHECK: Section {{.*}} .rela.text {
51 // CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TLSGD16_HA a
52 // CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TLSGD16_LO a
53 // CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TLSGD a
54 // CHECK: 0x{{[0-9,A-F]+}} R_PPC64_REL24 __tls_get_addr
55 // CHECK: }
56 // CHECK: ]