You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -11,10 +11,11 @@ This topic describes the basic application binary interface (ABI) for x64, the 6
11
11
## x64 calling conventions
12
12
13
13
Two important differences between x86 and x64 are:
14
+
14
15
- 64-bit addressing capability
15
16
- Sixteen 64-bit registers for general use.
16
17
17
-
Given the expanded register set, x64 uses the [__fastcall](../cpp/fastcall.md) calling convention and a RISC-based exception-handling model.
18
+
Given the expanded register set, x64 uses the [`__fastcall`](../cpp/fastcall.md) calling convention and a RISC-based exception-handling model.
18
19
19
20
The **`__fastcall`** convention uses registers for the first four arguments, and the stack frame to pass more arguments. For details on the x64 calling convention, including register usage, stack parameters, return values, and stack unwinding, see [x64 calling convention](x64-calling-convention.md).
20
21
@@ -116,7 +117,7 @@ _declspec(align(2)) struct {
116
117
}
117
118
```
118
119
119
-

120
+
:::image type="content" source="../build/media/vcamd_conv_ex_1_block.png" alt-text="Diagram showing the structure layout for example 1. The diagram shows 2 bytes of memory. Member a, a short, occupies bytes 0 through 1.":::image-end:::
120
121
121
122
#### Example 2
122
123
@@ -130,7 +131,9 @@ _declspec(align(8)) struct {
130
131
}
131
132
```
132
133
133
-

134
+
:::image type="complex" source="../build/media/vcamd_conv_ex_2_block.png" alt-text="Diagram showing the structure layout for example 2.":::
135
+
The diagram shows 24 bytes of memory. Member a, an int, occupies bytes 0 through 3. The diagram shows padding for bytes 4 through 7. Member b, a double, occupies bytes 8 through 15. Member c, a short, occupies bytes 16 through 17. Bytes 18 through 23 are unused.
136
+
:::image-end:::
134
137
135
138
#### Example 3
136
139
@@ -145,7 +148,9 @@ _declspec(align(4)) struct {
145
148
}
146
149
```
147
150
148
-

151
+
:::image type="complex" source="../build/media/vcamd_conv_ex_3_block.png" alt-text="Diagram showing the structure layout for example 3.":::
152
+
The diagram shows 12 bytes of memory. Member a, a char, occupies byte 0. Byte 1 is padding. Member b, a short, occupies bytes 2 through 4. Member c, a char, occupies byte 4. Bytes 5 through 7 are padding. Member d, an int, occupies bytes 8 through 11.
153
+
:::image-end:::
149
154
150
155
#### Example 4
151
156
@@ -159,7 +164,9 @@ _declspec(align(8)) union {
159
164
}
160
165
```
161
166
162
-

167
+
:::image type="complex" source="../build/media/vcamd_conv_ex_4_block.png" alt-text="Diagram showing the union layout for example 4.":::
168
+
The diagram shows 8 bytes of memory. Member p, a char, occupies byte 0. Member s, a short, occupies bytes 0 through 1. Member l, a long, occupies bytes 0 through 3. Bytes 4 through 7 are padding.
0 commit comments