Hello!

There is no point to access FP hardware for soft-float targets.

2013-11-03  Uros Bizjak  <ubiz...@gmail.com>

    * config/i386/crtfastmath.c: Compile only for !_SOFT_FLOAT.
    * config/i386/crtprec.c: Ditto.

Tested on x86_64-pc-linux-gnu, committed to mainline SVN.

Uros.
Index: config/i386/crtfastmath.c
===================================================================
--- config/i386/crtfastmath.c   (revision 204324)
+++ config/i386/crtfastmath.c   (working copy)
@@ -21,6 +21,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#ifndef _SOFT_FLOAT
 #define MXCSR_DAZ (1 << 6)     /* Enable denormals are zero mode */
 #define MXCSR_FTZ (1 << 15)    /* Enable flush to zero mode */
 
@@ -134,3 +135,4 @@
   __builtin_ia32_ldmxcsr (mxcsr);
 #endif
 }
+#endif
Index: config/i386/crtprec.c
===================================================================
--- config/i386/crtprec.c       (revision 204324)
+++ config/i386/crtprec.c       (working copy)
@@ -21,6 +21,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#ifndef _SOFT_FLOAT
 #if __PREC == 32
  #define X87CW         (0 << 8)        /* Single precision (24 bits) */
 #elif __PREC == 64
@@ -45,3 +46,4 @@
 
   asm volatile ("fldcw\t%0" : : "m" (cwd));
 }
+#endif

Reply via email to