diff mbox

[Fortran] PR35862 - add input I/O rounding support - by setting the CPU rounding mode

Message ID 51EBFB6B.10106@net-b.de
State New
Headers show

Commit Message

Tobias Burnus July 21, 2013, 3:16 p.m. UTC
Tobias Burnus wrote:
> I have now committed the patch (Rev. 201093).
I missed the attached patch, which fixes the build. (Rev. 201095)

Tobias
diff mbox

Patch

Index: libgfortran/ChangeLog
===================================================================
--- libgfortran/ChangeLog	(Revision 201094)
+++ libgfortran/ChangeLog	(Arbeitskopie)
@@ -1,4 +1,10 @@ 
 2013-07-21  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/35862
+	* config/fpu-387.h (set_fpu_rounding_mode,
+	get_fpu_rounding_mode): Add missing _ to fix build.
+
+2013-07-21  Tobias Burnus  <burnus@net-b.de>
 	    Uros Bizjak  <ubizjak@gmail.com>
 
 	PR fortran/35862
Index: libgfortran/config/fpu-387.h
===================================================================
--- libgfortran/config/fpu-387.h	(Revision 201094)
+++ libgfortran/config/fpu-387.h	(Arbeitskopie)
@@ -202,7 +202,7 @@  set_fpu_rounding_mode (int round)
 
   __asm__ __volatile__ ("fnstcw\t%0" : "=m" (cw));
 
-  cw &= ~FPU_RC_MASK;
+  cw &= ~_FPU_RC_MASK;
   cw |= round_mode;
 
   __asm__ __volatile__ ("fldcw\t%0" : : "m" (cw));
@@ -214,7 +214,7 @@  set_fpu_rounding_mode (int round)
       __asm__ __volatile__ ("%vstmxcsr\t%0" : "=m" (cw_sse));
 
       /* The SSE round control bits are shifted by 3 bits.  */
-      cw_sse &= ~(FPU_RC_MASK << 3);
+      cw_sse &= ~(_FPU_RC_MASK << 3);
       cw_sse |= round_mode << 3;
 
       __asm__ __volatile__ ("%vldmxcsr\t%0" : : "m" (cw_sse));
@@ -228,7 +228,7 @@  get_fpu_rounding_mode (void)
 
   __asm__ __volatile__ ("fnstcw\t%0" : "=m" (cw));
 
-  cw &= FPU_RC_MASK;
+  cw &= _FPU_RC_MASK;
 
   switch (cw)
     {