This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i386, asm and forbidden spilled registers...
- To: Krister Walfridsson <cato at df dot lth dot se>
- Subject: Re: i386, asm and forbidden spilled registers...
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sat, 31 Oct 1998 03:51:47 -0700
- cc: egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <Pine.LNX.3.96.981030233618.30322A-100000@bartlet.df.lth.se>you wr
ite:
> I tried to compile the NetBSD i386 kernel with a egcs built from todays
> source. Egcs complains on most asm statements, but I don't understand
> why...
You are clobbering ecx and edi explicitly *and* you reference them as an input
or an output. That is wrong. Clobbers must not overlap with inputs or
outputs. If they do, the compiler will now issue an error.
> Are there some kind of documentation somewhere how to write correct asm
> statements? I didn't find anything relevant in the gcc info files...
Look harder. There's a whole section on writing asms.
jeff