[NFC][AMDGPU] Pre-commit tests for IR variant - isFMAFasterThanFMulAdd (#121925)
[llvm-project.git] / llvm / test / tools / llvm-readobj / ELF / ARM / unwind.s
blob8bd7e012beabb5d716e264c82565707c059e9af6
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, 0xb4
106 .unwind_raw 4, 0xb1, 0x01
107 .unwind_raw 0xa04, 0xb2, 0x80, 0x04
108 .unwind_raw 24, 0xb3, 0x12
109 .unwind_raw 24, 0xba
110 .unwind_raw 24, 0xc2
111 .unwind_raw 24, 0xc6, 0x02
112 .unwind_raw 8, 0xc7, 0x03
113 .unwind_raw 24, 0xc8, 0x02
114 .unwind_raw 24, 0xc9, 0x02
115 .unwind_raw 64, 0xd7
116 .fnend
118 .section .spare
120 .type spare,%function
121 spare:
122 .fnstart
123 .unwind_raw 4, 0x00
124 .unwind_raw -4, 0x40
125 .unwind_raw 0, 0x80, 0x00
126 .unwind_raw 4, 0x88, 0x00
127 .unwind_raw 0, 0x91
128 .unwind_raw 0, 0x9d
129 .unwind_raw 0, 0x9f
130 .unwind_raw 0, 0xa0
131 .unwind_raw 0, 0xa8
132 .unwind_raw 0, 0xb0
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 16, 0xb8
138 .unwind_raw 4, 0xc0
139 .unwind_raw 4, 0xc6, 0x00
140 .unwind_raw 4, 0xc7, 0x00
141 .unwind_raw 4, 0xc7, 0x01
142 .unwind_raw 0, 0xc7, 0x10
143 .unwind_raw 16, 0xc8, 0x00
144 .unwind_raw 16, 0xc9, 0x00
145 .unwind_raw 0, 0xca
146 .unwind_raw 16, 0xd0
147 .unwind_raw 0, 0xd8
148 .fnend
150 @ CHECK: UnwindInformation {
151 @ CHECK: UnwindIndexTable {
152 @ CHECK: SectionName: .ARM.exidx.personality
153 @ CHECK: Entries [
154 @ CHECK: Entry {
155 @ CHECK: FunctionAddress: 0x0
156 @ SYM: FunctionName: __personality
157 @ CHECK: Model: Compact (Inline)
158 @ CHECK: PersonalityIndex: 0
159 @ CHECK: Opcodes [
160 @ CHECK: 0xB0 ; finish
161 @ CHECK: 0xB0 ; finish
162 @ CHECK: 0xB0 ; finish
163 @ CHECK: ]
164 @ CHECK: }
165 @ CHECK: ]
166 @ CHECK: }
167 @ CHECK: UnwindIndexTable {
168 @ CHECK: SectionName: .ARM.exidx.personality0
169 @ CHECK: Entries [
170 @ CHECK: Entry {
171 @ CHECK: FunctionAddress: 0x0
172 @ SYM: FunctionName: personality0
173 @ CHECK: Model: Compact (Inline)
174 @ CHECK: PersonalityIndex: 0
175 @ CHECK: Opcodes [
176 @ CHECK: 0xB0 ; finish
177 @ CHECK: 0xB0 ; finish
178 @ CHECK: 0xB0 ; finish
179 @ CHECK: ]
180 @ CHECK: }
181 @ CHECK: ]
182 @ CHECK: }
183 @ CHECK: UnwindIndexTable {
184 @ CHECK: SectionName: .ARM.exidx.personality1
185 @ CHECK: Entries [
186 @ CHECK: Entry {
187 @ CHECK: FunctionAddress: 0x0
188 @ SYM: FunctionName: personality1
189 @ SYM: ExceptionHandlingTable: .ARM.extab.personality1
190 @ SYM: TableEntryOffset: 0x0
191 @ SYM: Model: Compact
192 @ SYM: PersonalityIndex: 1
193 @ SYM: Opcodes [
194 @ SYM: 0xB1 0x0F ; pop {r0, r1, r2, r3}
195 @ SYM: 0xA7 ; pop {r4, r5, r6, r7, r8, r9, r10, fp}
196 @ SYM: 0x3F ; vsp = vsp + 256
197 @ SYM: 0xB0 ; finish
198 @ SYM: 0xB0 ; finish
199 @ SYM: ]
200 @ CHECK: }
201 @ CHECK: ]
202 @ CHECK: }
203 @ CHECK: UnwindIndexTable {
204 @ CHECK: SectionName: .ARM.exidx.custom_personality
205 @ CHECK: Entries [
206 @ CHECK: Entry {
207 @ CHECK: FunctionAddress: 0x0
208 @ SYM: FunctionName: custom_personality
209 @ SYM: ExceptionHandlingTable: .ARM.extab.custom_personality
210 @ SYM: TableEntryOffset: 0x0
211 @ SYM: Model: Generic
212 @ SYM: PersonalityRoutineAddress: 0x0
213 @ CHECK: }
214 @ CHECK: ]
215 @ CHECK: }
216 @ CHECK: UnwindIndexTable {
217 @ CHECK: SectionName: .ARM.exidx.opcodes
218 @ CHECK: Entries [
219 @ CHECK: Entry {
220 @ CHECK: FunctionAddress: 0x0
221 @ SYM: FunctionName: opcodes
222 @ CHECK: Model: Compact (Inline)
223 @ CHECK: PersonalityIndex: 0
224 @ CHECK: Opcodes [
225 @ CHECK: 0xC9 0x84 ; pop {d8, d9, d10, d11, d12}
226 @ CHECK: 0xB0 ; finish
227 @ CHECK: ]
228 @ CHECK: }
229 @ CHECK: ]
230 @ CHECK: }
231 @ CHECK: UnwindIndexTable {
232 @ CHECK: SectionName: .ARM.exidx.multiple
233 @ CHECK: Entries [
234 @ CHECK: Entry {
235 @ CHECK: FunctionAddress: 0x0
236 @ SYM: FunctionName: function0
237 @ CHECK: Model: Compact (Inline)
238 @ CHECK: PersonalityIndex: 0
239 @ CHECK: Opcodes [
240 @ CHECK: 0xB0 ; finish
241 @ CHECK: 0xB0 ; finish
242 @ CHECK: 0xB0 ; finish
243 @ CHECK: ]
244 @ CHECK: }
245 @ CHECK: Entry {
246 @ CHECK: FunctionAddress: 0x4
247 @ SYM: FunctionName: function1
248 @ SYM: ExceptionHandlingTable: .ARM.extab.multiple
249 @ SYM: Model: Generic
250 @ SYM: PersonalityRoutineAddress: 0x0
251 @ CHECK: }
252 @ CHECK: Entry {
253 @ CHECK: FunctionAddress: 0x8
254 @ SYM: FunctionName: function2
255 @ CHECK: Model: Compact (Inline)
256 @ CHECK: PersonalityIndex: 0
257 @ CHECK: Opcodes [
258 @ CHECK: 0xB0 ; finish
259 @ CHECK: 0xB0 ; finish
260 @ CHECK: 0xB0 ; finish
261 @ CHECK: ]
262 @ CHECK: }
263 @ CHECK: ]
264 @ CHECK: }
265 @ CHECK: UnwindIndexTable {
266 @ CHECK: SectionName: .ARM.exidx.raw
267 @ CHECK: Entries [
268 @ SYM: Opcodes [
269 @ SYM: 0xD7 ; pop {d8, d9, d10, d11, d12, d13, d14, d15}
270 @ SYM: 0xC9 0x02 ; pop {d0, d1, d2}
271 @ SYM: 0xC8 0x02 ; pop {d16, d17, d18}
272 @ SYM: 0xC7 0x03 ; pop {wCGR0, wCGR1}
273 @ SYM: 0xC6 0x02 ; pop {wR0, wR1, wR2}
274 @ SYM: 0xC2 ; pop {wR10, wR11, wR12}
275 @ SYM: 0xBA ; pop {d8, d9, d10}
276 @ SYM: 0xB3 0x12 ; pop {d1, d2, d3}
277 @ SYM: 0xB2 0x80 0x04 ; vsp = vsp + 2564
278 @ SYM: 0xB1 0x01 ; pop {r0}
279 @ SYM: 0xB4 ; pop ra_auth_code
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: 0xB3 0x00 ; pop {d0}
310 @ SYM: 0xB2 0x00 ; vsp = vsp + 516
311 @ SYM: 0xB1 0x10 ; spare
312 @ SYM: 0xB1 0x01 ; pop {r0}
313 @ SYM: 0xB0 ; finish
314 @ SYM: 0xA8 ; pop {r4, lr}
315 @ SYM: 0xA0 ; pop {r4}
316 @ SYM: 0x9F ; reserved (WiMMX MOVrr)
317 @ SYM: 0x9D ; reserved (ARM MOVrr)
318 @ SYM: 0x91 ; vsp = r1
319 @ SYM: 0x88 0x00 ; pop {pc}
320 @ SYM: 0x80 0x00 ; refuse to unwind
321 @ SYM: 0x40 ; vsp = vsp - 4
322 @ SYM: 0x00 ; vsp = vsp + 4
323 @ SYM: ]
324 @ CHECK: ]
325 @ CHECK: }
326 @ CHECK: }