Skip to content

Commit 07cb9d0

Browse files
committed
Add EC function name decoration section
1 parent 12fde16 commit 07cb9d0

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,14 @@ When the helper then returns to the thunk, the thunk:
171171

172172
At the beginning of an x64 function, the stack pointer points to the return address that was pushed onto the stack by the caller's `call` instruction. In contrast, at the beginning of an Arm64EC function, the return address is in the LR register, set by the caller's `bl` instruction. Therefore, when unwinding the deepest frame of a stack, if the frame corresponds to an Arm64EC function, the x64 unwinder must recreate the value of Arm64EC `lr` by reading the value stashed in the x87 registers when the exception occurred. In addition, the new x64 unwind code `UWOP_SAVE_RET` handles the prolog saving Arm64EC `lr` to the stack.
173173

174+
## Arm64EC function name decoration
175+
176+
An Arm64EC function name has a secondary decoration applied after any language-specific decoration. For functions with C linkage (C functions or `extern "C"`), a `#` is prepended to the name. For C++ decorated functions, a `$$h` tag is inserted into the name.
177+
```
178+
foo => #foo
179+
?foo@@YAHXZ => ?foo@@$$hYAHXZ
180+
```
181+
174182
## `__vectorcall`
175183

176184
The Arm64EC toolchain currently doesn't support `__vectorcall`. The compiler emits an error when it detects `__vectorcall` usage with Arm64EC.

0 commit comments

Comments
 (0)