|
From: Cerion Armour-B. <ce...@op...> - 2005-11-09 14:34:48
|
On Wednesday 09 November 2005 01:53, Paul Mackerras wrote: > Greg Parker writes: > > You probably also need to save the condition register, because some > > of the condition register fields are callee-saved in the AIX ABI. > > And, more relevantly, in the 32-bit PowerPC ELF ABI. Specifically > cr2 - cr4 are callee-saved. > > Paul. Ok, saving/restoring CR now (r5055). But a couple of questions: Most ppc32 abi references I find ask for LR to be stored at 8(parent_sp), and CR at 4(parent_sp). But doing this seems to corrupt my stack: I get valgrind: m_scheduler/scheduler.c:442 (run_thread_for_a_while): Assertion 'trc == 0' failed. 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. Am wondering if there's a 'right way' to do this? Also, I'm now saving/restoring the VRSAVE register - is this correct/necessary? Cheers, Cerion |