This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Register clobbering on Sparc



I'm debugging a piece of code that crashes on Sparc. In the code registers 
are specified directly:

Specifically:

#define subr_self_register  "%g4"

Now, g4 is supposedly used when generating code on Sparc with the "embedany" 
model, but as far as I am aware this is not the default. I get this warning 
when compiling:

warning: call-clobbered register used for global register variable 

Whenever I use the above define. Can I use g4 on Sparc for general purpose 
use? Can I find a list somewhere of all registers on Sparc and which ones are 
call-clobbered?

Can anyone point me to any reference that explains parameter passing on Sparc 
as it seems a little wierd? (please don't point me to the architecture 
manual, it's almost impossible to get in the UK)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]