The mode switching for floating point rounding that the i386 backend does
does not actually place mode switches, but rather the calculation of values
used for mode switches.  Not only does that defeat the purpose of doing
lazy code motion of the mode switches themselves (this problem could easily
be remedied by handling the actual mode switches as a separate entity),
it also leads to information in the floating point control register being
clobbered if the user changes it (e.g. with feenableexcept:
http://www.gnu.org/software/libc/manual/html_node/Control-Functions.html)
between the calculation of the value used for a mode switch, and the point
where a mode switch actually takes place.


-- 
           Summary: i386 mode switching clobbers fp exception handling bits
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amylaar at gcc dot gnu dot org
GCC target triplet: i386-*-*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29347

Reply via email to