|
From: Cerion Armour-B. <ce...@op...> - 2005-11-11 01:01:23
|
On Thursday 10 November 2005 20:25, Nicholas Nethercote wrote: > On Thu, 10 Nov 2005, Greg Parker wrote: > >> If i conform to SysV ppc32 abi (as I have been doing), setting LR at 4 > >> (parent_sp), and CR in current stack, all's (seemingly) well. > > > > The LR->8(sp) / CR->4(sp) convention is part of the AIX ABI, which > > is also used on Darwin and (I think) Linux/ppc64. For Linux/ppc32 > > you do need the SysV ABI, which uses LR->4(sp) / CR->anywhere. In the > > SysV ABI, 8(sp) is usually part of the parent frame's local variable > > storage, so it's reasonable that using it clobbers local variable trc. > > > >> Also, I'm now saving/restoring the VRSAVE register - is this > >> correct/necessary? > > > > It's necessary in the AIX / Darwin ABI. The Linux kernel might > > not actually use vrsave for its intended purpose, but it should > > be harmless to preserve vrsave anyway. > > This looks like good info to stick in the code as comments. > > Nick Done, thanks Greg. Cerion |