I could not find any document defining how the YMM registers are processed by the caller and the called user.
To focus my question, here is what I would like to know:
- What YMM registers must be restored by the called party before returning to the calling party?
- Since there are differences for the XMM registers on Linux and Windows, I assume that also the YMM registers do not follow the same rules. What are the rules for each OS?
EDIT: Thanks to the answer below, I was able to remove the answer in the mentioned document for Win64. I am absolutely sure that Linux follows similar rules:
"... The YMM registers do not have callee-save status, except for the lower half of YMM6-YMM15 in 64-bit Windows, where XMM6-XMM15 have callee-save status. Possible future extensions of the vector registers to 512 bits or more will not have calleesave status. ..."
source share