This is the mail archive of the
mailing list for the GCC project.
Re: Extending constraints using register subclasses
Thank you Andrew, I wasn't aware of that. Will be going that way.
Just out of curiosity, was there something flawed in the way I took before?
Meaning, could have been done that way, but my code was wrong somewhere?
----- Original Message ----
> From: Andrew Pinski <firstname.lastname@example.org>
> To: Jamie Prescott <email@example.com>
> Cc: firstname.lastname@example.org
> Sent: Monday, May 11, 2009 4:47:57 PM
> Subject: Re: Extending constraints using register subclasses
> On Mon, May 11, 2009 at 4:45 PM, Jamie Prescott wrote:
> > Hi!
> > I wanted to add finer (one per) register subclasses, so that I can more finely
> > the register placement inside the inline assembly.
> You don't need that.
> You can just use asm("registername") on variables.
> like so:
> int f(int a)
> register int r0 __asm__("r0");
> asm("use %0": "+r"(r0) );
> Andrew Pinski