• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_NC 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	ret
72.Ltmp2:
73	.size	test_inline_modifier_A, .Ltmp2-test_inline_modifier_A
74// CHECK: R_AARCH64_ADR_PREL_PG_HI21 var_simple
75// CHECK: R_AARCH64_ADR_GOT_PAGE var_got
76// CHECK: R_AARCH64_TLSDESC_ADR_PAGE21 var_tlsgd
77// CHECK: R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 var_tlsie
78
79	.globl	test_inline_modifier_wx
80	.type	test_inline_modifier_wx,@function
81test_inline_modifier_wx:                // @test_inline_modifier_wx
82// BB#0:
83	mov	 w2, w0
84	//APP
85	add w2, w2, w2
86	//NO_APP
87	mov	 w2, w0
88	//APP
89	add w2, w2, w2
90	//NO_APP
91	//APP
92	add x0, x0, x0
93	//NO_APP
94	mov	 x0, x1
95	//APP
96	add x0, x0, x0
97	//NO_APP
98	mov	 x0, x1
99	//APP
100	add w0, w0, w0
101	//NO_APP
102	//APP
103	add x1, x1, x1
104	//NO_APP
105	//APP
106	add w0, wzr, wzr
107	//NO_APP
108	//APP
109	add x0, xzr, xzr
110	//NO_APP
111	ret
112.Ltmp3:
113	.size	test_inline_modifier_wx, .Ltmp3-test_inline_modifier_wx
114
115	.globl	test_inline_modifier_bhsdq
116	.type	test_inline_modifier_bhsdq,@function
117test_inline_modifier_bhsdq:             // @test_inline_modifier_bhsdq
118// BB#0:
119	//APP
120	ldr b0, [sp]
121	//NO_APP
122	//APP
123	ldr h0, [sp]
124	//NO_APP
125	//APP
126	ldr s0, [sp]
127	//NO_APP
128	//APP
129	ldr d0, [sp]
130	//NO_APP
131	//APP
132	ldr q0, [sp]
133	//NO_APP
134	//APP
135	ldr b0, [sp]
136	//NO_APP
137	//APP
138	ldr h0, [sp]
139	//NO_APP
140	//APP
141	ldr s0, [sp]
142	//NO_APP
143	//APP
144	ldr d0, [sp]
145	//NO_APP
146	//APP
147	ldr q0, [sp]
148	//NO_APP
149	ret
150.Ltmp4:
151	.size	test_inline_modifier_bhsdq, .Ltmp4-test_inline_modifier_bhsdq
152
153	.globl	test_inline_modifier_c
154	.type	test_inline_modifier_c,@function
155test_inline_modifier_c:                 // @test_inline_modifier_c
156// BB#0:
157	//APP
158	adr x0, 3
159	//NO_APP
160	ret
161.Ltmp5:
162	.size	test_inline_modifier_c, .Ltmp5-test_inline_modifier_c
163
164	.hidden	var_simple              // @var_simple
165	.type	var_simple,@object
166	.bss
167	.globl	var_simple
168	.align	2
169var_simple:
170	.word	0                       // 0x0
171	.size	var_simple, 4
172
173	.type	var_got,@object         // @var_got
174	.globl	var_got
175	.align	2
176var_got:
177	.word	0                       // 0x0
178	.size	var_got, 4
179
180	.type	var_tlsgd,@object       // @var_tlsgd
181	.section	.tbss,"awT",@nobits
182	.globl	var_tlsgd
183	.align	2
184var_tlsgd:
185	.word	0                       // 0x0
186	.size	var_tlsgd, 4
187
188	.type	var_tlsld,@object       // @var_tlsld
189	.globl	var_tlsld
190	.align	2
191var_tlsld:
192	.word	0                       // 0x0
193	.size	var_tlsld, 4
194
195	.type	var_tlsie,@object       // @var_tlsie
196	.globl	var_tlsie
197	.align	2
198var_tlsie:
199	.word	0                       // 0x0
200	.size	var_tlsie, 4
201
202	.type	var_tlsle,@object       // @var_tlsle
203	.globl	var_tlsle
204	.align	2
205var_tlsle:
206	.word	0                       // 0x0
207	.size	var_tlsle, 4
208
209
210