[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] Fix sysdeps/powerpc/bits/mathdef.h for soft-float and e500



The latest merge from FSF brought in definitions of FP_FAST_FMA and 
FP_FAST_FMAF in sysdeps/powerpc/bits/mathdef.h.  These are only applicable 
for classic hard-float, and in accordance with the principles in EGLIBC of 
keeping installed headers suitable for different multilibs I've applied 
this patch to that header to disable these definitions for __NO_FPRS__ - 
which covers both soft-float and e500, neither of which has fast fma.

Index: sysdeps/powerpc/bits/mathdef.h
===================================================================
--- sysdeps/powerpc/bits/mathdef.h	(revision 11843)
+++ sysdeps/powerpc/bits/mathdef.h	(working copy)
@@ -39,8 +39,10 @@
 # define FP_ILOGB0	(-2147483647)
 # define FP_ILOGBNAN	(2147483647)
 
+#ifndef __NO_FPRS__
 /* The powerpc has a combined multiply/add instruction.  */
-# define FP_FAST_FMA 1
-# define FP_FAST_FMAF 1
+#  define FP_FAST_FMA 1
+#  define FP_FAST_FMAF 1
+#endif
 
 #endif	/* ISO C99 */
Index: ChangeLog.eglibc
===================================================================
--- ChangeLog.eglibc	(revision 11843)
+++ ChangeLog.eglibc	(working copy)
@@ -1,3 +1,8 @@
+2010-10-21  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/powerpc/bits/mathdef.h (FP_FAST_FMA, FP_FAST_FMAF): Do
+	not define if __NO_FPRS__.
+
 2010-09-29  Nobuhiro Iwamatsu  <iwamatsu@xxxxxxxxxxx>
 	    Andrew Stubbs  <ams@xxxxxxxxxxxxxxxx>
 

-- 
Joseph S. Myers
joseph@xxxxxxxxxxxxxxxx