aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2013-06-28 20:28:25 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-06-28 20:28:25 +0000
commit0cad7ea2485b4bb05eb968a2399bec90a1450884 (patch)
treeca6f0e05f0b2aa53a52b60be690a2a1b5c5a1170 /ports
parent3d0f5d0c7a2de86575d68618352f7a5dfe7305fd (diff)
downloadglibc-0cad7ea2485b4bb05eb968a2399bec90a1450884.tar
glibc-0cad7ea2485b4bb05eb968a2399bec90a1450884.tar.gz
glibc-0cad7ea2485b4bb05eb968a2399bec90a1450884.tar.bz2
glibc-0cad7ea2485b4bb05eb968a2399bec90a1450884.zip
Support no-FPU ColdFire in sysdeps/m68k/fpu_control.h.
Diffstat (limited to 'ports')
-rw-r--r--ports/ChangeLog.m68k10
-rw-r--r--ports/sysdeps/m68k/fpu_control.h16
2 files changed, 23 insertions, 3 deletions
diff --git a/ports/ChangeLog.m68k b/ports/ChangeLog.m68k
index c5b1e2156d..15c8da32c8 100644
--- a/ports/ChangeLog.m68k
+++ b/ports/ChangeLog.m68k
@@ -1,3 +1,13 @@
+2013-06-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ * sysdeps/m68k/fpu_control.h [__mcoldfire__ && !__mcffpu__]
+ (_FPU_RESERVED): Provide alternative definition.
+ [__mcoldfire__ && !__mcffpu__] (_FPU_DEFAULT): Likewise.
+ [__mcoldfire__ && !__mcffpu__] (_FPU_GETCW): Likewise.
+ [__mcoldfire__ && !__mcffpu__] (_FPU_SETCW): Likewise.
+ [!(__mcoldfire__ && !__mcffpu__)]: Make existing macro definitions
+ conditional.
+
2013-06-25 Andreas Schwab <schwab@linux-m68k.org>
* sysdeps/m68k/sysdep.h (CALL_MCOUNT) [PROF]: Use %a6 instead of
diff --git a/ports/sysdeps/m68k/fpu_control.h b/ports/sysdeps/m68k/fpu_control.h
index c37fcf4ee4..848b5ba3b5 100644
--- a/ports/sysdeps/m68k/fpu_control.h
+++ b/ports/sysdeps/m68k/fpu_control.h
@@ -53,6 +53,15 @@
#include <features.h>
+#if defined (__mcoldfire__) && !defined (__mcffpu__)
+
+#define _FPU_RESERVED 0xffffffff
+#define _FPU_DEFAULT 0x00000000
+#define _FPU_GETCW(cw) ((cw) = 0)
+#define _FPU_SETCW(cw) ((void) (cw))
+
+#else
+
/* masking of interrupts */
#define _FPU_MASK_BSUN 0x8000
#define _FPU_MASK_SNAN 0x4000
@@ -95,12 +104,13 @@
that __setfpucw works. This bit will be ignored. */
#define _FPU_IEEE 0x00000001
-/* Type of the control word. */
-typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
-
/* Macros for accessing the hardware control word. */
#define _FPU_GETCW(cw) __asm__ ("fmove%.l %!, %0" : "=dm" (cw))
#define _FPU_SETCW(cw) __asm__ volatile ("fmove%.l %0, %!" : : "dm" (cw))
+#endif
+
+/* Type of the control word. */
+typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;