[ARM] Adjust how NEON shifts are lowered
[llvm-core.git] / test / tools / llvm-readobj / ARM / unwind.s
blobef17118283b8fd343c03212d5ab38d19ff634c15
1 @ RUN: llvm-mc -triple armv7-linux-eabi -filetype obj %s -o %t
2 @ RUN: llvm-readobj -u %t | FileCheck --check-prefixes=CHECK,SYM %s
4 @@ If .symtab doesn't exist, we can still dump some information.
5 @ RUN: llvm-objcopy --allow-broken-links --strip-all %t - | llvm-readobj -u - | FileCheck %s
7 .syntax unified
9 .cpu cortex-a8
10 .fpu neon
12 .section .personality
14 .type __personality,%function
15 __personality:
16 .fnstart
17 bkpt
18 .fnend
21 .section .personality0
23 .type personality0,%function
24 personality0:
25 .fnstart
26 bx lr
27 .fnend
30 .section .personality1
32 .type personality1,%function
33 personality1:
34 .fnstart
35 .pad #0x100
36 sub sp, sp, #0x100
37 .save {r0-r11}
38 push {r0-r11}
39 pop {r0-r11}
40 add sp, sp, #0x100
41 bx lr
42 .fnend
45 .section .custom_personality
47 .type custom_personality,%function
48 custom_personality:
49 .fnstart
50 .personality __personality
51 bx lr
52 .fnend
55 .section .opcodes
57 .type opcodes,%function
58 opcodes:
59 .fnstart
60 .vsave {d8-d12}
61 vpush {d8-d12}
62 vpop {d8-d12}
63 bx lr
64 .fnend
67 .section .multiple
69 .type function0,%function
70 function0:
71 .fnstart
72 bx lr
73 .fnend
75 .type function1,%function
76 function1:
77 .fnstart
78 .personality __personality
79 bx lr
80 .fnend
82 .type function2,%function
83 function2:
84 .fnstart
85 bx lr
86 .fnend
88 .section .raw
90 .type raw,%function
91 .thumb_func
92 raw:
93 .fnstart
94 .unwind_raw 12, 0x02
95 .unwind_raw -12, 0x42
96 .unwind_raw 0, 0x80, 0x00
97 .unwind_raw 4, 0x81, 0x00
98 .unwind_raw 4, 0x80, 0x01
99 .unwind_raw 8, 0x80, 0xc0
100 .unwind_raw 12, 0x84, 0xc0
101 .unwind_raw 0, 0x91
102 .unwind_raw 8, 0xa1
103 .unwind_raw 12, 0xa9
104 .unwind_raw 0, 0xb0
105 .unwind_raw 4, 0xb1, 0x01
106 .unwind_raw 0xa04, 0xb2, 0x80, 0x04
107 .unwind_raw 24, 0xb3, 0x12
108 .unwind_raw 24, 0xba
109 .unwind_raw 24, 0xc2
110 .unwind_raw 24, 0xc6, 0x02
111 .unwind_raw 8, 0xc7, 0x03
112 .unwind_raw 24, 0xc8, 0x02
113 .unwind_raw 24, 0xc9, 0x02
114 .unwind_raw 64, 0xd7
115 .fnend
117 .section .spare
119 .type spare,%function
120 spare:
121 .fnstart
122 .unwind_raw 4, 0x00
123 .unwind_raw -4, 0x40
124 .unwind_raw 0, 0x80, 0x00
125 .unwind_raw 4, 0x88, 0x00
126 .unwind_raw 0, 0x91
127 .unwind_raw 0, 0x9d
128 .unwind_raw 0, 0x9f
129 .unwind_raw 0, 0xa0
130 .unwind_raw 0, 0xa8
131 .unwind_raw 0, 0xb0
132 .unwind_raw 0, 0xb1, 0x00
133 .unwind_raw 4, 0xb1, 0x01
134 .unwind_raw 0, 0xb1, 0x10
135 .unwind_raw 0x204, 0xb2, 0x00
136 .unwind_raw 16, 0xb3, 0x00
137 .unwind_raw 0, 0xb4
138 .unwind_raw 16, 0xb8
139 .unwind_raw 4, 0xc0
140 .unwind_raw 4, 0xc6, 0x00
141 .unwind_raw 4, 0xc7, 0x00
142 .unwind_raw 4, 0xc7, 0x01
143 .unwind_raw 0, 0xc7, 0x10
144 .unwind_raw 16, 0xc8, 0x00
145 .unwind_raw 16, 0xc9, 0x00
146 .unwind_raw 0, 0xca
147 .unwind_raw 16, 0xd0
148 .unwind_raw 0, 0xd8
149 .fnend
151 @ CHECK: UnwindInformation {
152 @ CHECK: UnwindIndexTable {
153 @ CHECK: SectionName: .ARM.exidx.personality
154 @ CHECK: Entries [
155 @ CHECK: Entry {
156 @ CHECK: FunctionAddress: 0x0
157 @ SYM: FunctionName: __personality
158 @ CHECK: Model: Compact (Inline)
159 @ CHECK: PersonalityIndex: 0
160 @ CHECK: Opcodes [
161 @ CHECK: 0xB0 ; finish
162 @ CHECK: 0xB0 ; finish
163 @ CHECK: 0xB0 ; finish
164 @ CHECK: ]
165 @ CHECK: }
166 @ CHECK: ]
167 @ CHECK: }
168 @ CHECK: UnwindIndexTable {
169 @ CHECK: SectionName: .ARM.exidx.personality0
170 @ CHECK: Entries [
171 @ CHECK: Entry {
172 @ CHECK: FunctionAddress: 0x0
173 @ SYM: FunctionName: personality0
174 @ CHECK: Model: Compact (Inline)
175 @ CHECK: PersonalityIndex: 0
176 @ CHECK: Opcodes [
177 @ CHECK: 0xB0 ; finish
178 @ CHECK: 0xB0 ; finish
179 @ CHECK: 0xB0 ; finish
180 @ CHECK: ]
181 @ CHECK: }
182 @ CHECK: ]
183 @ CHECK: }
184 @ CHECK: UnwindIndexTable {
185 @ CHECK: SectionName: .ARM.exidx.personality1
186 @ CHECK: Entries [
187 @ CHECK: Entry {
188 @ CHECK: FunctionAddress: 0x0
189 @ SYM: FunctionName: personality1
190 @ SYM: ExceptionHandlingTable: .ARM.extab.personality1
191 @ SYM: TableEntryOffset: 0x0
192 @ SYM: Model: Compact
193 @ SYM: PersonalityIndex: 1
194 @ SYM: Opcodes [
195 @ SYM: 0xB1 0x0F ; pop {r0, r1, r2, r3}
196 @ SYM: 0xA7 ; pop {r4, r5, r6, r7, r8, r9, r10, fp}
197 @ SYM: 0x3F ; vsp = vsp + 256
198 @ SYM: 0xB0 ; finish
199 @ SYM: 0xB0 ; finish
200 @ SYM: ]
201 @ CHECK: }
202 @ CHECK: ]
203 @ CHECK: }
204 @ CHECK: UnwindIndexTable {
205 @ CHECK: SectionName: .ARM.exidx.custom_personality
206 @ CHECK: Entries [
207 @ CHECK: Entry {
208 @ CHECK: FunctionAddress: 0x0
209 @ SYM: FunctionName: custom_personality
210 @ SYM: ExceptionHandlingTable: .ARM.extab.custom_personality
211 @ SYM: TableEntryOffset: 0x0
212 @ SYM: Model: Generic
213 @ SYM: PersonalityRoutineAddress: 0x0
214 @ CHECK: }
215 @ CHECK: ]
216 @ CHECK: }
217 @ CHECK: UnwindIndexTable {
218 @ CHECK: SectionName: .ARM.exidx.opcodes
219 @ CHECK: Entries [
220 @ CHECK: Entry {
221 @ CHECK: FunctionAddress: 0x0
222 @ SYM: FunctionName: opcodes
223 @ CHECK: Model: Compact (Inline)
224 @ CHECK: PersonalityIndex: 0
225 @ CHECK: Opcodes [
226 @ CHECK: 0xC9 0x84 ; pop {d8, d9, d10, d11, d12}
227 @ CHECK: 0xB0 ; finish
228 @ CHECK: ]
229 @ CHECK: }
230 @ CHECK: ]
231 @ CHECK: }
232 @ CHECK: UnwindIndexTable {
233 @ CHECK: SectionName: .ARM.exidx.multiple
234 @ CHECK: Entries [
235 @ CHECK: Entry {
236 @ CHECK: FunctionAddress: 0x0
237 @ SYM: FunctionName: function0
238 @ CHECK: Model: Compact (Inline)
239 @ CHECK: PersonalityIndex: 0
240 @ CHECK: Opcodes [
241 @ CHECK: 0xB0 ; finish
242 @ CHECK: 0xB0 ; finish
243 @ CHECK: 0xB0 ; finish
244 @ CHECK: ]
245 @ CHECK: }
246 @ CHECK: Entry {
247 @ CHECK: FunctionAddress: 0x4
248 @ SYM: FunctionName: function1
249 @ SYM: ExceptionHandlingTable: .ARM.extab.multiple
250 @ SYM: Model: Generic
251 @ SYM: PersonalityRoutineAddress: 0x0
252 @ CHECK: }
253 @ CHECK: Entry {
254 @ CHECK: FunctionAddress: 0x8
255 @ SYM: FunctionName: function2
256 @ CHECK: Model: Compact (Inline)
257 @ CHECK: PersonalityIndex: 0
258 @ CHECK: Opcodes [
259 @ CHECK: 0xB0 ; finish
260 @ CHECK: 0xB0 ; finish
261 @ CHECK: 0xB0 ; finish
262 @ CHECK: ]
263 @ CHECK: }
264 @ CHECK: ]
265 @ CHECK: }
266 @ CHECK: UnwindIndexTable {
267 @ CHECK: SectionName: .ARM.exidx.raw
268 @ CHECK: Entries [
269 @ SYM: Opcodes [
270 @ SYM: 0xD7 ; pop {d8, d9, d10, d11, d12, d13, d14, d15}
271 @ SYM: 0xC9 0x02 ; pop {d0, d1, d2}
272 @ SYM: 0xC8 0x02 ; pop {d16, d17, d18}
273 @ SYM: 0xC7 0x03 ; pop {wCGR0, wCGR1}
274 @ SYM: 0xC6 0x02 ; pop {wR0, wR1, wR2}
275 @ SYM: 0xC2 ; pop {wR10, wR11, wR12}
276 @ SYM: 0xBA ; pop {d8, d9, d10}
277 @ SYM: 0xB3 0x12 ; pop {d1, d2, d3}
278 @ SYM: 0xB2 0x80 0x04 ; vsp = vsp + 2564
279 @ SYM: 0xB1 0x01 ; pop {r0}
280 @ SYM: 0xB0 ; finish
281 @ SYM: 0xA9 ; pop {r4, r5, lr}
282 @ SYM: 0xA1 ; pop {r4, r5}
283 @ SYM: 0x91 ; vsp = r1
284 @ SYM: 0x84 0xC0 ; pop {r10, fp, lr}
285 @ SYM: 0x80 0xC0 ; pop {r10, fp}
286 @ SYM: 0x80 0x01 ; pop {r4}
287 @ SYM: 0x81 0x00 ; pop {ip}
288 @ SYM: 0x80 0x00 ; refuse to unwind
289 @ SYM: 0x42 ; vsp = vsp - 12
290 @ SYM: 0x02 ; vsp = vsp + 12
291 @ SYM: ]
292 @ CHECK: ]
293 @ CHECK: }
294 @ CHECK: UnwindIndexTable {
295 @ CHECK: SectionName: .ARM.exidx.spare
296 @ CHECK: Entries [
297 @ SYM: Opcodes [
298 @ SYM: 0xD8 ; spare
299 @ SYM: 0xD0 ; pop {d8}
300 @ SYM: 0xCA ; spare
301 @ SYM: 0xC9 0x00 ; pop {d0}
302 @ SYM: 0xC8 0x00 ; pop {d16}
303 @ SYM: 0xC7 0x10 ; spare
304 @ SYM: 0xC7 0x01 ; pop {wCGR0}
305 @ SYM: 0xC7 0x00 ; spare
306 @ SYM: 0xC6 0x00 ; pop {wR0}
307 @ SYM: 0xC0 ; pop {wR10}
308 @ SYM: 0xB8 ; pop {d8}
309 @ SYM: 0xB4 ; spare
310 @ SYM: 0xB3 0x00 ; pop {d0}
311 @ SYM: 0xB2 0x00 ; vsp = vsp + 516
312 @ SYM: 0xB1 0x10 ; spare
313 @ SYM: 0xB1 0x01 ; pop {r0}
314 @ SYM: 0xB1 0x00 ; spare
315 @ SYM: 0xB0 ; finish
316 @ SYM: 0xA8 ; pop {r4, lr}
317 @ SYM: 0xA0 ; pop {r4}
318 @ SYM: 0x9F ; reserved (WiMMX MOVrr)
319 @ SYM: 0x9D ; reserved (ARM MOVrr)
320 @ SYM: 0x91 ; vsp = r1
321 @ SYM: 0x88 0x00 ; pop {pc}
322 @ SYM: 0x80 0x00 ; refuse to unwind
323 @ SYM: 0x40 ; vsp = vsp - 4
324 @ SYM: 0x00 ; vsp = vsp + 4
325 @ SYM: ]
326 @ CHECK: ]
327 @ CHECK: }
328 @ CHECK: }