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

[patches] DFP branch: Define _FPU_* macros to fix S/390 build.


on DFP branch printf_fp.c is now including fpu_control.h and relies on
the _FPU_* macros to be defined for every platform.  This hasn't been
the case for S/390 so far what currently breaks the build of eglibc.

The attached patch fixes this by adding the necessary macros.

If you think it's ok to apply please do and I'll try to get this also
integrated into glibc (although there is no user of these macros



2008-08-21  Andreas Krebbel  <krebbel1@xxxxxxxxxx>

	* sysdeps/s390/fpu/fpu_control.h: Add definitions for the
	internally used macros for decoding the floating point control

Index: sysdeps/s390/fpu/fpu_control.h
--- sysdeps/s390/fpu/fpu_control.h.orig	2008-08-21 13:37:08.000000000 +0200
+++ sysdeps/s390/fpu/fpu_control.h	2008-08-21 14:07:46.000000000 +0200
@@ -24,6 +24,19 @@
 # include <features.h>
+/* rounding control */
+#define _FPU_RC_NEAREST 0x00   /* RECOMMENDED */
+#define _FPU_RC_DOWN    0x03
+#define _FPU_RC_UP      0x02
+#define _FPU_RC_ZERO    0x01
+/* masking of interrupts */
+#define _FPU_MASK_ZM  0x40 /* zero divide */
+#define _FPU_MASK_OM  0x20 /* overflow */
+#define _FPU_MASK_UM  0x10 /* underflow */
+#define _FPU_MASK_XM  0x08 /* inexact */
+#define _FPU_MASK_IM  0x80 /* invalid operation */
 /* These bits are reserved are not changed.  */
 # define _FPU_RESERVED 0x070700FC