This is the mail archive of the gcc@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: i386, asm and forbidden spilled registers...



  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


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