i386, asm and forbidden spilled registers...

Jeffrey A Law law@cygnus.com
Sat Oct 31 02:52:00 GMT 1998


  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



More information about the Gcc mailing list