-
Enhancement
-
Resolution: Fixed
-
P3
-
repo-panama
Both the Windows x64 and SysV ABIs mark xmm16-31 as volatile not callee-saved:
Windows [1]:
On AVX512VL, the ZMM, YMM, and XMM registers 16-31 are also volatile.
SysV, figure 3.4 Register Usage (page) [2]:
Register: %xmm16–%xmm31, Usage: temporary registers, callee saved: No
However, both the Windows x64 and SysV CallArranger don't include these registers in the list of volatile registers, meaning the upcall stubs will needlessly save them when doing an upcall.
[1]: https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170#callercallee-saved-registers
[2]: https://gitlab.com/x86-psABIs/x86-64-ABI
Windows [1]:
On AVX512VL, the ZMM, YMM, and XMM registers 16-31 are also volatile.
SysV, figure 3.4 Register Usage (page) [2]:
Register: %xmm16–%xmm31, Usage: temporary registers, callee saved: No
However, both the Windows x64 and SysV CallArranger don't include these registers in the list of volatile registers, meaning the upcall stubs will needlessly save them when doing an upcall.
[1]: https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170#callercallee-saved-registers
[2]: https://gitlab.com/x86-psABIs/x86-64-ABI
- relates to
-
JDK-8316125 Windows call_stub unnecessarily saves xmm16-31 when UseAVX>=3
- Resolved