This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Unsaved register?
- To: Michael Meissner <meissner at cygnus dot com>
- Subject: Re: Unsaved register?
- From: Erik Walthinsen <omega at temple-baptist dot com>
- Date: Tue, 29 May 2001 17:11:53 -0700 (PDT)
- cc: Geoff Keating <geoffk at geoffk dot org>, <gcc-bugs at gcc dot gnu dot org>
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/ *****
_\ /_