This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: mips64 target erroneously reorders "asm"
- To: pkoning at xedia dot com
- Subject: Re: mips64 target erroneously reorders "asm"
- From: Ian Lance Taylor <ian at cygnus dot com>
- Date: Fri, 3 Oct 1997 16:26:12 -0400
- CC: egcs-bugs at cygnus dot com
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