Mercurial > pub > dyncall > dyncall
comparison doc/disas_examples/x64.sysv.disas @ 427:fb51dc714566
- x64 struct by val disas examples
author | Tassilo Philipp |
---|---|
date | Mon, 17 Jan 2022 10:08:58 +0100 |
parents | c0390dc85a07 |
children | bd65767c0534 |
comparison
equal
deleted
inserted
replaced
426:02c57a13b839 | 427:fb51dc714566 |
---|---|
1 ; #include <stdlib.h> | 1 ; #include <stdlib.h> |
2 ; | 2 ; |
3 ; void leaf_call(int b, int c, int d, int e, int f, int g, int h) | 3 ; void leaf_call(int b, int c, int d, int e, int f, int g, int h) |
4 ; { | 4 ; { |
5 ; } | 5 ; } |
6 ; | 6 ; |
7 ; void nonleaf_call(int a, int b, int c, int d, int e, int f, int g, int h) | 7 ; void nonleaf_call(int a, int b, int c, int d, int e, int f, int g, int h) |
8 ; { | 8 ; { |
9 ; /* use some local data */ | 9 ; /* use some local data */ |
10 ; *(char*)alloca(10) = 'L'; | 10 ; *(char*)alloca(10) = 'L'; |
11 ; leaf_call(b, c, d, e, f, g, h); | 11 ; leaf_call(b, c, d, e, f, g, h); |
12 ; } | 12 ; } |
13 ; | 13 ; |
14 ; int main() | 14 ; int main() |
15 ; { | 15 ; { |
16 ; nonleaf_call(0, 1, 2, 3, 4, 5, 6, 7); | 16 ; nonleaf_call(0, 1, 2, 3, 4, 5, 6, 7); |
17 ; return 0; | 17 ; return 0; |
18 ; } | 18 ; } |
155 cb: e8 00 00 00 00 callq d0 <main+0x3c> | 155 cb: e8 00 00 00 00 callq d0 <main+0x3c> |
156 d0: b8 00 00 00 00 mov $0x0,%eax | 156 d0: b8 00 00 00 00 mov $0x0,%eax |
157 d5: c9 leaveq | 157 d5: c9 leaveq |
158 d6: c3 retq | 158 d6: c3 retq |
159 | 159 |
160 | |
161 | |
162 ; ---------- structs by value, struct in first call on reg arg boundary ----------> | |
163 ; | |
164 ; #include <stdlib.h> | |
165 ; | |
166 ; struct A { int i, j; long long l; }; | |
167 ; | |
168 ; void leaf_call(int b, int c, int d, int e, struct A f, int g, int h) | |
169 ; { | |
170 ; } | |
171 ; | |
172 ; void nonleaf_call(int a, int b, int c, int d, int e, struct A f, int g, int h) | |
173 ; { | |
174 ; /* use some local data */ | |
175 ; *(char*)alloca(220) = 'L'; | |
176 ; leaf_call(b, c, d, e, f, g, h); | |
177 ; } | |
178 ; | |
179 ; int main() | |
180 ; { | |
181 ; nonleaf_call(0, 1, 2, 3, 4, (struct A){5, 6, 7ll}, 8, 9); | |
182 ; return 0; | |
183 ; } | |
184 | |
185 | |
186 | |
187 ; output from freebsd-12.2-x64 w/ clang 10.0.1 | |
188 | |
189 0000000000201920 <leaf_call>: | |
190 201920: 55 push %rbp | |
191 201921: 48 89 e5 mov %rsp,%rbp | |
192 201924: 8b 45 18 mov 0x18(%rbp),%eax | |
193 201927: 44 8b 55 10 mov 0x10(%rbp),%r10d | |
194 20192b: 4c 89 45 f0 mov %r8,-0x10(%rbp) | |
195 20192f: 4c 89 4d f8 mov %r9,-0x8(%rbp) | |
196 201933: 89 7d ec mov %edi,-0x14(%rbp) | |
197 201936: 89 75 e8 mov %esi,-0x18(%rbp) | |
198 201939: 89 55 e4 mov %edx,-0x1c(%rbp) | |
199 20193c: 89 4d e0 mov %ecx,-0x20(%rbp) | |
200 20193f: 5d pop %rbp | |
201 201940: c3 retq | |
202 201941: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0(%rax,%rax,1) | |
203 20194b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) | |
204 | |
205 0000000000201950 <nonleaf_call>: | |
206 201950: 55 push %rbp ; | | |
207 201951: 48 89 e5 mov %rsp,%rbp ; | prolog | |
208 201954: 53 push %rbx ; | | |
209 201955: 48 81 ec 18 01 00 00 sub $0x118,%rsp ; | open frame *with* static alloca() size included | |
210 20195c: 8b 45 20 mov 0x20(%rbp),%eax ; unsure... stack param from prev frame into some scratch reg... but why? see below @@@ | |
211 20195f: 4c 8d 55 10 lea 0x10(%rbp),%r10 ; ptr to struct on stack -> r10 | |
212 201963: 89 7d f4 mov %edi,-0xc(%rbp) ; | | |
213 201966: 89 75 f0 mov %esi,-0x10(%rbp) ; | | |
214 201969: 89 55 ec mov %edx,-0x14(%rbp) ; | | |
215 20196c: 89 4d e8 mov %ecx,-0x18(%rbp) ; | in args (regs) -> local area (as temp store, mem order 8,4,3,2,1,0) | |
216 20196f: 44 89 45 e4 mov %r8d,-0x1c(%rbp) ; | | |
217 201973: 44 89 4d e0 mov %r9d,-0x20(%rbp) ; | | |
218 201977: c6 85 00 ff ff ff 4c movb $0x4c,-0x100(%rbp) ; 'L' -> local area (of alloca()'d space) | |
219 20197e: 8b 7d f0 mov -0x10(%rbp),%edi ; arg 0 | |
220 201981: 8b 75 ec mov -0x14(%rbp),%esi ; arg 1 | |
221 201984: 8b 55 e8 mov -0x18(%rbp),%edx ; arg 2 | |
222 201987: 8b 4d e4 mov -0x1c(%rbp),%ecx ; arg 3 | |
223 20198a: 44 8b 45 e0 mov -0x20(%rbp),%r8d ; in arg 6 (local copy) -> r8 pointless, free regs available and using arg reg as temporary, needs freeing below | |
224 20198e: 44 8b 4d 20 mov 0x20(%rbp),%r9d ; in arg 7 (stack) -> r9 pointless, free regs available and using arg reg as temporary, needs freeing below | |
225 201992: 4d 8b 1a mov (%r10),%r11 ; in arg 5 (A.i, A.j) -> hold in scratch reg | |
226 201995: 4d 8b 52 08 mov 0x8(%r10),%r10 ; in arg 5 (A.l) -> hold in scratch reg | |
227 201999: 44 89 85 fc fe ff ff mov %r8d,-0x104(%rbp) ; 'free' r8, temp store content | |
228 2019a0: 4d 89 d8 mov %r11,%r8 ; arg 4 (A.i, A.j) | |
229 2019a3: 44 89 8d f8 fe ff ff mov %r9d,-0x108(%rbp) ; 'free' r9, temp store content | |
230 2019aa: 4d 89 d1 mov %r10,%r9 ; arg 4 (A.l) | |
231 2019ad: 8b 9d fc fe ff ff mov -0x104(%rbp),%ebx ; \ | |
232 2019b3: 89 1c 24 mov %ebx,(%rsp) ; / arg 5 (fetch from temp store, pushed) pointless, could've been pushed, directly | |
233 2019b6: 8b 9d f8 fe ff ff mov -0x108(%rbp),%ebx ; \ | |
234 2019bc: 89 5c 24 08 mov %ebx,0x8(%rsp) ; / arg 6 (fetch from temp store, pushed) pointless, could've been pushed, directly | |
235 2019c0: 89 85 f4 fe ff ff mov %eax,-0x10c(%rbp) ; unsure... write something to local area @@@? | |
236 2019c6: e8 55 ff ff ff callq 201920 <leaf_call> ; push return addr and call | |
237 2019cb: 48 81 c4 18 01 00 00 add $0x118,%rsp ; | | |
238 2019d2: 5b pop %rbx ; | | |
239 2019d3: 5d pop %rbp ; | epilog | |
240 2019d4: c3 retq ; | | |
241 2019d5: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0(%rax,%rax,1) ; garbage data | |
242 2019df: 90 nop ; garbage data | |
243 | |
244 00000000002019e0 <main>: | |
245 2019e0: 55 push %rbp ; | | |
246 2019e1: 48 89 e5 mov %rsp,%rbp ; | prolog | |
247 2019e4: 48 83 ec 30 sub $0x30,%rsp ; | | |
248 2019e8: 31 ff xor %edi,%edi ; arg 0 | |
249 2019ea: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp) ; unsure... write 0 to local area @@@? | |
250 2019f1: c7 45 e8 05 00 00 00 movl $0x5,-0x18(%rbp) ; | field i | |
251 2019f8: c7 45 ec 06 00 00 00 movl $0x6,-0x14(%rbp) ; | fill struct A (local area) field j | |
252 2019ff: 48 c7 45 f0 07 00 00 00 movq $0x7,-0x10(%rbp) ; | field l | |
253 201a07: be 01 00 00 00 mov $0x1,%esi ; arg 1 | |
254 201a0c: ba 02 00 00 00 mov $0x2,%edx ; arg 2 | |
255 201a11: b9 03 00 00 00 mov $0x3,%ecx ; arg 3 | |
256 201a16: 41 b8 04 00 00 00 mov $0x4,%r8d ; arg 4 | |
257 201a1c: 48 8d 45 e8 lea -0x18(%rbp),%rax ; | | |
258 201a20: 4c 8b 08 mov (%rax),%r9 ; | | |
259 201a23: 4c 89 0c 24 mov %r9,(%rsp) ; | arg 5 (struct, pushed onto stack, as not enough regs) | |
260 201a27: 48 8b 40 08 mov 0x8(%rax),%rax ; | | |
261 201a2b: 48 89 44 24 08 mov %rax,0x8(%rsp) ; | | |
262 201a30: 41 b9 08 00 00 00 mov $0x8,%r9d ; arg 6 (in reg) | |
263 201a36: c7 44 24 10 09 00 00 00 movl $0x9,0x10(%rsp) ; arg 7 (pushed) | |
264 201a3e: e8 0d ff ff ff callq 201950 <nonleaf_call> ; push return addr and call | |
265 201a43: 31 c0 xor %eax,%eax ; return value | |
266 201a45: 48 83 c4 30 add $0x30,%rsp ; | | |
267 201a49: 5d pop %rbp ; | epilog | |
268 201a4a: c3 retq ; | | |
269 | |
270 | |
271 ; ---------- structs by value, complex example (multiple structs, partly passed via regs) ----------> | |
272 ; | |
273 ; #include <stdlib.h> | |
274 ; | |
275 ; struct A { int i, j; float f; }; | |
276 ; struct B { double d; long long l; }; | |
277 ; | |
278 ; void leaf_call(int b, struct A c, struct B d, int e, int f, struct A g, struct B h, int i, int j) | |
279 ; { | |
280 ; } | |
281 ; | |
282 ; void nonleaf_call(int a, int b, struct A c, struct B d, int e, int f, struct A g, struct B h, int i, int j) | |
283 ; { | |
284 ; /* use some local data */ | |
285 ; *(char*)alloca(220) = 'L'; | |
286 ; leaf_call(b, c, d, e, f, g, h, i, j); | |
287 ; } | |
288 ; | |
289 ; int main() | |
290 ; { | |
291 ; nonleaf_call(0, 1, (struct A){2, 3, 4.f}, (struct B){5., 6ll}, 7, 8, (struct A){9, 10, 11.f}, (struct B){12., 13ll}, 14, 15); | |
292 ; return 0; | |
293 ; } | |
294 | |
295 | |
296 | |
297 ; output from freebsd-12.2-x64 w/ clang 10.0.1 | |
298 | |
299 0000000000201940 <leaf_call>: | |
300 201940: 55 push %rbp | |
301 201941: 48 89 e5 mov %rsp,%rbp | |
302 201944: 8b 45 28 mov 0x28(%rbp),%eax | |
303 201947: 44 8b 55 20 mov 0x20(%rbp),%r10d | |
304 20194b: 48 89 75 e0 mov %rsi,-0x20(%rbp) | |
305 20194f: f3 0f 11 45 e8 movss %xmm0,-0x18(%rbp) | |
306 201954: 48 8b 75 e0 mov -0x20(%rbp),%rsi | |
307 201958: 48 89 75 f0 mov %rsi,-0x10(%rbp) | |
308 20195c: 44 8b 5d e8 mov -0x18(%rbp),%r11d | |
309 201960: 44 89 5d f8 mov %r11d,-0x8(%rbp) | |
310 201964: f2 0f 11 4d d0 movsd %xmm1,-0x30(%rbp) | |
311 201969: 48 89 55 d8 mov %rdx,-0x28(%rbp) | |
312 20196d: 4c 89 4d b0 mov %r9,-0x50(%rbp) | |
313 201971: f3 0f 11 55 b8 movss %xmm2,-0x48(%rbp) | |
314 201976: 48 8b 55 b0 mov -0x50(%rbp),%rdx | |
315 20197a: 48 89 55 c0 mov %rdx,-0x40(%rbp) | |
316 20197e: 44 8b 5d b8 mov -0x48(%rbp),%r11d | |
317 201982: 44 89 5d c8 mov %r11d,-0x38(%rbp) | |
318 201986: 89 7d ac mov %edi,-0x54(%rbp) | |
319 201989: 89 4d a8 mov %ecx,-0x58(%rbp) | |
320 20198c: 44 89 45 a4 mov %r8d,-0x5c(%rbp) | |
321 201990: 5d pop %rbp | |
322 201991: c3 retq | |
323 201992: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0(%rax,%rax,1) | |
324 20199c: 0f 1f 40 00 nopl 0x0(%rax) | |
325 | |
326 00000000002019a0 <nonleaf_call>: | |
327 2019a0: 55 push %rbp ; | | |
328 2019a1: 48 89 e5 mov %rsp,%rbp ; | | |
329 2019a4: 41 57 push %r15 ; | | |
330 2019a6: 41 56 push %r14 ; | prolog | |
331 2019a8: 41 54 push %r12 ; | | |
332 2019aa: 53 push %rbx ; | | |
333 2019ab: 48 81 ec 70 01 00 00 sub $0x170,%rsp ; | open frame *with* static alloca() size included | |
334 2019b2: 8b 45 38 mov 0x38(%rbp),%eax ; unsure... get last (15) stack param from prev frame into some scratch reg... but why? see below @@@ | |
335 2019b5: 44 8b 55 30 mov 0x30(%rbp),%r10d ; unsure... get one to last (14) stack param from prev frame into some scratch reg... but why? see below @@@ | |
336 2019b9: 4c 8d 5d 20 lea 0x20(%rbp),%r11 ; ptr to struct B on stack -> rbx | |
337 2019bd: 48 8d 5d 10 lea 0x10(%rbp),%rbx ; ptr to struct A on stack -> r11 | |
338 2019c1: 48 89 55 c0 mov %rdx,-0x40(%rbp) ; | \ i, j | |
339 2019c5: f3 0f 11 45 c8 movss %xmm0,-0x38(%rbp) ; | / reassemble first struct A in mem (local area) f | |
340 2019ca: 48 8b 55 c0 mov -0x40(%rbp),%rdx ; . \ pointless reload of rdx w/ same val from same addr | |
341 2019ce: 48 89 55 d0 mov %rdx,-0x30(%rbp) ; . | | |
342 2019d2: 44 8b 75 c8 mov -0x38(%rbp),%r14d ; . | copy of just reassembled A (local area) @@@ unsure why (@@@ I think we need copies of the structs, all the time) | |
343 2019d6: 44 89 75 d8 mov %r14d,-0x28(%rbp) ; . / | |
344 2019da: f2 0f 11 4d b0 movsd %xmm1,-0x50(%rbp) ; | \ d | |
345 2019df: 48 89 4d b8 mov %rcx,-0x48(%rbp) ; | / reassemble first struct B in mem (local area) l | |
346 2019e3: 89 7d ac mov %edi,-0x54(%rbp) ; | (0) | |
347 2019e6: 89 75 a8 mov %esi,-0x58(%rbp) ; | in args (regs) -> local area (as temp store, mem order 8,7,1,0,B,A,A') (1) | |
348 2019e9: 44 89 45 a4 mov %r8d,-0x5c(%rbp) ; | (7) | |
349 2019ed: 44 89 4d a0 mov %r9d,-0x60(%rbp) ; | (8) | |
350 2019f1: c6 85 a0 fe ff ff 4c movb $0x4c,-0x160(%rbp) ; 'L' -> local area (of alloca()'d space) | |
351 2019f8: 8b 7d a8 mov -0x58(%rbp),%edi ; arg 0 | |
352 2019fb: 8b 4d a4 mov -0x5c(%rbp),%ecx ; arg 3 | |
353 2019fe: 44 8b 45 a0 mov -0x60(%rbp),%r8d ; arg 4 | |
354 201a02: 8b 75 30 mov 0x30(%rbp),%esi ; in arg 9 -> hold in scratch reg | |
355 201a05: 44 8b 4d 38 mov 0x38(%rbp),%r9d ; in arg 8 -> hold in scratch reg | |
356 201a09: 48 8b 55 d0 mov -0x30(%rbp),%rdx ; | again pointless reload of rdx w/ same val from same addr | |
357 201a0d: 48 89 55 90 mov %rdx,-0x70(%rbp) ; | | |
358 201a11: 44 8b 75 d8 mov -0x28(%rbp),%r14d ; | *another* copy of copy of A (local area) @@@ unsure why | |
359 201a15: 44 89 75 98 mov %r14d,-0x68(%rbp) ; | | |
360 201a19: 48 8b 55 90 mov -0x70(%rbp),%rdx ; pointless reload of rdx | |
361 201a1d: f3 0f 10 45 98 movss -0x68(%rbp),%xmm0 ; arg 1 (A.f) @@@ unsure why from copy | |
362 201a22: f2 0f 10 4d b0 movsd -0x50(%rbp),%xmm1 ; arg 2 (B.d) | |
363 201a27: 4c 8b 7d b8 mov -0x48(%rbp),%r15 ; in arg arg 3 (B.l) -> hold in scratch reg | |
364 201a2b: 4c 8b 23 mov (%rbx),%r12 ; | | |
365 201a2e: 4c 89 65 80 mov %r12,-0x80(%rbp) ; | | |
366 201a32: 44 8b 73 08 mov 0x8(%rbx),%r14d ; | copy of in arg 6 (struct A on stack) -> local area | |
367 201a36: 44 89 75 88 mov %r14d,-0x78(%rbp) ; | | |
368 201a3a: 48 8b 5d 80 mov -0x80(%rbp),%rbx ; in arg 6 (A.i, A.j) -> rbx | |
369 201a3e: f3 0f 10 55 88 movss -0x78(%rbp),%xmm2 ; arg 5 (A.f) | |
370 201a43: 89 b5 9c fe ff ff mov %esi,-0x164(%rbp) ; in arg 9 -> temp (at end of frame, a bit pointless as could be pushed directly) | |
371 201a49: 48 89 d6 mov %rdx,%rsi ; arg 1 (A.i, A.j) | |
372 201a4c: 4c 89 fa mov %r15,%rdx ; arg 2 (B.l) | |
373 201a4f: 44 89 8d 98 fe ff ff mov %r9d,-0x168(%rbp) ; in arg 8 -> temp (at end of frame, a bit pointless as could be pushed directly) | |
374 201a56: 49 89 d9 mov %rbx,%r9 ; arg 5 (A.i, A.j) | |
375 201a59: 49 8b 1b mov (%r11),%rbx ; \ | |
376 201a5c: 48 89 1c 24 mov %rbx,(%rsp) ; / arg 6 (B.d) (pushed) | |
377 201a60: 4d 8b 5b 08 mov 0x8(%r11),%r11 ; \ | |
378 201a64: 4c 89 5c 24 08 mov %r11,0x8(%rsp) ; / arg 6 (B.l) (pushed) | |
379 201a69: 44 8b b5 9c fe ff ff mov -0x164(%rbp),%r14d ; \ | |
380 201a70: 44 89 74 24 10 mov %r14d,0x10(%rsp) ; / arg 7 (pushed, aligned) | |
381 201a75: 44 8b b5 98 fe ff ff mov -0x168(%rbp),%r14d ; \ | |
382 201a7c: 44 89 74 24 18 mov %r14d,0x18(%rsp) ; / arg 8 (pushed, aligned) | |
383 201a81: 89 85 94 fe ff ff mov %eax,-0x16c(%rbp) ; unsure... write something to local area @@@? | |
384 201a87: 44 89 95 90 fe ff ff mov %r10d,-0x170(%rbp) ; unsure... write something to local area @@@? | |
385 201a8e: e8 ad fe ff ff callq 201940 <leaf_call> ; push return addr and call | |
386 201a93: 48 81 c4 70 01 00 00 add $0x170,%rsp ; | | |
387 201a9a: 5b pop %rbx ; | | |
388 201a9b: 41 5c pop %r12 ; | | |
389 201a9d: 41 5e pop %r14 ; | epilog | |
390 201a9f: 41 5f pop %r15 ; | | |
391 201aa1: 5d pop %rbp ; | | |
392 201aa2: c3 retq ; | | |
393 201aa3: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0(%rax,%rax,1) ; garbage data | |
394 201aad: 0f 1f 00 nopl (%rax) ; garbage data | |
395 | |
396 0000000000201ab0 <main>: | |
397 201ab0: 55 push %rbp ; | | |
398 201ab1: 48 89 e5 mov %rsp,%rbp ; | prolog | |
399 201ab4: 48 81 ec 80 00 00 00 sub $0x80,%rsp ; | | |
400 201abb: 31 ff xor %edi,%edi ; arg 0 | |
401 201abd: f2 0f 10 05 2b ea ff ff movsd -0x15d5(%rip),%xmm0 ; not arg: prep to fill struct B field d (12.0) | |
402 201ac5: f3 0f 10 0d 2f ea ff ff movss -0x15d1(%rip),%xmm1 ; not arg: prep to fill struct A field f (11.f) | |
403 201acd: f2 0f 10 15 13 ea ff ff movsd -0x15ed(%rip),%xmm2 ; not arg: prep to fill struct B field d (5.0) | |
404 201ad5: f3 0f 10 1d 1b ea ff ff movss -0x15e5(%rip),%xmm3 ; not arg: prep to fill struct A field f (4.f) | |
405 201add: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp) ; unsure... write 0 to local area @@@? | |
406 201ae4: c7 45 f0 02 00 00 00 movl $0x2,-0x10(%rbp) ; \ field i | |
407 201aeb: c7 45 f4 03 00 00 00 movl $0x3,-0xc(%rbp) ; | fill first struct A (local area) field j | |
408 201af2: f3 0f 11 5d f8 movss %xmm3,-0x8(%rbp) ; / field f | |
409 201af7: f2 0f 11 55 e0 movsd %xmm2,-0x20(%rbp) ; \ field d | |
410 201afc: 48 c7 45 e8 06 00 00 00 movq $0x6,-0x18(%rbp) ; / fill first struct B (local area) field l | |
411 201b04: c7 45 d0 09 00 00 00 movl $0x9,-0x30(%rbp) ; \ field i | |
412 201b0b: c7 45 d4 0a 00 00 00 movl $0xa,-0x2c(%rbp) ; | fill last struct A (local area) field j | |
413 201b12: f3 0f 11 4d d8 movss %xmm1,-0x28(%rbp) ; / field f | |
414 201b17: f2 0f 11 45 c0 movsd %xmm0,-0x40(%rbp) ; \ field d | |
415 201b1c: 48 c7 45 c8 0d 00 00 00 movq $0xd,-0x38(%rbp) ; / fill last struct B (local area) field l | |
416 201b24: 48 8b 45 f0 mov -0x10(%rbp),%rax ; \ | |
417 201b28: 48 89 45 b0 mov %rax,-0x50(%rbp) ; | unsure ... make copy of first struct A (local area) @@@ | |
418 201b2c: 8b 4d f8 mov -0x8(%rbp),%ecx ; | | |
419 201b2f: 89 4d b8 mov %ecx,-0x48(%rbp) ; / | |
420 201b32: 48 8b 55 b0 mov -0x50(%rbp),%rdx ; arg 2 (A.i, A.j) @@@ unsure why from copy made above | |
421 201b36: f3 0f 10 45 b8 movss -0x48(%rbp),%xmm0 ; arg 2 (A.f) @@@ unsure why from copy made above | |
422 201b3b: f2 0f 10 4d e0 movsd -0x20(%rbp),%xmm1 ; arg 3 (B.d) | |
423 201b40: 48 8b 4d e8 mov -0x18(%rbp),%rcx ; arg 3 (B.l) | |
424 201b44: be 01 00 00 00 mov $0x1,%esi ; arg 1 | |
425 201b49: 41 b8 07 00 00 00 mov $0x7,%r8d ; arg 4 | |
426 201b4f: 41 b9 08 00 00 00 mov $0x8,%r9d ; arg 5 | |
427 201b55: 48 8d 45 d0 lea -0x30(%rbp),%rax ; \ \ | |
428 201b59: 4c 8b 10 mov (%rax),%r10 ; | | i, j | |
429 201b5c: 4c 89 14 24 mov %r10,(%rsp) ; | arg 6 (last struct A, *pushed* by value) / | |
430 201b60: 44 8b 58 08 mov 0x8(%rax),%r11d ; | \ f | |
431 201b64: 44 89 5c 24 08 mov %r11d,0x8(%rsp) ; / / | |
432 201b69: 48 8d 45 c0 lea -0x40(%rbp),%rax ; \ \ | |
433 201b6d: 4c 8b 10 mov (%rax),%r10 ; | | d (aligned) | |
434 201b70: 4c 89 54 24 10 mov %r10,0x10(%rsp) ; | arg 7 (last struct B, *pushed* by value) / | |
435 201b75: 48 8b 40 08 mov 0x8(%rax),%rax ; | \ l | |
436 201b79: 48 89 44 24 18 mov %rax,0x18(%rsp) ; / / | |
437 201b7e: c7 44 24 20 0e 00 00 00 movl $0xe,0x20(%rsp) ; arg 8 (pushed, aligned) | |
438 201b86: c7 44 24 28 0f 00 00 00 movl $0xf,0x28(%rsp) ; arg 9 (pushed, aligned) | |
439 201b8e: e8 0d fe ff ff callq 2019a0 <nonleaf_call> ; push return addr and call | |
440 201b93: 31 c0 xor %eax,%eax ; return value | |
441 201b95: 48 81 c4 80 00 00 00 add $0x80,%rsp ; | | |
442 201b9c: 5d pop %rbp ; | epilog | |
443 201b9d: c3 retq ; | | |
444 | |
445 | |
160 ; vim: ft=asm | 446 ; vim: ft=asm |
161 | 447 |