This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: clobbering input args in inline asm
- From: Andrew Haley <aph at redhat dot com>
- To: Stas Sergeev <stsp at aknet dot ru>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 2 May 2006 20:53:29 +0100
- Subject: Re: clobbering input args in inline asm
- References: <445298BE.8000800@aknet.ru> <17491.10538.514085.559389@zapata.pink> <4453358D.8060600@aknet.ru> <17495.14336.508165.471838@zapata.pink> <4457B15D.8000102@aknet.ru>
Stas Sergeev writes:
> Hi.
>
> Andrew Haley wrote:
> >> doesn't work", but rather "what does the "0" mean, when
> >> put in the clobber list?"
> > It means nothing.
> Well, the real reason why I wrote the message, was
> that I suspected the bug. When I put "0" in clobber, gcc
> eats it *unless* I have "a" in input list - then it complains.
> Any other register class in input with "0" in clobber seem to
> be accepted without a complain.
> That looked very suspicious, but of course I couldn't fill up
> the bug entry without knowing what exactly "0" means in the
> clobber list. Now if it means *nothing*, then the bug is definitely
> not there. I just wanted to be sure. :)
The real thing going on here is that gcc exposes some of its internal
structures in extended asm. That's what all this clobber stuff is,
register constraints, and so on. It's all part of gcc's machine
description.
If you *really* want to know how RTL templates in the machine
description are formed, see 13.4, RTL Template, in gccint.info. This
will tell you about the different forms a clobber can take. And then
you'll see what's really going on. This might be more than you really
want to know. :-)
Andrew.