• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1.text
2.file 1 "inserted_by_delocate.c"
3.loc 1 1 0
4BORINGSSL_bcm_text_start:
5	.text
6.Lfoo_local_target:
7foo:
8	# leaq of OPENSSL_ia32cap_P is supported.
9# WAS leaq OPENSSL_ia32cap_P(%rip), %r11
10	leaq -128(%rsp), %rsp
11	pushfq
12	leaq	OPENSSL_ia32cap_addr_delta(%rip), %r11
13	addq	(%r11), %r11
14	popfq
15	leaq 128(%rsp), %rsp
16
17	# As is the equivalent GOTPCREL movq.
18# WAS movq OPENSSL_ia32cap_P@GOTPCREL(%rip), %r12
19	leaq -128(%rsp), %rsp
20	pushfq
21	leaq	OPENSSL_ia32cap_addr_delta(%rip), %r12
22	addq	(%r12), %r12
23	popfq
24	leaq 128(%rsp), %rsp
25
26	# And a non-movq instruction via the GOT.
27# WAS orq OPENSSL_ia32cap_P@GOTPCREL(%rip), %r12
28	leaq -128(%rsp), %rsp
29	pushq %rax
30	pushfq
31	leaq	OPENSSL_ia32cap_addr_delta(%rip), %rax
32	addq	(%rax), %rax
33	popfq
34	orq %rax, %r12
35	popq %rax
36	leaq 128(%rsp), %rsp
37
38	# ... which targets the default temp register
39# WAS orq OPENSSL_ia32cap_P@GOTPCREL(%rip), %rax
40	leaq -128(%rsp), %rsp
41	pushq %rbx
42	pushfq
43	leaq	OPENSSL_ia32cap_addr_delta(%rip), %rbx
44	addq	(%rbx), %rbx
45	popfq
46	orq %rbx, %rax
47	popq %rbx
48	leaq 128(%rsp), %rsp
49
50	# Test that GOTPCREL accesses get translated. They are handled
51	# differently for local and external symbols.
52
53# WAS pushq stderr@GOTPCREL(%rip)
54	pushq %rax
55	leaq -128(%rsp), %rsp
56	pushf
57	leaq stderr_GOTPCREL_external(%rip), %rax
58	addq (%rax), %rax
59	movq (%rax), %rax
60	popf
61	leaq	128(%rsp), %rsp
62	xchg %rax, (%rsp)
63# WAS pushq foo@GOTPCREL(%rip)
64	pushq %rax
65	leaq	.Lfoo_local_target(%rip), %rax
66	xchg %rax, (%rsp)
67
68# WAS movq stderr@GOTPCREL(%rip), %r11
69	leaq -128(%rsp), %rsp
70	pushf
71	leaq stderr_GOTPCREL_external(%rip), %r11
72	addq (%r11), %r11
73	movq (%r11), %r11
74	popf
75	leaq	128(%rsp), %rsp
76# WAS movq foo@GOTPCREL(%rip), %r11
77	leaq	.Lfoo_local_target(%rip), %r11
78
79# WAS vmovq stderr@GOTPCREL(%rip), %xmm0
80	leaq -128(%rsp), %rsp
81	pushq %rax
82	pushf
83	leaq stderr_GOTPCREL_external(%rip), %rax
84	addq (%rax), %rax
85	movq (%rax), %rax
86	popf
87	vmovq %rax, %xmm0
88	popq %rax
89	leaq 128(%rsp), %rsp
90# WAS vmovq foo@GOTPCREL(%rip), %xmm0
91	leaq -128(%rsp), %rsp
92	pushq %rax
93	leaq	.Lfoo_local_target(%rip), %rax
94	vmovq %rax, %xmm0
95	popq %rax
96	leaq 128(%rsp), %rsp
97
98# WAS cmoveq stderr@GOTPCREL(%rip), %r11
99	jne 999f
100	leaq -128(%rsp), %rsp
101	pushf
102	leaq stderr_GOTPCREL_external(%rip), %r11
103	addq (%r11), %r11
104	movq (%r11), %r11
105	popf
106	leaq	128(%rsp), %rsp
107999:
108# WAS cmoveq foo@GOTPCREL(%rip), %r11
109	jne 999f
110	leaq	.Lfoo_local_target(%rip), %r11
111999:
112# WAS cmovneq stderr@GOTPCREL(%rip), %r11
113	je 999f
114	leaq -128(%rsp), %rsp
115	pushf
116	leaq stderr_GOTPCREL_external(%rip), %r11
117	addq (%r11), %r11
118	movq (%r11), %r11
119	popf
120	leaq	128(%rsp), %rsp
121999:
122# WAS cmovneq foo@GOTPCREL(%rip), %r11
123	je 999f
124	leaq	.Lfoo_local_target(%rip), %r11
125999:
126
127# WAS movsd foo@GOTPCREL(%rip), %xmm0
128	leaq -128(%rsp), %rsp
129	pushq %rax
130	leaq	.Lfoo_local_target(%rip), %rax
131	movq %rax, %xmm0
132	popq %rax
133	leaq 128(%rsp), %rsp
134# WAS vmovsd foo@GOTPCREL(%rip), %xmm0
135	leaq -128(%rsp), %rsp
136	pushq %rax
137	leaq	.Lfoo_local_target(%rip), %rax
138	vmovq %rax, %xmm0
139	popq %rax
140	leaq 128(%rsp), %rsp
141
142	# movsd without arguments should be left as-is.
143	movsd
144
145	# Synthesized symbols do not use the GOT.
146# WAS movq BORINGSSL_bcm_text_start@GOTPCREL(%rip), %r11
147	leaq	BORINGSSL_bcm_text_start(%rip), %r11
148# WAS movq foobar_bss_get@GOTPCREL(%rip), %r11
149	leaq	foobar_bss_get(%rip), %r11
150# WAS movq OPENSSL_ia32cap_get@GOTPCREL(%rip), %r11
151	leaq	.LOPENSSL_ia32cap_get_local_target(%rip), %r11
152
153	# Transforming moves run the transform in-place after the load.
154# WAS vpbroadcastq stderr@GOTPCREL(%rip), %xmm0
155	leaq -128(%rsp), %rsp
156	pushq %rax
157	pushf
158	leaq stderr_GOTPCREL_external(%rip), %rax
159	addq (%rax), %rax
160	movq (%rax), %rax
161	popf
162	vmovq %rax, %xmm0
163	popq %rax
164	leaq 128(%rsp), %rsp
165	vpbroadcastq %xmm0, %xmm0
166# WAS vpbroadcastq foo@GOTPCREL(%rip), %xmm0
167	leaq -128(%rsp), %rsp
168	pushq %rax
169	leaq	.Lfoo_local_target(%rip), %rax
170	vmovq %rax, %xmm0
171	popq %rax
172	leaq 128(%rsp), %rsp
173	vpbroadcastq %xmm0, %xmm0
174
175.comm foobar,64,32
176.text
177.loc 1 2 0
178BORINGSSL_bcm_text_end:
179.type foobar_bss_get, @function
180foobar_bss_get:
181	leaq	foobar(%rip), %rax
182	ret
183.type stderr_GOTPCREL_external, @object
184.size stderr_GOTPCREL_external, 8
185stderr_GOTPCREL_external:
186	.long stderr@GOTPCREL
187	.long 0
188.type OPENSSL_ia32cap_get, @function
189.globl OPENSSL_ia32cap_get
190.LOPENSSL_ia32cap_get_local_target:
191OPENSSL_ia32cap_get:
192	leaq OPENSSL_ia32cap_P(%rip), %rax
193	ret
194.extern OPENSSL_ia32cap_P
195.type OPENSSL_ia32cap_addr_delta, @object
196.size OPENSSL_ia32cap_addr_delta, 8
197OPENSSL_ia32cap_addr_delta:
198.quad OPENSSL_ia32cap_P-OPENSSL_ia32cap_addr_delta
199.type BORINGSSL_bcm_text_hash, @object
200.size BORINGSSL_bcm_text_hash, 64
201BORINGSSL_bcm_text_hash:
202.byte 0xae
203.byte 0x2c
204.byte 0xea
205.byte 0x2a
206.byte 0xbd
207.byte 0xa6
208.byte 0xf3
209.byte 0xec
210.byte 0x97
211.byte 0x7f
212.byte 0x9b
213.byte 0xf6
214.byte 0x94
215.byte 0x9a
216.byte 0xfc
217.byte 0x83
218.byte 0x68
219.byte 0x27
220.byte 0xcb
221.byte 0xa0
222.byte 0xa0
223.byte 0x9f
224.byte 0x6b
225.byte 0x6f
226.byte 0xde
227.byte 0x52
228.byte 0xcd
229.byte 0xe2
230.byte 0xcd
231.byte 0xff
232.byte 0x31
233.byte 0x80
234.byte 0xa2
235.byte 0xd4
236.byte 0xc3
237.byte 0x66
238.byte 0xf
239.byte 0xc2
240.byte 0x6a
241.byte 0x7b
242.byte 0xf4
243.byte 0xbe
244.byte 0x39
245.byte 0xa2
246.byte 0xd7
247.byte 0x25
248.byte 0xdb
249.byte 0x21
250.byte 0x98
251.byte 0xe9
252.byte 0xd5
253.byte 0x53
254.byte 0xbf
255.byte 0x5c
256.byte 0x32
257.byte 0x6
258.byte 0x83
259.byte 0x34
260.byte 0xc
261.byte 0x65
262.byte 0x89
263.byte 0x52
264.byte 0xbd
265.byte 0x1f
266