Subject: Register questions (again)
To: None <port-sparc@NetBSD.ORG>
From: Krister Walfridsson <cato@df.lth.se>
List: port-sparc
Date: 06/14/1997 22:10:34
If I remember correctly, SPARC ABI says that %g2-%g4 are reserved for
applications. I know that we trash %g2 in some header files (and that
I don't know enough to fix it) but what about %g3? From my programs I
can see that its content is being destroyed, but I haven't found where.

/usr/src/gnu/usr.bin/gcc/arch/sparc/sparc.h says
   On non-v9 systems:
   g1 is free to use as temporary.
   g2-g4 are reserved for applications.  Gcc normally uses them as
   temporaries, but this can be disabled via the -mno-app-regs option.

Doesn't this mean that we must use -mno-app-regs when we compile
libraries, to be able to use %g3-%g4 safely in user apps?

   /Krister