This is the mail archive of the gcc-patches@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] |
Other format: | [Raw text] |
On Oct 12, 2004, at 3:31 PM, Fariborz Jahanian wrote:For example, you can't use floating point instructions to set the+instruction.) Note that even a volatile @code{asm} instruction +can be moved relative to other code, including across jump +instructions. For example, you can't use a volatile @code{asm}
bits of a floating point control register and expect those instructions
not [to] be moved...
No, I want to make it clear that the asm is setting the FPCR. If I add "other" as below does that help?
sum = xDD.d[0] + xDD.d[1]; asm volatile("mtfsf 255,%0" : : "f" (fpenv));
+instruction to set the bits of a floating point control register +and expect that
other
floating point instructions will not be moved
+across the @code{asm}; they can be. Similarly, you can't expect a
+sequence of volatile @code{asm} instructions to remain perfectly
+consecutive. If you want consecutive output, use a single @code{asm}.
+Also, GCC will perform some optimizations across a volatile @code{asm}
+instruction; GCC does not ``forget everything'' when it encounters
+a volatile @code{asm} instruction the way some other compilers do.
Maybe you want to say what you mean by ``forget everything''.
An @code{asm} instruction without any operands or clobbers (an ``old
without any output operands or...
I didn't write these bits.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |