This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/17884] New: asm 'volatile' is not honored as documented
- From: "fjahanian at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Oct 2004 19:30:59 -0000
- Subject: [Bug tree-optimization/17884] New: asm 'volatile' is not honored as documented
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In the following test case compiled with -O1 the add instruction is found *outside* the protective
"mtfsf". 'volatile' keyword added to 'asm' was meant to prevent such cases. gcc-3.3 behaves
correctly. Is this a know problem? Is there a PR already for it?
double foo( )
{
double sum;
double fpenv;
double DDD, FFF;
sum = DDD + FFF;
asm volatile("mtfsf 255,%0" : : "f" (fpenv));
return sum;
}
_foo:
mtfsf 255,f0
fadd f1,f1,f0
blr
--
Summary: asm 'volatile' is not honored as documented
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fjahanian at apple dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc-apple-darwin7.2.0
GCC host triplet: powerpc-apple-darwin7.2.0
GCC target triplet: powerpc-apple-darwin7.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17884