Subject: Re: %g registers
To: None <port-sparc@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc
Date: 12/02/2002 20:16:32
> And the problem is that gcc clobbers app registers.

> [...gcc doc extract...]

I don't think so.  Remember, my code calls nothing but .mul, which is
written in assembly and doesn't use any %g registers (except %g0) - I
specifically went and looked at it to see if it was responsible.  It's
not calling anything written in C...indeed, if I didn't (a) need to
call .mul and (b) need more registers, I would have made it a leaf
routine.

Update - I've switched from using %g1-%g4 to using %g2-%g5 and the
symptoms have gone away.  (Though of course it's possible that, for
example, the high bits are being cleared in a register that I use only
for small integers, or that the low bit is being cleared in a register
I use as a fullword pointer, or some such.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B