This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: register variable is clobbered by passing parameter to a function
Hi,
On Tue, 16 Mar 2004, Michael Matz wrote:
> > may be useful in programs such as programming language interpreters which
> > have a couple of global variables that are accessed very often.
>
> This says nothing about local register variables, like you used.
Excuse me, I confused you with another one ;-) Your problem is that r16
is used to pass arguments. The use of that register as gobal register var
doesn't prevent this, so it will be changed over function calls.
Ciao,
Michael.