forked from FEX-Emu/FEX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARM64EC: Handle calls into ARM64EC code with an 8-byte-aligned SP
ARM64 requires that SP is always 16-byte aligned for memory accesses, but ARM64EC shares the SP between x64 code and ARM64 code, the former of which doesn't enforce such a restriction. This causes crashes in programs such as HITMAN 3 that don't correctly follow the Windows ABI and call into system library functions with SP only 8-byte-aligned. Fixup stack alignment in such cases by leaving the 8-byte return address on the stack and returning to a lone 'ret' instruction instead.
- Loading branch information
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters