Mercurial > pub > dyncall > dyncall
annotate doc/disas_examples/x86.cdecl.disas @ 499:fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
author | Tassilo Philipp |
---|---|
date | Mon, 04 Apr 2022 15:50:52 +0200 |
parents | cb19b2fe2422 |
children | 585dcb68f55d |
rev | line source |
---|---|
327
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
1 ; #include <stdlib.h> |
469
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
2 ; |
327
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
3 ; void leaf_call(int b, int c, int d, int e, int f, int g, int h) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
4 ; { |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
5 ; } |
469
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
6 ; |
327
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
7 ; void nonleaf_call(int a, int b, int c, int d, int e, int f, int g, int h) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
8 ; { |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
9 ; /* use some local data */ |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
10 ; *(char*)alloca(220) = 'L'; |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
11 ; leaf_call(b, c, d, e, f, g, h); |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
12 ; } |
469
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
13 ; |
327
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
14 ; int main() |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
15 ; { |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
16 ; nonleaf_call(0, 1, 2, 3, 4, 5, 6, 7); |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
17 ; return 0; |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
18 ; } |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
19 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
20 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
21 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
22 ; output from arch_linux-2011.08.19-x86 w/ gcc 4.6.1 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
23 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
24 00000000 <leaf_call>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
25 0: 55 push %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
26 1: 89 e5 mov %esp,%ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
27 3: 5d pop %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
28 4: c3 ret |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
29 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
30 00000005 <nonleaf_call>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
31 5: 55 push %ebp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
32 6: 89 e5 mov %esp,%ebp ; | prolog |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
33 8: 83 ec 38 sub $0x38,%esp ; / |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
34 b: b8 10 00 00 00 mov $0x10,%eax ; \ | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
35 10: 83 e8 01 sub $0x1,%eax ; | | creative way to move 250 to eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
36 13: 05 eb 00 00 00 add $0xeb,%eax ; | / |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
37 18: c7 45 f4 10 00 00 00 movl $0x10,-0xc(%ebp) ; | size comp wtf? \ |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
38 1f: ba 00 00 00 00 mov $0x0,%edx ; | | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
39 24: f7 75 f4 divl -0xc(%ebp) ; | | obviously fastest way to round to multiple of 16 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
40 27: 6b c0 10 imul $0x10,%eax,%eax ; | | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
41 2a: 29 c4 sub %eax,%esp ; alloca(220) with size containing some padding computed above |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
42 2c: 8d 44 24 1c lea 0x1c(%esp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
43 30: 83 c0 0f add $0xf,%eax ; | start of alloca()'d memory -> eax, by ... |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
44 33: c1 e8 04 shr $0x4,%eax ; | ... using ebx and 2 pointless store/reads in local space as helper to align to 16b |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
45 36: c1 e0 04 shl $0x4,%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
46 39: c6 00 4c movb $0x4c,(%eax) ; 'L' -> alloca()'d space |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
47 3c: 8b 45 24 mov 0x24(%ebp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
48 3f: 89 44 24 18 mov %eax,0x18(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
49 43: 8b 45 20 mov 0x20(%ebp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
50 46: 89 44 24 14 mov %eax,0x14(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
51 4a: 8b 45 1c mov 0x1c(%ebp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
52 4d: 89 44 24 10 mov %eax,0x10(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
53 51: 8b 45 18 mov 0x18(%ebp),%eax ; | read in args 1-7 from prev frame's param area, and ... |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
54 54: 89 44 24 0c mov %eax,0xc(%esp) ; | ... "push" onto stack as arg 0-6 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
55 58: 8b 45 14 mov 0x14(%ebp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
56 5b: 89 44 24 08 mov %eax,0x8(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
57 5f: 8b 45 10 mov 0x10(%ebp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
58 62: 89 44 24 04 mov %eax,0x4(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
59 66: 8b 45 0c mov 0xc(%ebp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
60 69: 89 04 24 mov %eax,(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
61 6c: e8 fc ff ff ff call 6d <nonleaf_call+0x68> ; push return address and call leaf_call (objdump not from final link but .o) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
62 71: c9 leave ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
63 72: c3 ret ; | epilog |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
64 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
65 00000073 <main>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
66 73: 55 push %ebp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
67 74: 89 e5 mov %esp,%ebp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
68 76: 83 e4 f0 and $0xfffffff0,%esp ; | prolog |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
69 79: 83 ec 20 sub $0x20,%esp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
70 7c: c7 44 24 1c 07 00 00 00 movl $0x7,0x1c(%esp) ; arg 7 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
71 84: c7 44 24 18 06 00 00 00 movl $0x6,0x18(%esp) ; arg 6 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
72 8c: c7 44 24 14 05 00 00 00 movl $0x5,0x14(%esp) ; arg 5 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
73 94: c7 44 24 10 04 00 00 00 movl $0x4,0x10(%esp) ; arg 4 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
74 9c: c7 44 24 0c 03 00 00 00 movl $0x3,0xc(%esp) ; arg 3 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
75 a4: c7 44 24 08 02 00 00 00 movl $0x2,0x8(%esp) ; arg 2 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
76 ac: c7 44 24 04 01 00 00 00 movl $0x1,0x4(%esp) ; arg 1 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
77 b4: c7 04 24 00 00 00 00 movl $0x0,(%esp) ; arg 0 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
78 bb: e8 fc ff ff ff call bc <main+0x49> ; push return address and call nonleaf_call (objdump not from final link but .o) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
79 c0: b8 00 00 00 00 mov $0x0,%eax ; return value |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
80 c5: c9 leave ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
81 c6: c3 ret ; | epilog |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
82 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
83 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
84 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
85 ; output from darwin-8.0.1-x86 w/ gcc 3.3 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
86 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
87 _leaf_call: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
88 0: 55 pushl %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
89 1: 89 e5 movl %esp, %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
90 3: 83 ec 08 subl $8, %esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
91 6: c9 leave |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
92 7: c3 retl |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
93 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
94 _nonleaf_call: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
95 8: 55 pushl %ebp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
96 9: 89 e5 movl %esp, %ebp ; | prolog |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
97 b: 83 ec 28 subl $40, %esp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
98 e: 81 ec e0 00 00 00 subl $224, %esp ; alloca(220) - with 4b padding |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
99 14: 8d 44 24 20 leal 32(%esp), %eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
100 18: c6 00 4c movb $76, (%eax) ; / 'L' -> alloca()'d space |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
101 1b: 8b 45 24 movl 36(%ebp), %eax ; \ |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
102 1e: 89 44 24 18 movl %eax, 24(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
103 22: 8b 45 20 movl 32(%ebp), %eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
104 25: 89 44 24 14 movl %eax, 20(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
105 29: 8b 45 1c movl 28(%ebp), %eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
106 2c: 89 44 24 10 movl %eax, 16(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
107 30: 8b 45 18 movl 24(%ebp), %eax ; | read in args 1-7 from prev frame's param area, and ... |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
108 33: 89 44 24 0c movl %eax, 12(%esp) ; | ... "push" onto stack as arg 0-6 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
109 37: 8b 45 14 movl 20(%ebp), %eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
110 3a: 89 44 24 08 movl %eax, 8(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
111 3e: 8b 45 10 movl 16(%ebp), %eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
112 41: 89 44 24 04 movl %eax, 4(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
113 45: 8b 45 0c movl 12(%ebp), %eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
114 48: 89 04 24 movl %eax, (%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
115 4b: e8 b0 ff ff ff calll -80 <_leaf_call> ; push return address and call |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
116 50: c9 leave ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
117 51: c3 retl ; | epilog |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
118 52: 90 nop ; |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
119 53: 90 nop ; |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
120 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
121 _main: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
122 54: 55 pushl %ebp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
123 55: 89 e5 movl %esp, %ebp ; | prolog |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
124 57: 83 ec 28 subl $40, %esp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
125 5a: c7 44 24 1c 07 00 00 00 movl $7, 28(%esp) ; arg 7 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
126 62: c7 44 24 18 06 00 00 00 movl $6, 24(%esp) ; arg 6 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
127 6a: c7 44 24 14 05 00 00 00 movl $5, 20(%esp) ; arg 5 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
128 72: c7 44 24 10 04 00 00 00 movl $4, 16(%esp) ; arg 4 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
129 7a: c7 44 24 0c 03 00 00 00 movl $3, 12(%esp) ; arg 3 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
130 82: c7 44 24 08 02 00 00 00 movl $2, 8(%esp) ; arg 2 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
131 8a: c7 44 24 04 01 00 00 00 movl $1, 4(%esp) ; arg 1 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
132 92: c7 04 24 00 00 00 00 movl $0, (%esp) ; arg 0 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
133 99: e8 6a ff ff ff calll -150 <_nonleaf_call> ; push return address and call |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
134 9e: b8 00 00 00 00 movl $0, %eax ; return value |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
135 a3: c9 leave ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
136 a4: c3 retl ; | epilog |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
137 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
138 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
139 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
140 ; output from freebsd-9.3-x86 w/ gcc 4.2.1 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
141 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
142 00000000 <leaf_call>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
143 0: 55 push %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
144 1: 89 e5 mov %esp,%ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
145 3: 5d pop %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
146 4: c3 ret |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
147 5: 8d 74 26 00 lea 0x0(%esi),%esi |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
148 9: 8d bc 27 00 00 00 00 lea 0x0(%edi),%edi |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
149 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
150 00000010 <nonleaf_call>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
151 10: 55 push %ebp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
152 11: 89 e5 mov %esp,%ebp ; | prolog |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
153 13: 83 ec 28 sub $0x28,%esp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
154 16: 81 ec f0 00 00 00 sub $0xf0,%esp ; alloca(220) - with padding for 16b alignment |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
155 1c: 8d 44 24 1c lea 0x1c(%esp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
156 20: 89 45 fc mov %eax,-0x4(%ebp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
157 23: 8b 45 fc mov -0x4(%ebp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
158 26: 83 c0 0f add $0xf,%eax ; | start of alloca()'d memory -> eax, by ... |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
159 29: c1 e8 04 shr $0x4,%eax ; | ... using ebx and 2 pointless store/reads in local space as helper to align to 16b |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
160 2c: c1 e0 04 shl $0x4,%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
161 2f: 89 45 fc mov %eax,-0x4(%ebp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
162 32: 8b 45 fc mov -0x4(%ebp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
163 35: c6 00 4c movb $0x4c,(%eax) ; 'L' -> alloca()'d space |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
164 38: 8b 45 24 mov 0x24(%ebp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
165 3b: 89 44 24 18 mov %eax,0x18(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
166 3f: 8b 45 20 mov 0x20(%ebp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
167 42: 89 44 24 14 mov %eax,0x14(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
168 46: 8b 45 1c mov 0x1c(%ebp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
169 49: 89 44 24 10 mov %eax,0x10(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
170 4d: 8b 45 18 mov 0x18(%ebp),%eax ; | read in args 1-7 from prev frame's param area, and ... |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
171 50: 89 44 24 0c mov %eax,0xc(%esp) ; | ... "push" onto stack as arg 0-6 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
172 54: 8b 45 14 mov 0x14(%ebp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
173 57: 89 44 24 08 mov %eax,0x8(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
174 5b: 8b 45 10 mov 0x10(%ebp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
175 5e: 89 44 24 04 mov %eax,0x4(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
176 62: 8b 45 0c mov 0xc(%ebp),%eax ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
177 65: 89 04 24 mov %eax,(%esp) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
178 68: e8 fc ff ff ff call 69 <nonleaf_call+0x59> ; push return address and call leaf_call (objdump not from final link but .o) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
179 6d: c9 leave ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
180 6e: c3 ret ; | epilog |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
181 6f: 90 nop ; |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
182 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
183 00000070 <main>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
184 70: 8d 4c 24 04 lea 0x4(%esp),%ecx ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
185 74: 83 e4 f0 and $0xfffffff0,%esp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
186 77: ff 71 fc pushl -0x4(%ecx) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
187 7a: 55 push %ebp ; | prolog |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
188 7b: 89 e5 mov %esp,%ebp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
189 7d: 51 push %ecx ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
190 7e: 83 ec 24 sub $0x24,%esp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
191 81: c7 44 24 1c 07 00 00 00 movl $0x7,0x1c(%esp) ; arg 7 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
192 89: c7 44 24 18 06 00 00 00 movl $0x6,0x18(%esp) ; arg 6 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
193 91: c7 44 24 14 05 00 00 00 movl $0x5,0x14(%esp) ; arg 5 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
194 99: c7 44 24 10 04 00 00 00 movl $0x4,0x10(%esp) ; arg 4 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
195 a1: c7 44 24 0c 03 00 00 00 movl $0x3,0xc(%esp) ; arg 3 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
196 a9: c7 44 24 08 02 00 00 00 movl $0x2,0x8(%esp) ; arg 2 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
197 b1: c7 44 24 04 01 00 00 00 movl $0x1,0x4(%esp) ; arg 1 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
198 b9: c7 04 24 00 00 00 00 movl $0x0,(%esp) ; arg 0 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
199 c0: e8 fc ff ff ff call c1 <main+0x51> ; push return address and call leaf_call (objdump not from final link but .o) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
200 c5: b8 00 00 00 00 mov $0x0,%eax ; return value |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
201 ca: 83 c4 24 add $0x24,%esp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
202 cd: 59 pop %ecx ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
203 ce: 5d pop %ebp ; | epilog |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
204 cf: 8d 61 fc lea -0x4(%ecx),%esp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
205 d2: c3 ret ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
206 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
207 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
208 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
209 ; output from gentoo_linux-20191029-x86 w/ gcc 8.3.0 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
210 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
211 00000000 <leaf_call>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
212 0: 55 push %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
213 1: 89 e5 mov %esp,%ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
214 3: e8 fc ff ff ff call 4 <leaf_call+0x4> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
215 8: 05 01 00 00 00 add $0x1,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
216 d: 90 nop |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
217 e: 5d pop %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
218 f: c3 ret |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
219 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
220 00000010 <nonleaf_call>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
221 10: 55 push %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
222 11: 89 e5 mov %esp,%ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
223 13: 83 ec 18 sub $0x18,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
224 16: e8 fc ff ff ff call 17 <nonleaf_call+0x7> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
225 1b: 05 01 00 00 00 add $0x1,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
226 20: 65 a1 14 00 00 00 mov %gs:0x14,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
227 26: 89 45 f4 mov %eax,-0xc(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
228 29: 31 c0 xor %eax,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
229 2b: b8 10 00 00 00 mov $0x10,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
230 30: 48 dec %eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
231 31: 05 e8 00 00 00 add $0xe8,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
232 36: b9 10 00 00 00 mov $0x10,%ecx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
233 3b: ba 00 00 00 00 mov $0x0,%edx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
234 40: f7 f1 div %ecx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
235 42: 6b c0 10 imul $0x10,%eax,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
236 45: 29 c4 sub %eax,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
237 47: 89 e0 mov %esp,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
238 49: 83 c0 0f add $0xf,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
239 4c: c1 e8 04 shr $0x4,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
240 4f: c1 e0 04 shl $0x4,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
241 52: c6 00 4c movb $0x4c,(%eax) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
242 55: 83 ec 04 sub $0x4,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
243 58: ff 75 24 pushl 0x24(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
244 5b: ff 75 20 pushl 0x20(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
245 5e: ff 75 1c pushl 0x1c(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
246 61: ff 75 18 pushl 0x18(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
247 64: ff 75 14 pushl 0x14(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
248 67: ff 75 10 pushl 0x10(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
249 6a: ff 75 0c pushl 0xc(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
250 6d: e8 fc ff ff ff call 6e <nonleaf_call+0x5e> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
251 72: 83 c4 20 add $0x20,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
252 75: 90 nop |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
253 76: 8b 45 f4 mov -0xc(%ebp),%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
254 79: 65 33 05 14 00 00 00 xor %gs:0x14,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
255 80: 74 05 je 87 <nonleaf_call+0x77> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
256 82: e8 fc ff ff ff call 83 <nonleaf_call+0x73> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
257 87: c9 leave |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
258 88: c3 ret |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
259 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
260 00000089 <main>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
261 89: 8d 4c 24 04 lea 0x4(%esp),%ecx ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
262 8d: 83 e4 f0 and $0xfffffff0,%esp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
263 90: ff 71 fc pushl -0x4(%ecx) ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
264 93: 55 push %ebp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
265 94: 89 e5 mov %esp,%ebp ; | prolog (with some stack protection check call, I think) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
266 96: 51 push %ecx ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
267 97: 83 ec 04 sub $0x4,%esp ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
268 9a: e8 fc ff ff ff call 9b <main+0x12> ; | unsure@@@ call of stackguard stuff, maybe?. (objdump not from final link but .o) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
269 9f: 05 01 00 00 00 add $0x1,%eax ; | ??? add 1 to ret val from unknown call |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
270 a4: 6a 07 push $0x7 ; arg 7 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
271 a6: 6a 06 push $0x6 ; arg 6 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
272 a8: 6a 05 push $0x5 ; arg 5 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
273 aa: 6a 04 push $0x4 ; arg 4 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
274 ac: 6a 03 push $0x3 ; arg 3 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
275 ae: 6a 02 push $0x2 ; arg 2 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
276 b0: 6a 01 push $0x1 ; arg 1 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
277 b2: 6a 00 push $0x0 ; arg 0 -> stack |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
278 b4: e8 fc ff ff ff call b5 <main+0x2c> ; push return address and call nonleaf_call (objdump not from final link but .o) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
279 b9: 83 c4 20 add $0x20,%esp ; ??? |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
280 bc: b8 00 00 00 00 mov $0x0,%eax ; return value |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
281 c1: 8b 4d fc mov -0x4(%ebp),%ecx ; | ??? |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
282 c4: c9 leave ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
283 c5: 8d 61 fc lea -0x4(%ecx),%esp ; | epilog ??? |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
284 c8: c3 ret ; | |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
285 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
286 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
287 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
288 ; output from haiku w/ gcc 4.4.4 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
289 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
290 00000000 <leaf_call>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
291 0: 55 push %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
292 1: 89 e5 mov %esp,%ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
293 3: 5d pop %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
294 4: c3 ret |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
295 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
296 00000005 <nonleaf_call>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
297 5: 55 push %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
298 6: 89 e5 mov %esp,%ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
299 8: 53 push %ebx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
300 9: 83 ec 04 sub $0x4,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
301 c: e8 00 00 00 00 call 11 <nonleaf_call+0xc> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
302 11: 5b pop %ebx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
303 12: 81 c3 03 00 00 00 add $0x3,%ebx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
304 18: 81 ec f0 00 00 00 sub $0xf0,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
305 1e: 89 e0 mov %esp,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
306 20: 83 c0 0f add $0xf,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
307 23: c1 e8 04 shr $0x4,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
308 26: c1 e0 04 shl $0x4,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
309 29: c6 00 4c movb $0x4c,(%eax) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
310 2c: 83 ec 04 sub $0x4,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
311 2f: ff 75 24 pushl 0x24(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
312 32: ff 75 20 pushl 0x20(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
313 35: ff 75 1c pushl 0x1c(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
314 38: ff 75 18 pushl 0x18(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
315 3b: ff 75 14 pushl 0x14(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
316 3e: ff 75 10 pushl 0x10(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
317 41: ff 75 0c pushl 0xc(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
318 44: e8 fc ff ff ff call 45 <nonleaf_call+0x40> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
319 49: 83 c4 20 add $0x20,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
320 4c: 8b 5d fc mov -0x4(%ebp),%ebx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
321 4f: c9 leave |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
322 50: c3 ret |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
323 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
324 00000051 <main>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
325 51: 8d 4c 24 04 lea 0x4(%esp),%ecx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
326 55: 83 e4 f0 and $0xfffffff0,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
327 58: ff 71 fc pushl -0x4(%ecx) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
328 5b: 55 push %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
329 5c: 89 e5 mov %esp,%ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
330 5e: 53 push %ebx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
331 5f: 51 push %ecx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
332 60: e8 00 00 00 00 call 65 <main+0x14> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
333 65: 5b pop %ebx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
334 66: 81 c3 03 00 00 00 add $0x3,%ebx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
335 6c: 6a 07 push $0x7 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
336 6e: 6a 06 push $0x6 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
337 70: 6a 05 push $0x5 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
338 72: 6a 04 push $0x4 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
339 74: 6a 03 push $0x3 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
340 76: 6a 02 push $0x2 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
341 78: 6a 01 push $0x1 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
342 7a: 6a 00 push $0x0 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
343 7c: e8 fc ff ff ff call 7d <main+0x2c> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
344 81: 83 c4 20 add $0x20,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
345 84: b8 00 00 00 00 mov $0x0,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
346 89: 8d 65 f8 lea -0x8(%ebp),%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
347 8c: 83 c4 00 add $0x0,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
348 8f: 59 pop %ecx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
349 90: 5b pop %ebx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
350 91: 5d pop %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
351 92: 8d 61 fc lea -0x4(%ecx),%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
352 95: c3 ret |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
353 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
354 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
355 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
356 ; output from nexenta-1.0.1-b85-x86 w/ gcc 4.0.3 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
357 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
358 00000000 <leaf_call>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
359 0: 55 push %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
360 1: 89 e5 mov %esp,%ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
361 3: c9 leave |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
362 4: c3 ret |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
363 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
364 00000005 <nonleaf_call>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
365 5: 55 push %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
366 6: 89 e5 mov %esp,%ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
367 8: 83 ec 08 sub $0x8,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
368 b: 81 ec f0 00 00 00 sub $0xf0,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
369 11: 89 65 fc mov %esp,0xfffffffc(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
370 14: 8b 45 fc mov 0xfffffffc(%ebp),%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
371 17: 83 c0 0f add $0xf,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
372 1a: c1 e8 04 shr $0x4,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
373 1d: c1 e0 04 shl $0x4,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
374 20: 89 45 fc mov %eax,0xfffffffc(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
375 23: 8b 45 fc mov 0xfffffffc(%ebp),%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
376 26: c6 00 4c movb $0x4c,(%eax) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
377 29: ff 75 24 pushl 0x24(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
378 2c: ff 75 20 pushl 0x20(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
379 2f: ff 75 1c pushl 0x1c(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
380 32: ff 75 18 pushl 0x18(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
381 35: ff 75 14 pushl 0x14(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
382 38: ff 75 10 pushl 0x10(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
383 3b: ff 75 0c pushl 0xc(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
384 3e: e8 fc ff ff ff call 3f <nonleaf_call+0x3a> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
385 43: 83 c4 1c add $0x1c,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
386 46: c9 leave |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
387 47: c3 ret |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
388 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
389 00000048 <main>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
390 48: 55 push %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
391 49: 89 e5 mov %esp,%ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
392 4b: 83 ec 08 sub $0x8,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
393 4e: 83 e4 f0 and $0xfffffff0,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
394 51: b8 00 00 00 00 mov $0x0,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
395 56: 83 c0 0f add $0xf,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
396 59: 83 c0 0f add $0xf,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
397 5c: c1 e8 04 shr $0x4,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
398 5f: c1 e0 04 shl $0x4,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
399 62: 29 c4 sub %eax,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
400 64: 6a 07 push $0x7 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
401 66: 6a 06 push $0x6 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
402 68: 6a 05 push $0x5 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
403 6a: 6a 04 push $0x4 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
404 6c: 6a 03 push $0x3 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
405 6e: 6a 02 push $0x2 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
406 70: 6a 01 push $0x1 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
407 72: 6a 00 push $0x0 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
408 74: e8 fc ff ff ff call 75 <main+0x2d> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
409 79: 83 c4 20 add $0x20,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
410 7c: b8 00 00 00 00 mov $0x0,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
411 81: c9 leave |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
412 82: c3 ret |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
413 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
414 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
415 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
416 ; output from openbsd-4.0-x86 w/ gcc 3.3.5 (propolice) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
417 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
418 00000000 <leaf_call>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
419 0: 55 push %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
420 1: 89 e5 mov %esp,%ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
421 3: c9 leave |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
422 4: c3 ret |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
423 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
424 00000005 <nonleaf_call>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
425 5: 55 push %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
426 6: 89 e5 mov %esp,%ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
427 8: 83 ec 18 sub $0x18,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
428 b: a1 00 00 00 00 mov 0x0,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
429 10: 89 45 e8 mov %eax,0xffffffe8(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
430 13: 81 ec e0 00 00 00 sub $0xe0,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
431 19: 89 e0 mov %esp,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
432 1b: c6 00 4c movb $0x4c,(%eax) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
433 1e: 83 ec 04 sub $0x4,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
434 21: ff 75 24 pushl 0x24(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
435 24: ff 75 20 pushl 0x20(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
436 27: ff 75 1c pushl 0x1c(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
437 2a: ff 75 18 pushl 0x18(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
438 2d: ff 75 14 pushl 0x14(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
439 30: ff 75 10 pushl 0x10(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
440 33: ff 75 0c pushl 0xc(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
441 36: e8 fc ff ff ff call 37 <nonleaf_call+0x32> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
442 3b: 83 c4 20 add $0x20,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
443 3e: 8b 45 e8 mov 0xffffffe8(%ebp),%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
444 41: 3b 05 00 00 00 00 cmp 0x0,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
445 47: 74 13 je 5c <nonleaf_call+0x57> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
446 49: 83 ec 08 sub $0x8,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
447 4c: ff 75 e8 pushl 0xffffffe8(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
448 4f: 68 00 00 00 00 push $0x0 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
449 54: e8 fc ff ff ff call 55 <nonleaf_call+0x50> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
450 59: 83 c4 10 add $0x10,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
451 5c: c9 leave |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
452 5d: c3 ret |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
453 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
454 0000005e <main>: |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
455 5e: 55 push %ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
456 5f: 89 e5 mov %esp,%ebp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
457 61: 83 ec 18 sub $0x18,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
458 64: 83 e4 f0 and $0xfffffff0,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
459 67: b8 00 00 00 00 mov $0x0,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
460 6c: 29 c4 sub %eax,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
461 6e: a1 00 00 00 00 mov 0x0,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
462 73: 89 45 e8 mov %eax,0xffffffe8(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
463 76: 6a 07 push $0x7 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
464 78: 6a 06 push $0x6 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
465 7a: 6a 05 push $0x5 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
466 7c: 6a 04 push $0x4 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
467 7e: 6a 03 push $0x3 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
468 80: 6a 02 push $0x2 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
469 82: 6a 01 push $0x1 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
470 84: 6a 00 push $0x0 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
471 86: e8 fc ff ff ff call 87 <main+0x29> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
472 8b: 83 c4 20 add $0x20,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
473 8e: b8 00 00 00 00 mov $0x0,%eax |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
474 93: 8b 55 e8 mov 0xffffffe8(%ebp),%edx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
475 96: 3b 15 00 00 00 00 cmp 0x0,%edx |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
476 9c: 74 13 je b1 <main+0x53> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
477 9e: 83 ec 08 sub $0x8,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
478 a1: ff 75 e8 pushl 0xffffffe8(%ebp) |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
479 a4: 68 0d 00 00 00 push $0xd |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
480 a9: e8 fc ff ff ff call aa <main+0x4c> |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
481 ae: 83 c4 10 add $0x10,%esp |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
482 b1: c9 leave |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
483 b2: c3 ret |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
484 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
485 |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
486 |
469
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
487 ; output from godbolt compiler explorer w/ msvc 19.0 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
488 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
489 _leaf_call PROC |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
490 push ebp |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
491 mov ebp, esp |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
492 pop ebp |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
493 ret 0 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
494 _leaf_call ENDP |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
495 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
496 _b$ = 12 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
497 _c$ = 16 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
498 _d$ = 20 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
499 _e$ = 24 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
500 _f$ = 28 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
501 _g$ = 32 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
502 _h$ = 36 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
503 _nonleaf_call PROC |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
504 push ebp |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
505 mov ebp, esp |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
506 push 220 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
507 call _alloca |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
508 add esp, 4 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
509 mov BYTE PTR [eax], 76 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
510 mov eax, DWORD PTR _h$[ebp] |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
511 push eax |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
512 mov ecx, DWORD PTR _g$[ebp] |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
513 push ecx |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
514 mov edx, DWORD PTR _f$[ebp] |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
515 push edx |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
516 mov eax, DWORD PTR _e$[ebp] |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
517 push eax |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
518 mov ecx, DWORD PTR _d$[ebp] |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
519 push ecx |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
520 mov edx, DWORD PTR _c$[ebp] |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
521 push edx |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
522 mov eax, DWORD PTR _b$[ebp] |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
523 push eax |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
524 call _leaf_call |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
525 add esp, 28 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
526 pop ebp |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
527 ret 0 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
528 _nonleaf_call ENDP |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
529 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
530 _main PROC |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
531 push ebp |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
532 mov ebp, esp |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
533 push 7 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
534 push 6 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
535 push 5 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
536 push 4 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
537 push 3 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
538 push 2 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
539 push 1 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
540 push 0 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
541 call _nonleaf_call |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
542 add esp, 32 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
543 xor eax, eax |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
544 pop ebp |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
545 ret 0 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
546 _main ENDP |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
547 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
548 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
549 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
550 ; ---------- structs by value, struct in first call on reg arg boundary ----------> |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
551 ; |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
552 ; struct A { int x; short y; char z; long long t; }; |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
553 ; |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
554 ; struct A leaf_call(struct A a, short b, long long c, char d, int e, int f, int g, long long h) |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
555 ; { |
471 | 556 ; a.x += 1; |
557 ; return a; | |
469
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
558 ; } |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
559 ; |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
560 ; int main() |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
561 ; { |
471 | 562 ; struct A a = {9, 99, 23, 12LL}; |
563 ; leaf_call(a, 1, 2, 3, 4, 5, 6, 7LL); | |
564 ; return 0; | |
469
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
565 ; } |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
566 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
567 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
568 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
569 ; output from godbolt compiler explorer w/ msvc 19.0 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
570 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
571 $T1 = 8 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
572 _a$ = 12 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
573 _leaf_call PROC |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
574 push ebp ; | prolog |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
575 mov ebp, esp ; / |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
576 mov eax, DWORD PTR _a$[ebp] ; \ |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
577 add eax, 1 ; | get struct's x (from stack args), add 1 and write back |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
578 mov DWORD PTR _a$[ebp], eax ; / |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
579 mov ecx, DWORD PTR $T1[ebp] ; get ptr to retval struct passed as hidden arg (+8 to skip retval and saved ebp) |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
580 mov edx, DWORD PTR _a$[ebp] ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
581 mov DWORD PTR [ecx], edx ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
582 mov eax, DWORD PTR _a$[ebp+4] ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
583 mov DWORD PTR [ecx+4], eax ; | copy modified (b/c of x+=1) struct arg to space of retval |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
584 mov edx, DWORD PTR _a$[ebp+8] ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
585 mov DWORD PTR [ecx+8], edx ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
586 mov eax, DWORD PTR _a$[ebp+12] ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
587 mov DWORD PTR [ecx+12], eax ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
588 mov eax, DWORD PTR $T1[ebp] ; return value (= ptr to struct that was passed-in as hidden arg) |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
589 pop ebp ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
590 ret 0 ; | epilog |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
591 _leaf_call ENDP |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
592 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
593 $T1 = -32 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
594 _a$ = -16 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
595 _main PROC |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
596 push ebp ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
597 mov ebp, esp ; | prolog |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
598 sub esp, 32 ; / 32 = 16b local area for struct + 16b space used for retval struct |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
599 mov DWORD PTR _a$[ebp], 9 ; \ int x |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
600 mov eax, 99 ; | | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
601 mov WORD PTR _a$[ebp+4], ax ; | struct values (local area) | short y |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
602 mov BYTE PTR _a$[ebp+6], 23 ; | char z |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
603 mov DWORD PTR _a$[ebp+8], 12 ; | | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
604 mov DWORD PTR _a$[ebp+12], 0 ; / | long long t |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
605 push 0 ; \ |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
606 push 7 ; | arg 7 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
607 push 6 ; arg 6 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
608 push 5 ; arg 5 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
609 push 4 ; arg 4 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
610 push 3 ; arg 3 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
611 push 0 ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
612 push 2 ; arg 2 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
613 push 1 ; arg 1 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
614 sub esp, 16 ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
615 mov ecx, esp ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
616 mov edx, DWORD PTR _a$[ebp] ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
617 mov DWORD PTR [ecx], edx ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
618 mov eax, DWORD PTR _a$[ebp+4] ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
619 mov DWORD PTR [ecx+4], eax ; | arg 0 (struct), "pushed" onto stack (fetched from local area) |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
620 mov edx, DWORD PTR _a$[ebp+8] ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
621 mov DWORD PTR [ecx+8], edx ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
622 mov eax, DWORD PTR _a$[ebp+12] ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
623 mov DWORD PTR [ecx+12], eax ; / |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
624 lea ecx, DWORD PTR $T1[ebp] ; \ ptr to space used for struct retval (pushed as hidden first arg) |
471 | 625 push ecx ; | |
469
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
626 call _leaf_call ; push return address and call |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
627 add esp, 56 ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
628 xor eax, eax ; : return value |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
629 mov esp, ebp ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
630 pop ebp ; | epilog |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
631 ret 0 ; | |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
632 _main ENDP |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
633 |
984e6652b975
some x86 disas examples, for completion but also while researching struct by val passing on non-x64
Tassilo Philipp
parents:
327
diff
changeset
|
634 |
327
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
635 |
497
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
636 ; ---------- C++ trivial and non-trivial aggrs passed to C funcs ----------> |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
637 ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
638 ; struct Trivial { int a; }; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
639 ; struct NonTrivial { int a; NonTrivial() : a(0) {} NonTrivial(const NonTrivial& rhs) : a(rhs.a) { } }; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
640 ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
641 ; extern "C" { |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
642 ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
643 ; void f1(struct Trivial s) { } |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
644 ; void f2(struct NonTrivial s) { } |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
645 ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
646 ; void f() |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
647 ; { |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
648 ; struct Trivial t; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
649 ; struct NonTrivial n; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
650 ; int a=1; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
651 ; a += 123; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
652 ; f1(t); |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
653 ; a -= 123; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
654 ; f2(n); |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
655 ; a -= 12; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
656 ; } |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
657 ; } |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
658 |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
659 |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
660 |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
661 ; output from openbsd-4.0-x86 w/ gcc 3.3.5 (propolice) |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
662 |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
663 1c0005a0 <f1>: |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
664 1c0005a0: 55 push %ebp |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
665 1c0005a1: 89 e5 mov %esp,%ebp |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
666 1c0005a3: c9 leave |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
667 1c0005a4: c3 ret |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
668 1c0005a5: 90 nop |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
669 |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
670 1c0005a6 <f2>: |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
671 1c0005a6: 55 push %ebp |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
672 1c0005a7: 89 e5 mov %esp,%ebp |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
673 1c0005a9: c9 leave |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
674 1c0005aa: c3 ret |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
675 1c0005ab: 90 nop |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
676 |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
677 1c0005ac <f>: |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
678 1c0005ac: 55 push %ebp ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
679 1c0005ad: 89 e5 mov %esp,%ebp ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
680 1c0005af: 83 ec 48 sub $0x48,%esp ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
681 1c0005b2: 83 ec 0c sub $0xc,%esp ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
682 1c0005b5: 8d 45 d8 lea 0xffffffd8(%ebp),%eax ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
683 1c0005b8: 50 push %eax ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
684 1c0005b9: e8 8e 00 00 00 call 1c00064c <_ZN10NonTrivialC1Ev> ; NonTrivial::NonTrivial() / ctor |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
685 1c0005be: 83 c4 10 add $0x10,%esp ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
686 1c0005c1: c7 45 d4 01 00 00 00 movl $0x1,0xffffffd4(%ebp) ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
687 1c0005c8: 8d 45 d4 lea 0xffffffd4(%ebp),%eax ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
688 1c0005cb: 83 00 7b addl $0x7b,(%eax) ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
689 1c0005ce: 83 ec 0c sub $0xc,%esp ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
690 1c0005d1: 8b 45 f4 mov 0xfffffff4(%ebp),%eax ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
691 1c0005d4: 50 push %eax ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
692 1c0005d5: e8 c6 ff ff ff call 1c0005a0 <f1> ; call f1(struct Trivial) |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
693 1c0005da: 83 c4 10 add $0x10,%esp ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
694 1c0005dd: 8d 45 d4 lea 0xffffffd4(%ebp),%eax ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
695 1c0005e0: 83 28 7b subl $0x7b,(%eax) ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
696 1c0005e3: 83 ec 0c sub $0xc,%esp ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
697 1c0005e6: 83 ec 0c sub $0xc,%esp ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
698 1c0005e9: 8d 45 d8 lea 0xffffffd8(%ebp),%eax ; | | |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
699 1c0005ec: 50 push %eax ; | / ptr to n |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
700 1c0005ed: 8d 45 b8 lea 0xffffffb8(%ebp),%eax ; | \ |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
701 1c0005f0: 50 push %eax ; | copy n | ptr to dest of copy of n |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
702 1c0005f1: e8 64 00 00 00 call 1c00065a <_ZN10NonTrivialC1ERKS_> ; | NonTrivial::NonTrivial(const NonTrivial&) / copy ctor |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
703 1c0005f6: 83 c4 14 add $0x14,%esp ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
704 1c0005f9: 8d 45 b8 lea 0xffffffb8(%ebp),%eax ; | |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
705 1c0005fc: 50 push %eax ; | f2 arg 0 (ptr to copy of struct NonTrivial), via ptr as non-trivial |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
706 1c0005fd: e8 a4 ff ff ff call 1c0005a6 <f2> ; call f2(struct NonTrivial) |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
707 1c000602: 83 c4 10 add $0x10,%esp ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
708 1c000605: 8d 45 d4 lea 0xffffffd4(%ebp),%eax ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
709 1c000608: 83 28 0c subl $0xc,(%eax) ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
710 1c00060b: c9 leave ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
711 1c00060c: c3 ret ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
712 1c00060d: 90 nop ; |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
713 |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
714 ; ... snip, removed code of ctor and copy ctor ... |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
715 |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
716 |
cb19b2fe2422
- more disas examples to check behaviour of passing C++ non-trivial aggregates by value; they all behave the same, calling the copy ctor first, passing a pointer then
Tassilo Philipp
parents:
471
diff
changeset
|
717 |
499
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
718 ; ---------- C++ trivial and non-trivial aggrs as return values ----------> |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
719 ; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
720 ; struct Trivial { int a; }; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
721 ; struct NonTrivial { int a; NonTrivial() : a(0) {} NonTrivial(const NonTrivial& rhs) : a(rhs.a) { } }; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
722 ; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
723 ; extern "C" { |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
724 ; struct Trivial f1() { return Trivial(); } |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
725 ; } |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
726 ; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
727 ; struct NonTrivial f2() { return NonTrivial(); } |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
728 ; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
729 ; extern "C" { |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
730 ; void f() |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
731 ; { |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
732 ; int a=1; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
733 ; a += 123; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
734 ; struct Trivial t = f1(); |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
735 ; a -= 123; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
736 ; struct NonTrivial n = f2(); |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
737 ; a -= 12; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
738 ; } |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
739 ; } |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
740 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
741 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
742 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
743 ; output from openbsd-4.0-x86 w/ gcc 3.3.5 (propolice) |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
744 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
745 1c000920 <f1>: |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
746 1c000920: 55 push %ebp |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
747 1c000921: 89 e5 mov %esp,%ebp |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
748 1c000923: 83 ec 04 sub $0x4,%esp |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
749 1c000926: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
750 1c00092d: 8b 45 fc mov 0xfffffffc(%ebp),%eax |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
751 1c000930: c9 leave |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
752 1c000931: c3 ret |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
753 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
754 1c000932 <_Z2f2v>: |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
755 1c000932: 55 push %ebp |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
756 1c000933: 89 e5 mov %esp,%ebp |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
757 1c000935: 53 push %ebx |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
758 1c000936: 83 ec 04 sub $0x4,%esp |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
759 1c000939: 8b 5d 08 mov 0x8(%ebp),%ebx |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
760 1c00093c: 83 ec 0c sub $0xc,%esp |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
761 1c00093f: 53 push %ebx |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
762 1c000940: e8 87 00 00 00 call 1c0009cc <_ZN10NonTrivialC1Ev> |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
763 1c000945: 83 c4 10 add $0x10,%esp |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
764 1c000948: 89 d8 mov %ebx,%eax |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
765 1c00094a: 8b 5d fc mov 0xfffffffc(%ebp),%ebx |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
766 1c00094d: c9 leave |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
767 1c00094e: c2 04 00 ret $0x4 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
768 1c000951: 90 nop |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
769 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
770 1c000952 <f>: |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
771 1c000952: 55 push %ebp ; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
772 1c000953: 89 e5 mov %esp,%ebp ; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
773 1c000955: 83 ec 28 sub $0x28,%esp ; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
774 1c000958: c7 45 f4 01 00 00 00 movl $0x1,0xfffffff4(%ebp) ; a = 1 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
775 1c00095f: 8d 45 f4 lea 0xfffffff4(%ebp),%eax ; | |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
776 1c000962: 83 00 7b addl $0x7b,(%eax) ; | a += 12 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
777 1c000965: e8 b6 ff ff ff call 1c000920 <f1> ; call f1() |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
778 1c00096a: 89 45 f0 mov %eax,0xfffffff0(%ebp) ; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
779 1c00096d: 8d 45 f4 lea 0xfffffff4(%ebp),%eax ; | |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
780 1c000970: 83 28 7b subl $0x7b,(%eax) ; | a -= 123 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
781 1c000973: 8d 45 d8 lea 0xffffffd8(%ebp),%eax ; space (at top of stack) to hold non-triv retval -> eax |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
782 1c000976: 83 ec 0c sub $0xc,%esp ; grow stack by 12 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
783 1c000979: 50 push %eax ; hidden first arg: ptr to space for retval |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
784 1c00097a: e8 b3 ff ff ff call 1c000932 <_Z2f2v> ; call f2() |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
785 1c00097f: 83 c4 0c add $0xc,%esp ; shrink stack back by 12 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
786 1c000982: 8d 45 f4 lea 0xfffffff4(%ebp),%eax ; | |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
787 1c000985: 83 28 0c subl $0xc,(%eax) ; | a -= 12 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
788 1c000988: c9 leave ; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
789 1c000989: c3 ret ; |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
790 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
791 |
fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
Tassilo Philipp
parents:
497
diff
changeset
|
792 |
327
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
793 ; vim: ft=asm |
c0390dc85a07
- doc: added disassembly examples for many platforms and calling conventions, for reference
Tassilo Philipp
parents:
diff
changeset
|
794 |