r13 is non-volatile?

Kumar Gala kumar.gala at freescale.com
Fri Sep 9 02:28:54 EST 2005


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 and system thread id in  
ppc64.  So I'm wondering should we really be considering it NV on ppc32?


PPC32:

#define SAVE_NVGPRS(base)       SAVE_GPR(13, base); SAVE_8GPRS(14,  
base); \
                                 SAVE_10GPRS(22, base)
#define REST_NVGPRS(base)       REST_GPR(13, base); REST_8GPRS(14,  
base); \
                                 REST_10GPRS(22, base)

PPC64:
#define SAVE_NVGPRS(base)       SAVE_8GPRS(14, base); SAVE_10GPRS(22,  
base)
#define REST_NVGPRS(base)       REST_8GPRS(14, base); REST_10GPRS(22,  
base)

- kumar



More information about the Linuxppc64-dev mailing list