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]

Re: asm, 'r' constraint, floating point registers?


On Thu, Oct 11, 2001 at 09:38:26AM -0700, Richard Henderson wrote:
> On Thu, Oct 11, 2001 at 08:43:57AM -0700, Zack Weinberg wrote:
> > I've been talking off list with a user about his asm() problems and
> > discovered something odd.
> > 
> > If you write
> > 
> >   int n;
> >   asm ("frob %0" : "+r" (n));
> > 
> > one would generally expect n not to be put into a floating point
> > register.  The user insists this is what happens.  Is this 
> > (a) a bug in his port, (b) a bug in the machine-independent code, or
> > (c) expected behavior which must be avoided somehow?  I must confess I
> > don't know where to begin looking.
> 
> "In his port"?  So this isn't x86 or something?  If so, 
> it's probably a bug in the definition of the register 
> classes.

I don't know which port it is actually, he's being very vague, but I'm
pretty sure it's not x86.

I'm more wondering what "r" is or is not supposed to do.  Mike Stump
seems to think it includes both integer and floating point registers;
however, given that most ports don't bother implementing a letter that
means "just the integer registers", I had always thought that was
because that's what "r" means.  And normally one does not describe
floating registers as "general purpose."

zw


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