This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to teach gcc, that registers are clobbered by api calls?
- From: rridge at csclub dot uwaterloo dot ca (Ross Ridge)
- To: gcc at gcc dot gnu dot org
- Date: Mon, 21 Apr 2008 16:42:24 -0400 (EDT)
- Subject: Re: How to teach gcc, that registers are clobbered by api calls?
H.J. Lu writes:
>Are r10-r15 callee-saved in w64ABI?
Here's what Microsoft's documentation says:
Caller/Callee Saved Registers
The registers RAX, RCX, RDX, R8, R9, R10, R11 are considered
volatile and must be considered destroyed on function calls
(unless otherwise safety-provable by analysis such as whole
program optimization).
The registers RBX, RBP, RDI, RSI, R12, R13, R14, and R15 are
considered nonvolatile and must be saved and restored by a
function that uses them
Other parts of the documentation state that XMM0-XMM5 are volatile
(caller-saved), while XMM6-XXM15 are non-volatile (callee-saved).
Ross Ridge