Mercurial > pub > dyncall > dyncall
comparison doc/disas_examples/x64.sysv.disas @ 468:79b95db3d68f
- added (only partly annotated) x64/win64 disas examples
author | Tassilo Philipp |
---|---|
date | Sun, 06 Feb 2022 17:22:59 +0100 |
parents | bd65767c0534 |
children | 75cb8f79d725 |
comparison
equal
deleted
inserted
replaced
467:b47168dacba6 | 468:79b95db3d68f |
---|---|
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 ; } |
19 | 19 |
20 | 20 |
21 | 21 |
22 ; output from freebsd-12.0-x64 w/ clang 6.0.1 | 22 ; output from freebsd-12.0-x64 w/ clang 6.0.1 |
448 ; | 448 ; |
449 ; struct A { unsigned char a; }; | 449 ; struct A { unsigned char a; }; |
450 ; | 450 ; |
451 ; struct A call(unsigned char c) | 451 ; struct A call(unsigned char c) |
452 ; { | 452 ; { |
453 ; return (struct A){c}; | 453 ; return (struct A){c}; |
454 ; } | 454 ; } |
455 ; | 455 ; |
456 ; int main() | 456 ; int main() |
457 ; { | 457 ; { |
458 ; struct A a = call(123); | 458 ; struct A a = call(123); |
459 ; return 0; | 459 ; return 0; |
460 ; } | 460 ; } |
461 | 461 |
462 | 462 |
463 | 463 |
464 ; output from freebsd-12.2-x64 w/ clang 10.0.1 | 464 ; output from freebsd-12.2-x64 w/ clang 10.0.1 |