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: question regarding asm()


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


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