Using local register variable
Tue Dec 30 17:34:00 GMT 2003
I meant that a5 was used when I defined a pointer foo and it wasn't used
when I defined int y.
<email@example.com To: "Tal Agmon" <Tal.Agmon@nsc.com>
ebingen.de> cc: firstname.lastname@example.org, "Tomer Levi" <Tomer.Levi@nsc.com>
Subject: Re: Using local register variable
12/30/03 07:13 PM
"Tal Agmon" <Tal.Agmon@nsc.com> writes:
> The manual says:
> You can define a local register variable with a specified register like
> register int *foo asm ("a5");
> My question: is foo must be a pointer or can I define for example:
> register int y asm ("a5");
Both are legal.
> I'm asking this because in gcc-3.3.2 I saw (in a very simple program
> with no reason not the preserve a register) that a5 was not
> preserved for y, and when I defined it as in the first example, a5
> WAS preserved for foo.
I don't understand what you mean by "preserve", so I can't comment on
More information about the Gcc-help