This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]