This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Using local register variable


Hi,

The manual says:
You can define a local register variable with a specified register like
this:
register int *foo asm ("a5");

My question: is foo must be a pointer or can I define for example:
register int y asm ("a5");

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.

Regards,

   Tal.






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]