|
From: Paul M. <pa...@sa...> - 2005-11-11 02:25:18
|
sv...@va... writes: > Comments from Greg Parker re ppc ABI conventions. > + /* For Linux/ppc32 we need the SysV ABI, which uses > + LR->4(parent_sp), CR->anywhere. > + (The AIX ABI, used on Darwin, and maybe Linux/ppc64?, > + uses LR->8(prt_sp), CR->4(prt_sp)) The 64-bit PowerPC ELF ABI is similar to the 64-bit AIX (PowerOpen) ABI but not identical. In any case, being 64-bit, it saves LR at parent_sp + 16 and CR at parent_sp + 8 (not that CR is 64 bits). > + /* Probably not necessary to save r13 (thread-specific ptr), > + as VEX stays clear of it... but what the hey. */ > stw 13,276(1) r13 is the small data area pointer in the ppc32 ELF ABI, but it is rarely used; I think only programs that use the embedded variant of the ABI (the EABI) use it. > -// CAB: this necessary? > + /* It's necessary to save/restore VRSAVE in the AIX / Darwin ABI > + The Linux kernel might not actually use VRSAVE for its intended > + purpose, but it should be harmless to preserve anyway. */ Linux doesn't use VRSAVE to control which VRs get saved and restored, because it's never been clear to me that doing a conditional branch to avoid a vector store would be a win. :) Paul. |