mips64 target erroneously reorders "asm"

Ian Lance Taylor ian@cygnus.com
Fri Oct 3 13:26:00 GMT 1997


   Date: Fri, 3 Oct 1997 15:50:24 -0400
   From: Paul Koning <pkoning@xedia.com>

   I have some code that, in a nutshell, does the following:

	   asm("foo");
	   <some operations on volatile data>
	   asm("bar");

   The resulting mips code has the "asm" operations reordered with
   respect to the volatile data operations they enclose.  Clearly this is
   not correct, and, for example, the sparc-solaris2.4 target (which is
   my host) does it right.

What happens if you use asm volatile?
	   asm volatile ("foo");

Ian



More information about the Gcc-bugs mailing list