This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Register clobbering on Sparc
- From: Will Newton <will at misconception dot org dot uk>
- To: gcc-help at gnu dot org
- Date: Sun, 24 Mar 2002 15:31:41 +0000
- Subject: 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)