comparison doc/disas_examples/arm.armhf.disas @ 481:0fc22b5feac7

- arm related doc addition about aggregates
author Tassilo Philipp
date Wed, 02 Mar 2022 17:30:51 +0100
parents c0390dc85a07
children cb19b2fe2422
comparison
equal deleted inserted replaced
480:cc78e34958e5 481:0fc22b5feac7
85 d4: e3a03000 mov r3, #0 ; return value (0) via r3 ... (a bit unoptimal) 85 d4: e3a03000 mov r3, #0 ; return value (0) via r3 ... (a bit unoptimal)
86 d8: e1a00003 mov r0, r3 ; ... to r0 86 d8: e1a00003 mov r0, r3 ; ... to r0
87 dc: e24bd004 sub sp, fp, #4 ; | 87 dc: e24bd004 sub sp, fp, #4 ; |
88 e0: e8bd8800 pop {fp, pc} ; | epilog 88 e0: e8bd8800 pop {fp, pc} ; | epilog
89 89
90
91
92 ; ---------- passing structs with only fp parts ---------->
93 ;
94 ; struct A { float a; };
95 ; struct B { float a, b; };
96 ; struct C { float a, b, c; };
97 ; struct D { double a; };
98 ; struct E { double a, b; };
99 ; struct F { double a, b, c; };
100 ;
101 ; void leaf_call(struct A a, struct B b, struct C c, struct D d, struct E e, struct F f)
102 ; {
103 ; }
104 ;
105 ; int main()
106 ; {
107 ; leaf_call((struct A){1.f}, (struct B){2.f,3.f}, (struct C){4.f,5.f,6.f}, (struct D){1.}, (struct E){2.,3.}, (struct F){4.,5.,6.});
108 ; return 0;
109 ; }
110
111
112
113 ; output from raspbian-11-armelhf w/ gcc 10.2.1
114
115 00000000 <leaf_call>:
116 0: e52db004 push {fp}
117 4: e28db000 add fp, sp, #0
118 8: e24dd034 sub sp, sp, #52
119 c: ed0b0a02 vstr s0, [fp, #-8]
120 10: ed0b3b09 vstr d3, [fp, #-36]
121 14: eeb06b44 vmov.f64 d6, d4
122 18: eeb07b45 vmov.f64 d7, d5
123 1c: ed4b0a04 vstr s1, [fp, #-16]
124 20: ed0b1a03 vstr s2, [fp, #-12]
125 24: ed4b1a07 vstr s3, [fp, #-28]
126 28: ed0b2a06 vstr s4, [fp, #-24]
127 2c: ed4b2a05 vstr s5, [fp, #-20]
128 30: ed0b6b0d vstr d6, [fp, #-52]
129 34: ed0b7b0b vstr d7, [fp, #-44]
130 38: e1a00000 nop
131 3c: e28bd000 add sp, fp, #0
132 40: e49db004 pop {fp}
133 44: e12fff1e bx lr
134
135 00000048 <main>:
136 48: e92d4800 push {fp, lr} ;
137 4c: e28db004 add fp, sp, #4 ;
138 50: e24dd058 sub sp, sp, #88 ;
139 54: ed9f0a29 vldr s0, [pc, #164] ; arg 0 (struct A), fetch from data below: (pc:=0x54+0x8)+164=0x100
140 58: e59f20a4 ldr r2, [pc, #164] ;
141 5c: e24b300c sub r3, fp, #12 ;
142 60: e8920003 ldm r2, {r0, r1} ;
143 64: e8830003 stm r3, {r0, r1} ;
144 68: e59f2098 ldr r2, [pc, #152] ;
145 6c: e24b3018 sub r3, fp, #24 ;
146 70: e8920007 ldm r2, {r0, r1, r2} ;
147 74: e8830007 stm r3, {r0, r1, r2} ;
148 78: ed9f3b1e vldr d3, [pc, #120] ; arg 3 (struct D), via fregs, fetch from data below: (pc:=0x78+0x8)+120=0xf8
149 7c: e59f3088 ldr r3, [pc, #136] ;
150 80: e24bc02c sub ip, fp, #44 ;
151 84: e893000f ldm r3, {r0, r1, r2, r3} ;
152 88: e88c000f stm ip, {r0, r1, r2, r3} ;
153 8c: e59f307c ldr r3, [pc, #124] ;
154 90: e24bc044 sub ip, fp, #68 ;
155 94: e1a0e003 mov lr, r3 ;
156 98: e8be000f ldm lr!, {r0, r1, r2, r3} ;
157 9c: e8ac000f stmia ip!, {r0, r1, r2, r3} ;
158 a0: e89e0003 ldm lr, {r0, r1} ;
159 a4: e88c0003 stm ip, {r0, r1} ;
160 a8: ed1b6b0b vldr d6, [fp, #-44] ; \ prep arg 5 (struct E)
161 ac: ed1b7b09 vldr d7, [fp, #-36] ; / b
162 b0: ed5b1a06 vldr s3, [fp, #-24] ; \ a
163 b4: ed1b2a05 vldr s4, [fp, #-20] ; | arg 2 (struct C), via fregs b
164 b8: ed5b2a04 vldr s5, [fp, #-16] ; / c
165 bc: ed5b0a03 vldr s1, [fp, #-12] ; \ a
166 c0: ed1b1a02 vldr s2, [fp, #-8] ; / arg 1 (struct B), via fregs b
167 c4: e1a0e00d mov lr, sp ; \ write ptr (to stack top)
168 c8: e24bc044 sub ip, fp, #68 ; | read ptr
169 cc: e8bc000f ldm ip!, {r0, r1, r2, r3} ; | arg 6 (struct F), entirely via stack (not split)
170 d0: e8ae000f stmia lr!, {r0, r1, r2, r3} ; |
171 d4: e89c0003 ldm ip, {r0, r1} ; |
172 d8: e88e0003 stm lr, {r0, r1} ; /
173 dc: eeb04b46 vmov.f64 d4, d6 ; \ arg 5 (struct E), via fregs a
174 e0: eeb05b47 vmov.f64 d5, d7 ; / b
175 e4: ebfffffe bl 0 <leaf_call> ; return address -> r14/lr, and call
176 e8: e3a03000 mov r3, #0 ; return value (0) via r3 ... (a bit unoptimal)
177 ec: e1a00003 mov r0, r3 ; ... to r0
178 f0: e24bd004 sub sp, fp, #4 ; | epilog
179 f4: e8bd8800 pop {fp, pc} ; /
180 f8: 00000000 .word 0x00000000 ; \ |
181 fc: 3ff00000 .word 0x3ff00000 ; | | 1.0
182 100: 3f800000 .word 0x3f800000 ; | 1.f
183 104: 00000000 .word 0x00000000 ; | data
184 108: 00000008 .word 0x00000008 ; |
185 10c: 00000018 .word 0x00000018 ; |
186 110: 00000028 .word 0x00000028 ; |
187
188
189
190 ; ---------- passing structs with mixed fp/int parts ---------->
191 ;
192 ; struct A { float a; char b; };
193 ; struct B { int a; double b; };
194 ; struct C { double a, b; int c; };
195 ; struct D { double a, b, c; long long d; };
196 ;
197 ; void leaf_call(struct A a, struct B b, struct C c, struct D d)
198 ; {
199 ; }
200 ;
201 ; int main()
202 ; {
203 ; leaf_call((struct A){1.f,2}, (struct B){2,3.}, (struct C){4.,5.,6}, (struct D){7.,8.,9.,10});
204 ; return 0;
205 ; }
206
207
208
209 ; output from raspbian-11-armelhf w/ gcc 10.2.1
210
211 00000000 <leaf_call>:
212 0: e24dd008 sub sp, sp, #8 ;
213 4: e52db004 push {fp} ;
214 8: e28db000 add fp, sp, #0 ;
215 c: e24dd00c sub sp, sp, #12 ;
216 10: e24bc00c sub ip, fp, #12 ;
217 14: e88c0003 stm ip, {r0, r1} ;
218 18: e28b1004 add r1, fp, #4 ;
219 1c: e881000c stm r1, {r2, r3} ;
220 20: e1a00000 nop ;
221 24: e28bd000 add sp, fp, #0 ;
222 28: e49db004 pop {fp} ;
223 2c: e28dd008 add sp, sp, #8 ;
224 30: e12fff1e bx lr ;
225
226 00000034 <main>:
227 34: e92d4800 push {fp, lr} ; |
228 38: e28db004 add fp, sp, #4 ; | prolog
229 3c: e24dd090 sub sp, sp, #144 ; /
230 40: e59f20b4 ldr r2, [pc, #180] ; \ read ptr to data after func
231 44: e24b300c sub r3, fp, #12 ; | write ptr to local area
232 48: e8920003 ldm r2, {r0, r1} ; | struct A -> local area
233 4c: e8830003 stm r3, {r0, r1} ; /
234 50: e59f30a8 ldr r3, [pc, #168] ; \ read ptr to data after func
235 54: e24bc01c sub ip, fp, #28 ; | write ptr
236 58: e893000f ldm r3, {r0, r1, r2, r3} ; | struct B -> local area
237 5c: e88c000f stm ip, {r0, r1, r2, r3} ; /
238 60: e59f309c ldr r3, [pc, #156] ; \ read ptr to data after func
239 64: e24bc034 sub ip, fp, #52 ; | write ptr
240 68: e1a0e003 mov lr, r3 ; |
241 6c: e8be000f ldm lr!, {r0, r1, r2, r3} ; | struct C -> local area
242 70: e8ac000f stmia ip!, {r0, r1, r2, r3} ; |
243 74: e89e0003 ldm lr, {r0, r1} ; |
244 78: e88c0003 stm ip, {r0, r1} ; /
245 7c: e59f3084 ldr r3, [pc, #132] ; \ read ptr to data after func
246 80: e24bc054 sub ip, fp, #84 ; | write ptr
247 84: e1a0e003 mov lr, r3 ; |
248 88: e8be000f ldm lr!, {r0, r1, r2, r3} ; |
249 8c: e8ac000f stmia ip!, {r0, r1, r2, r3} ; |
250 90: e89e000f ldm lr, {r0, r1, r2, r3} ; |
251 94: e88c000f stm ip, {r0, r1, r2, r3} ; | struct D -> local area
252 98: e28de020 add lr, sp, #32 ; |
253 9c: e24bc054 sub ip, fp, #84 ; |
254 a0: e8bc000f ldm ip!, {r0, r1, r2, r3} ; |
255 a4: e8ae000f stmia lr!, {r0, r1, r2, r3} ; |
256 a8: e89c000f ldm ip, {r0, r1, r2, r3} ; |
257 ac: e88e000f stm lr, {r0, r1, r2, r3} ; /
258 b0: e28de008 add lr, sp, #8 ; \
259 b4: e24bc034 sub ip, fp, #52 ; |
260 b8: e8bc000f ldm ip!, {r0, r1, r2, r3} ; |
261 bc: e8ae000f stmia lr!, {r0, r1, r2, r3} ; | arg 2 (struct C)
262 c0: e89c0003 ldm ip, {r0, r1} ; |
263 c4: e88e0003 stm lr, {r0, r1} ; /
264 c8: e1a0200d mov r2, sp ; \ |
265 cc: e24b3014 sub r3, fp, #20 ; | | via stack (second half)
266 d0: e8930003 ldm r3, {r0, r1} ; | |
267 d4: e8820003 stm r2, {r0, r1} ; | arg 1 (struct B), split via regs and stack as 2 words each
268 d8: e24b301c sub r3, fp, #28 ; |
269 dc: e893000c ldm r3, {r2, r3} ; / via regs (first half)
270 e0: e24b100c sub r1, fp, #12 ; \
271 e4: e8910003 ldm r1, {r0, r1} ; | arg 0 (struct A), via regs as 2 words
272 e8: ebfffffe bl 0 <leaf_call> ; return address -> r14/lr, and call
273 ec: e3a03000 mov r3, #0 ; return value (0) via r3 ... (a bit unoptimal)
274 f0: e1a00003 mov r0, r3 ; ... to r0
275 f4: e24bd004 sub sp, fp, #4 ; |
276 f8: e8bd8800 pop {fp, pc} ; | epilog
277 fc: 00000000 .word 0x00000000 ; 0
278 100: 00000008 .word 0x00000008 ; 8
279 104: 00000018 .word 0x00000018 ; 24
280 108: 00000030 .word 0x00000030 ; 48
281
282
283
284 ; ---------- passing 3-field fp-only struct (HVA) which is bigger than 16b ---------->
285 ;
286 ; struct A { double a, b, c; }; /* bigger than 16b */
287 ;
288 ; void leaf_call(struct A a)
289 ; {
290 ; }
291 ;
292 ; int main()
293 ; {
294 ; leaf_call((struct A){1.,2.,3.});
295 ; return 0;
296 ; }
297
298
299
300 ; output from raspbian-11-armelhf w/ gcc 10.2.1
301
302 00000000 <leaf_call>:
303 0: e52db004 push {fp} ;
304 4: e28db000 add fp, sp, #0 ;
305 8: e24dd01c sub sp, sp, #28 ;
306 c: eeb05b40 vmov.f64 d5, d0 ;
307 10: eeb06b41 vmov.f64 d6, d1 ;
308 14: eeb07b42 vmov.f64 d7, d2 ;
309 18: ed0b5b07 vstr d5, [fp, #-28] ;
310 1c: ed0b6b05 vstr d6, [fp, #-20] ;
311 20: ed0b7b03 vstr d7, [fp, #-12] ;
312 24: e1a00000 nop ;
313 28: e28bd000 add sp, fp, #0 ;
314 2c: e49db004 pop {fp} ;
315 30: e12fff1e bx lr ;
316
317 00000034 <main>:
318 34: e92d4800 push {fp, lr} ;
319 38: e28db004 add fp, sp, #4 ;
320 3c: e24dd018 sub sp, sp, #24 ;
321 40: e59f3040 ldr r3, [pc, #64] ;
322 44: e24bc01c sub ip, fp, #28 ;
323 48: e1a0e003 mov lr, r3 ;
324 4c: e8be000f ldm lr!, {r0, r1, r2, r3} ;
325 50: e8ac000f stmia ip!, {r0, r1, r2, r3} ;
326 54: e89e0003 ldm lr, {r0, r1} ;
327 58: e88c0003 stm ip, {r0, r1} ;
328 5c: ed1b5b07 vldr d5, [fp, #-28] ;
329 60: ed1b6b05 vldr d6, [fp, #-20] ;
330 64: ed1b7b03 vldr d7, [fp, #-12] ;
331 68: eeb00b45 vmov.f64 d0, d5 ; |
332 6c: eeb01b46 vmov.f64 d1, d6 ; | arg 0, via fpregs
333 70: eeb02b47 vmov.f64 d2, d7 ; |
334 74: ebfffffe bl 0 <leaf_call> ;
335 78: e3a03000 mov r3, #0 ;
336 7c: e1a00003 mov r0, r3 ;
337 80: e24bd004 sub sp, fp, #4 ;
338 84: e8bd8800 pop {fp, pc} ;
339 88: 00000000 .word 0x00000000 ;
340
341
342
343 ; ---------- passing 5-field fp-only struct (HVA) ---------->
344 ;
345 ; struct A { double a, b, c, d, e; };
346 ;
347 ; void leaf_call(struct A a)
348 ; {
349 ; }
350 ;
351 ; int main()
352 ; {
353 ; leaf_call((struct A){1.,2.,3.,4.,5.});
354 ; return 0;
355 ; }
356
357
358
359 ; output from raspbian-11-armelhf w/ gcc 10.2.1
360
361 00000000 <leaf_call>:
362 0: e24dd010 sub sp, sp, #16
363 4: e52db004 push {fp}
364 8: e28db000 add fp, sp, #0
365 c: e28bc004 add ip, fp, #4
366 10: e88c000f stm ip, {r0, r1, r2, r3}
367 14: e1a00000 nop
368 18: e28bd000 add sp, fp, #0
369 1c: e49db004 pop {fp}
370 20: e28dd010 add sp, sp, #16
371 24: e12fff1e bx lr
372
373 00000028 <main>:
374 28: e92d4800 push {fp, lr} ;
375 2c: e28db004 add fp, sp, #4 ;
376 30: e24dd040 sub sp, sp, #64 ;
377 34: e59f3050 ldr r3, [pc, #80] ;
378 38: e24bc02c sub ip, fp, #44 ;
379 3c: e1a0e003 mov lr, r3 ;
380 40: e8be000f ldm lr!, {r0, r1, r2, r3} ;
381 44: e8ac000f stmia ip!, {r0, r1, r2, r3} ;
382 48: e8be000f ldm lr!, {r0, r1, r2, r3} ;
383 4c: e8ac000f stmia ip!, {r0, r1, r2, r3} ;
384 50: e89e0003 ldm lr, {r0, r1} ;
385 54: e88c0003 stm ip, {r0, r1} ;
386 58: e1a0e00d mov lr, sp ;
387 5c: e24bc01c sub ip, fp, #28 ;
388 60: e8bc000f ldm ip!, {r0, r1, r2, r3} ;
389 64: e8ae000f stmia lr!, {r0, r1, r2, r3} ;
390 68: e89c0003 ldm ip, {r0, r1} ;
391 6c: e88e0003 stm lr, {r0, r1} ;
392 70: e24b302c sub r3, fp, #44 ;
393 74: e893000f ldm r3, {r0, r1, r2, r3} ; arg 0's a and b passed in int regs, as more than 4 fields, and splitting is allowed
394 78: ebfffffe bl 0 <leaf_call> ;
395 7c: e3a03000 mov r3, #0 ;
396 80: e1a00003 mov r0, r3 ;
397 84: e24bd004 sub sp, fp, #4 ;
398 88: e8bd8800 pop {fp, pc} ;
399 8c: 00000000 .word 0x00000000 ;
400
401
402
403 ; ---------- returning struct with 4 only-fp fields (HVA) by value ---------->
404 ;
405 ; struct A { double a, b, c, d; };
406 ;
407 ; struct A leaf_call()
408 ; {
409 ; return (struct A){1.,2.,3.,4.};
410 ; }
411 ;
412 ; int main()
413 ; {
414 ; leaf_call();
415 ; return 0;
416 ; }
417
418
419
420 ; output from raspbian-11-armelhf w/ gcc 10.2.1
421
422 00000000 <leaf_call>:
423 0: e92d48f0 push {r4, r5, r6, r7, fp, lr} ;
424 4: e28db014 add fp, sp, #20 ;
425 8: e24dd060 sub sp, sp, #96 ;
426 c: e59f304c ldr r3, [pc, #76] ;
427 10: e24bc034 sub ip, fp, #52 ;
428 14: e1a0e003 mov lr, r3 ;
429 18: e8be000f ldm lr!, {r0, r1, r2, r3} ;
430 1c: e8ac000f stmia ip!, {r0, r1, r2, r3} ;
431 20: e89e000f ldm lr, {r0, r1, r2, r3} ;
432 24: e88c000f stm ip, {r0, r1, r2, r3} ;
433 28: e14b63d4 ldrd r6, [fp, #-52] ;
434 2c: e14b42dc ldrd r4, [fp, #-44] ;
435 30: e14b02d4 ldrd r0, [fp, #-36] ;
436 34: e14b21dc ldrd r2, [fp, #-28] ;
437 38: ec476b14 vmov d4, r6, r7 ;
438 3c: ec454b15 vmov d5, r4, r5 ;
439 40: ec410b16 vmov d6, r0, r1 ;
440 44: ec432b17 vmov d7, r2, r3 ;
441 48: eeb00b44 vmov.f64 d0, d4 ; |
442 4c: eeb01b45 vmov.f64 d1, d5 ; |
443 50: eeb02b46 vmov.f64 d2, d6 ; | return value via regs
444 54: eeb03b47 vmov.f64 d3, d7 ; |
445 58: e24bd014 sub sp, fp, #20 ;
446 5c: e8bd88f0 pop {r4, r5, r6, r7, fp, pc} ;
447 60: 00000000 .word 0x00000000 ;
448
449 00000064 <main>:
450 64: e92d4800 push {fp, lr}
451 68: e28db004 add fp, sp, #4
452 6c: ebfffffe bl 0 <leaf_call>
453 70: e3a03000 mov r3, #0
454 74: e1a00003 mov r0, r3
455 78: e8bd8800 pop {fp, pc}
456
457
458
459 ; ---------- returning struct with 5 only-fp fields (HVA) by value, not returned via regs ---------->
460 ;
461 ; struct A { double a, b, c, d, e; };
462 ;
463 ; struct A leaf_call()
464 ; {
465 ; return (struct A){1.,2.,3.,4.,5.};
466 ; }
467 ;
468 ; int main()
469 ; {
470 ; leaf_call();
471 ; return 0;
472 ; }
473
474
475
476 ; output from raspbian-11-armelhf w/ gcc 10.2.1
477
478 00000000 <leaf_call>:
479 0: e92d4800 push {fp, lr} ;
480 4: e28db004 add fp, sp, #4 ;
481 8: e24dd030 sub sp, sp, #48 ;
482 c: e50b0030 str r0, [fp, #-48] ;
483 10: e51b3030 ldr r3, [fp, #-48] ;
484 14: e59f2028 ldr r2, [pc, #40] ;
485 18: e1a0c003 mov ip, r3 ;
486 1c: e1a0e002 mov lr, r2 ;
487 20: e8be000f ldm lr!, {r0, r1, r2, r3} ;
488 24: e8ac000f stmia ip!, {r0, r1, r2, r3} ;
489 28: e8be000f ldm lr!, {r0, r1, r2, r3} ;
490 2c: e8ac000f stmia ip!, {r0, r1, r2, r3} ;
491 30: e89e0003 ldm lr, {r0, r1} ;
492 34: e88c0003 stm ip, {r0, r1} ;
493 38: e51b0030 ldr r0, [fp, #-48] ; hidden arg ptr returned in r0
494 3c: e24bd004 sub sp, fp, #4 ;
495 40: e8bd8800 pop {fp, pc} ;
496 44: 00000000 .word 0x00000000 ;
497
498 00000048 <main>:
499 48: e92d4800 push {fp, lr} ;
500 4c: e28db004 add fp, sp, #4 ;
501 50: e24dd028 sub sp, sp, #40 ;
502 54: e24b302c sub r3, fp, #44 ;
503 58: e1a00003 mov r0, r3 ; hidden first arg, ptr to retval struct data
504 5c: ebfffffe bl 0 <leaf_call> ;
505 60: e3a03000 mov r3, #0 ;
506 64: e1a00003 mov r0, r3 ;
507 68: e24bd004 sub sp, fp, #4 ;
508 6c: e8bd8800 pop {fp, pc} ;
509
510
511
512 ; ---------- returning struct of 4b via reg ---------->
513 ;
514 ;
515 ; struct A { short a, b; };
516 ;
517 ; struct A leaf_call()
518 ; {
519 ; return (struct A){1,2};
520 ; }
521 ;
522 ; int main()
523 ; {
524 ; leaf_call();
525 ; return 0;
526 ; }
527
528
529
530 ; output from raspbian-11-armelhf w/ gcc 10.2.1
531
532 00000000 <leaf_call>:
533 0: e52db004 push {fp}
534 4: e28db000 add fp, sp, #0
535 8: e24dd00c sub sp, sp, #12
536 c: e59f3040 ldr r3, [pc, #64]
537 10: e5933000 ldr r3, [r3]
538 14: e50b3008 str r3, [fp, #-8]
539 18: e3a03000 mov r3, #0
540 1c: e15b20b8 ldrh r2, [fp, #-8]
541 20: e1a02802 lsl r2, r2, #16
542 24: e1a03823 lsr r3, r3, #16
543 28: e1833002 orr r3, r3, r2
544 2c: e1a03863 ror r3, r3, #16
545 30: e15b20b6 ldrh r2, [fp, #-6]
546 34: e1a02802 lsl r2, r2, #16
547 38: e1a03803 lsl r3, r3, #16
548 3c: e1a03823 lsr r3, r3, #16
549 40: e1833002 orr r3, r3, r2
550 44: e1a00003 mov r0, r3
551 48: e28bd000 add sp, fp, #0
552 4c: e49db004 pop {fp}
553 50: e12fff1e bx lr
554 54: 00000000 .word 0x00000000
555
556 00000058 <main>:
557 58: e92d4800 push {fp, lr}
558 5c: e28db004 add fp, sp, #4
559 60: ebfffffe bl 0 <leaf_call>
560 64: e3a03000 mov r3, #0
561 68: e1a00003 mov r0, r3
562 6c: e8bd8800 pop {fp, pc}
563
564
565
566 ; ---------- returning struct of > 4b indirectly via hidden pointer arg ---------->
567 ;
568 ; struct A { short a, b, c; };
569 ;
570 ; struct A leaf_call()
571 ; {
572 ; return (struct A){1,2,3};
573 ; }
574 ;
575 ; int main()
576 ; {
577 ; leaf_call();
578 ; return 0;
579 ; }
580
581
582
583 ; output from raspbian-11-armelhf w/ gcc 10.2.1
584
585 00000000 <leaf_call>:
586 0: e52db004 push {fp}
587 4: e28db000 add fp, sp, #0
588 8: e24dd014 sub sp, sp, #20
589 c: e50b0010 str r0, [fp, #-16]
590 10: e51b3010 ldr r3, [fp, #-16]
591 14: e59f201c ldr r2, [pc, #28]
592 18: e5920000 ldr r0, [r2]
593 1c: e5830000 str r0, [r3]
594 20: e1d220b4 ldrh r2, [r2, #4]
595 24: e1c320b4 strh r2, [r3, #4]
596 28: e51b0010 ldr r0, [fp, #-16]
597 2c: e28bd000 add sp, fp, #0
598 30: e49db004 pop {fp}
599 34: e12fff1e bx lr
600 38: 00000000 .word 0x00000000
601
602 0000003c <main>:
603 3c: e92d4800 push {fp, lr}
604 40: e28db004 add fp, sp, #4
605 44: e24dd008 sub sp, sp, #8
606 48: e24b300c sub r3, fp, #12
607 4c: e1a00003 mov r0, r3
608 50: ebfffffe bl 0 <leaf_call>
609 54: e3a03000 mov r3, #0
610 58: e1a00003 mov r0, r3
611 5c: e24bd004 sub sp, fp, #4
612 60: e8bd8800 pop {fp, pc}
613
614
615
90 ; vim: ft=asm68k 616 ; vim: ft=asm68k
91 617