Skip to content

Commit b3decc0

Browse files
authored
Merge pull request #4009 from MicrosoftDocs/main637919470166763380
Repo sync for protected CLA branch
2 parents 4c6131d + ce8f91d commit b3decc0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/build/arm64ec-windows-abi-conventions.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ In addition to handling parameters and the return address, the thunk bridges the
125125

126126
The entry thunk performs the following actions:
127127

128-
| Parameter number | Stack usage | Stack unwind codes |
129-
|--|--|--|
130-
| 0-4 | Stores ARM64EC `v6` and `v7` into the caller-allocated home space<br/><br/>Since the callee is ARM64EC, which doesn't have the notion of a home space, the stored values aren't clobbered.<br/><br/>Allocates an extra 128 bytes on the stack and store ARM64EC `v8` through `v15`. | `UWOP_SAVE_XMM128` for `xmm6` and `xmm7`<br/><br/>`UWOP_ALLOC_SMALL` + `UWOP_SAVE_XMM128` for `xmm8-xmm15` |
131-
| 5-8 | `x4` = 5th parameter from the stack<br/>`x5` = 6th parameter from the stack<br/>`x6` = 7th parameter from the stack<br/>`x7` = 8th parameter from the stack<br/><br/>If the parameter is SIMD, the `v4`-`v7` registers are used instead | Same as above |
132-
| 9+ | Allocates `AlignUp(NumParams - 8 , 2) * 8` bytes on the stack. \*<br/><br/>Copies the 9th and remaining parameters to this area | `UWOP_ALLOC_SMALL` |
128+
| Parameter number | Stack usage |
129+
|--|--|
130+
| 0-4 | Stores ARM64EC `v6` and `v7` into the caller-allocated home space<br/><br/>Since the callee is ARM64EC, which doesn't have the notion of a home space, the stored values aren't clobbered.<br/><br/>Allocates an extra 128 bytes on the stack and store ARM64EC `v8` through `v15`. |
131+
| 5-8 | `x4` = 5th parameter from the stack<br/>`x5` = 6th parameter from the stack<br/>`x6` = 7th parameter from the stack<br/>`x7` = 8th parameter from the stack<br/><br/>If the parameter is SIMD, the `v4`-`v7` registers are used instead |
132+
| 9+ | Allocates `AlignUp(NumParams - 8 , 2) * 8` bytes on the stack. \*<br/><br/>Copies the 9th and remaining parameters to this area |
133133

134134
\* Aligning the value to an even number guarantees that the stack remains aligned to 16 bytes
135135

@@ -146,11 +146,11 @@ For every call that an ARM64EC C/C++ function makes to potential x64 code, the M
146146

147147
First, The thunk pushes the return address that's in the ARM64EC `lr` register and a dummy 8-byte value to guarantee that the stack is aligned to 16 bytes. Second, the thunk handles the parameters:
148148

149-
| Parameter number | Stack usage | Stack unwind codes |
150-
|--|--|--|
151-
| 0-4 | Allocates 32 bytes of home space on the stack | `UWOP_ALLOC_SMALL` |
152-
| 5-8 | Allocates `AlignUp(NumParams - 4, 2) * 8` more bytes higher up on the stack. \* <br/><br/> Copies the 5th and any subsequent parameters from ARM64EC's `x4`-`x7` to this extra space | `UWOP_ALLOC_SMALL` |
153-
| 9+ | Copies the 9th and remaining parameters to the extra space | `UWOP_ALLOC_SMALL` |
149+
| Parameter number | Stack usage |
150+
|--|--|
151+
| 0-4 | Allocates 32 bytes of home space on the stack |
152+
| 5-8 | Allocates `AlignUp(NumParams - 4, 2) * 8` more bytes higher up on the stack. \* <br/><br/> Copies the 5th and any subsequent parameters from ARM64EC's `x4`-`x7` to this extra space |
153+
| 9+ | Copies the 9th and remaining parameters to the extra space |
154154

155155
\* Aligning the value to an even number guarantees that the stack remains aligned to 16 bytes.
156156

0 commit comments

Comments
 (0)