Skip to content

Commit 182a624

Browse files
authored
Merge pull request #5264 from knutaf/patch-1
Clarify that arguments on the stack are 8-byte aligned.
2 parents 09aba92 + dc05b48 commit 182a624

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/build/x64-calling-convention.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Prologs and epilogs are highly restricted so that they can be properly described
3333

3434
## Parameter passing
3535

36-
By default, the x64 calling convention passes the first four arguments to a function in registers. The registers used for these arguments depend on the position and type of the argument. Remaining arguments get pushed on the stack in right-to-left order.
36+
By default, the x64 calling convention passes the first four arguments to a function in registers. The registers used for these arguments depend on the position and type of the argument. Remaining arguments get pushed on the stack in right-to-left order. All arguments passed on the stack are 8-byte aligned.
3737

3838
Integer valued arguments in the leftmost four positions are passed in left-to-right order in RCX, RDX, R8, and R9, respectively. The fifth and higher arguments are passed on the stack as previously described. All integer arguments in registers are right-justified, so the callee can ignore the upper bits of the register and access only the portion of the register necessary.
3939

0 commit comments

Comments
 (0)