1// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj -mattr=+fp-armv8 < %s | llvm-objdump -r - | FileCheck %s 2 3 .file "<stdin>" 4 .text 5 .globl test_inline_modifier_L 6 .type test_inline_modifier_L,@function 7test_inline_modifier_L: // @test_inline_modifier_L 8// %bb.0: 9 //APP 10 add x0, x0, #:lo12:var_simple 11 //NO_APP 12 //APP 13 ldr x0, [x0, #:got_lo12:var_got] 14 //NO_APP 15 //APP 16 add x0, x0, #:tlsdesc_lo12:var_tlsgd 17 //NO_APP 18 //APP 19 add x0, x0, #:dtprel_lo12:var_tlsld 20 //NO_APP 21 //APP 22 ldr x0, [x0, #:gottprel_lo12:var_tlsie] 23 //NO_APP 24 //APP 25 add x0, x0, #:tprel_lo12:var_tlsle 26 //NO_APP 27 ret 28.Ltmp0: 29 .size test_inline_modifier_L, .Ltmp0-test_inline_modifier_L 30 31// CHECK: R_AARCH64_ADD_ABS_LO12_NC var_simple 32// CHECK: R_AARCH64_LD64_GOT_LO12_NC var_got 33// CHECK: R_AARCH64_TLSDESC_ADD_LO12 var_tlsgd 34// CHECK: R_AARCH64_TLSLD_ADD_DTPREL_LO12 var_tlsld 35// CHECK: R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC var_tlsie 36// CHECK: R_AARCH64_TLSLE_ADD_TPREL_LO12 var_tlsle 37 38 .globl test_inline_modifier_G 39 .type test_inline_modifier_G,@function 40test_inline_modifier_G: // @test_inline_modifier_G 41// %bb.0: 42 //APP 43 add x0, x0, #:dtprel_hi12:var_tlsld, lsl #12 44 //NO_APP 45 //APP 46 add x0, x0, #:tprel_hi12:var_tlsle, lsl #12 47 //NO_APP 48 ret 49.Ltmp1: 50 .size test_inline_modifier_G, .Ltmp1-test_inline_modifier_G 51 52// CHECK: R_AARCH64_TLSLD_ADD_DTPREL_HI12 var_tlsld 53// CHECK: R_AARCH64_TLSLE_ADD_TPREL_HI12 var_tlsle 54 55 .globl test_inline_modifier_A 56 .type test_inline_modifier_A,@function 57test_inline_modifier_A: // @test_inline_modifier_A 58// %bb.0: 59 //APP 60 adrp x0, var_simple 61 //NO_APP 62 //APP 63 adrp x0, :got:var_got 64 //NO_APP 65 //APP 66 adrp x0, :tlsdesc:var_tlsgd 67 //NO_APP 68 //APP 69 adrp x0, :gottprel:var_tlsie 70 //NO_APP 71 //APP 72 ldr x0, :got:var_got 73 //NO_APP 74 ret 75.Ltmp2: 76 .size test_inline_modifier_A, .Ltmp2-test_inline_modifier_A 77// CHECK: R_AARCH64_ADR_PREL_PG_HI21 var_simple 78// CHECK: R_AARCH64_ADR_GOT_PAGE var_got 79// CHECK: R_AARCH64_TLSDESC_ADR_PAGE21 var_tlsgd 80// CHECK: R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 var_tlsie 81// CHECK: R_AARCH64_GOT_LD_PREL19 var_got 82 83 .globl test_inline_modifier_wx 84 .type test_inline_modifier_wx,@function 85test_inline_modifier_wx: // @test_inline_modifier_wx 86// %bb.0: 87 mov w2, w0 88 //APP 89 add w2, w2, w2 90 //NO_APP 91 mov w2, w0 92 //APP 93 add w2, w2, w2 94 //NO_APP 95 //APP 96 add x0, x0, x0 97 //NO_APP 98 mov x0, x1 99 //APP 100 add x0, x0, x0 101 //NO_APP 102 mov x0, x1 103 //APP 104 add w0, w0, w0 105 //NO_APP 106 //APP 107 add x1, x1, x1 108 //NO_APP 109 //APP 110 add w0, wzr, wzr 111 //NO_APP 112 //APP 113 add x0, xzr, xzr 114 //NO_APP 115 ret 116.Ltmp3: 117 .size test_inline_modifier_wx, .Ltmp3-test_inline_modifier_wx 118 119 .globl test_inline_modifier_bhsdq 120 .type test_inline_modifier_bhsdq,@function 121test_inline_modifier_bhsdq: // @test_inline_modifier_bhsdq 122// %bb.0: 123 //APP 124 ldr b0, [sp] 125 //NO_APP 126 //APP 127 ldr h0, [sp] 128 //NO_APP 129 //APP 130 ldr s0, [sp] 131 //NO_APP 132 //APP 133 ldr d0, [sp] 134 //NO_APP 135 //APP 136 ldr q0, [sp] 137 //NO_APP 138 //APP 139 ldr b0, [sp] 140 //NO_APP 141 //APP 142 ldr h0, [sp] 143 //NO_APP 144 //APP 145 ldr s0, [sp] 146 //NO_APP 147 //APP 148 ldr d0, [sp] 149 //NO_APP 150 //APP 151 ldr q0, [sp] 152 //NO_APP 153 ret 154.Ltmp4: 155 .size test_inline_modifier_bhsdq, .Ltmp4-test_inline_modifier_bhsdq 156 157 .globl test_inline_modifier_c 158 .type test_inline_modifier_c,@function 159test_inline_modifier_c: // @test_inline_modifier_c 160// %bb.0: 161 //APP 162 adr x0, 3 163 //NO_APP 164 ret 165.Ltmp5: 166 .size test_inline_modifier_c, .Ltmp5-test_inline_modifier_c 167 168 .hidden var_simple // @var_simple 169 .type var_simple,@object 170 .bss 171 .globl var_simple 172 .align 2 173var_simple: 174 .word 0 // 0x0 175 .size var_simple, 4 176 177 .type var_got,@object // @var_got 178 .globl var_got 179 .align 2 180var_got: 181 .word 0 // 0x0 182 .size var_got, 4 183 184 .type var_tlsgd,@object // @var_tlsgd 185 .section .tbss,"awT",@nobits 186 .globl var_tlsgd 187 .align 2 188var_tlsgd: 189 .word 0 // 0x0 190 .size var_tlsgd, 4 191 192 .type var_tlsld,@object // @var_tlsld 193 .globl var_tlsld 194 .align 2 195var_tlsld: 196 .word 0 // 0x0 197 .size var_tlsld, 4 198 199 .type var_tlsie,@object // @var_tlsie 200 .globl var_tlsie 201 .align 2 202var_tlsie: 203 .word 0 // 0x0 204 .size var_tlsie, 4 205 206 .type var_tlsle,@object // @var_tlsle 207 .globl var_tlsle 208 .align 2 209var_tlsle: 210 .word 0 // 0x0 211 .size var_tlsle, 4 212 213 214