question regarding asm()

Marc Lehmann pcg@goof.com
Tue Oct 7 23:14:00 GMT 1997


Sorry to post this question again, but my last e-mail was definitely ignored,
and the documentation still is wrong.... (And I still have no idea
how, for example, kernel people are supposed to tell gcc NOT to
use some registers in an asm that are used in an asm...)

----- Forwarded message from Marc Lehmann -----

David Edelsohn wrote:
>	Clobber just means that GCC cannot make assumptions about the
>register after the call, not before.

That's what I expected, but the docs seems to sugest otherwise..

>You explicitly use r9 and r10 in your pattern but never tell GCC.  The
>pattern should list r9 and r10 as

It's not "my" pattern, it is taken as an example from the gcc info files, so
the documentation is wrong and should be fixed.

>inputs so that GCC knows not to touch them.  In fact you should leave the
>destinations as open register but make those required inputs so that GCC
>fills them in during register allocation.

The problem is that one cannot on all ports of gcc select
specific registers as input (in that case, r9), but
only register classes.

How am I supposed to tell gcc that (say..) register r13 is NOT to be used as
input in an asm when the target machine has no constraint specificly for
r13? (on the x86 you have almost one class per reg, so that's not a problem,
but this is not true for %ebp... there is NO way to tell gcc NOT to use %ebp
as an input operand, or do I miss sth.?)

      -----==-
      ----==-- _
      ---==---(_)__  __ ____  __       Marc Lehmann
      --==---/ / _ \/ // /\ \/ /       pcg@goof.com
      -=====/_/_//_/\_,_/ /_/\_\
    The choice of a GNU generation

----- End of forwarded message from Marc Lehmann -----



More information about the Gcc mailing list