r13 is non-volatile?
linas at austin.ibm.com
Fri Sep 9 05:30:53 EST 2005
On Thu, Sep 08, 2005 at 07:01:18PM +0200, Segher Boessenkool was heard to remark:
> >Was looking at merging some code between ppc32 & ppc64 and noticed
> >that in ppc32 we consider r13 to be part of the non-volatile register
> >set. Is this really correct?
> >r13 is suppose to be sdata pointer in ppc32
> sdata pointer is non-volatile by definition...
> >and system thread id in ppc64.
> The 64-bit kernel uses GPR13 as the PACA pointer, so it handles
> it specially
There's a different value in R13 depending on which cpu you're on,
so one mustn't save R13 on one CPU and attempt to restore it on
Maybe, for ppc32, you can pretend that r13 "is like a paca"? So
that instead of saving/restoring r13 like this, you could set it up
at the same time/instead of setting up the paca r13?
More information about the Linuxppc-dev