This is the mail archive of the gcc@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]

Re: RegRegname vs. Explicit Local Register Variables ...


On Fri, 24 May 2002, Matthijs van Duin wrote:

> At 22:05 -0400 23-05-2002, Craig Newell wrote:
> >I am using explicit register variables to place arguments and return
> >values in the correct registers for system calls.  eg.
>
> I had a similar problem (with trying to use CMPXCHG which uses %eax
> as a hard register)
>
> the solution was to make the variables "volatile register"

Am I the only one that feels that this is the wrong approach?

You can specify in the constraints for the asm expression that the
variable should go into register a so there should be no need to do any of
the tricks you are using.


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