Re: inline asm: How to push PIC reg before seven input operands get loaded?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



lynx.abraxas@xxxxxxxxxx writes:
 > On 24/03/07 20:42:02, Andrew Haley wrote:
 > 
 > Is  there then an option to gcc that lets gcc push all registers before asm so
 > that I can use what I need  without  having  to  hope  gcc  lets  me  use  all
 > registers?

No.
 
 > >  >  But if I specified "b" it complains about: error: PIC register
 > >  > %ebx clobbered in asm
 > >  >
 > >  > Is this a bug in gcc??? Is there a constraint just for ebp so I
 > >  > don't have to use "R" and hope it gets into ebp?
 > >
 > > Why do you care that it is in ebp?  Why do you not allow gcc to choose
 > > the register?  You seem to want to use explicit registers in your asm,
 > > but I can't see any reason why you want to do that.  gcc usually works
 > > better when you let gcc choose the registers.
 > 
 > I tried with just "r". But then gcc complains about not enough
 > registers as it seems not wanting to use ebp and it still doesn't
 > want to give up on ebx for PIC.

Please, give us a test case.

 > Another reason is I don't know how to specify a register in the asm
 > code that is still empty. Like in my problem I need at least one
 > empty register apart the six preloaded ones. I use ebx there, so I
 > can circumvent the PIC problem.  Is there a way to specify an empty
 > register without a direct name?

Sure, you just need to use an input/ouput register operand.  It's in
the docs.

 > And %dx I use because there is no way mentioned in the docs how to
 > reduce the size when using eg %3.

How to reduce the size of what?  This doesn't make any sense to me.
Please, give us a test case.

Andrew.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux