This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/17884] New: asm 'volatile' is not honored as documented


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


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