This is the mail archive of the gcc-bugs@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: Unsaved register?


On Tue, 29 May 2001, Michael Meissner wrote:

> However, __asm__ isn't a function call, so rules for what registers are
> clobbered or not do not apply.  The whole point of extended asm is to tell the
> compiler, exactly what the inputs are, what the outputs are, what else is
> clobbered, and whether or not the optimizer can move it.

So in this case, is listing %ecx as a clobbered register the correct
solution?  Or should I somehow split the asm into two pieces and put the
function call in between, in regular C?  It seems that that would be hard,
since the branching is done explicitely in the asm.  It's just that
listing %ecx as clobbered seems a hackish solution, since who's to say
(without looking at the ABI spec) that other registers could cause the
same problem?

TIA,
   Omega

      Erik Walthinsen <omega@temple-baptist.com> - System Administrator
        __
       /  \                GStreamer - The only way to stream!
      |    | M E G A        ***** http://gstreamer.net/ *****
      _\  /_


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