summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/m68k
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1997-05-28 20:36:35 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1997-05-28 20:36:35 +0000
commit00d2a828971594d3c3407ae1ee064e32e256c95c (patch)
tree8344f035cf7d381328a79175e132202307345b4b /cpukit/score/cpu/m68k
parent5c995d728c5d679cef2d89462c654c8333514789 (diff)
downloadrtems-00d2a828971594d3c3407ae1ee064e32e256c95c.tar.bz2
Added support for context switching the data used by the gcc m68k
software floating point emulation code. Code implemented by Karen Sara Looney <Karen.Looney@colorado.edu> with much email assistance from Joel.
Diffstat (limited to 'cpukit/score/cpu/m68k')
-rw-r--r--cpukit/score/cpu/m68k/cpu.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/cpukit/score/cpu/m68k/cpu.c b/cpukit/score/cpu/m68k/cpu.c
index 01fbabd957..afbac7f813 100644
--- a/cpukit/score/cpu/m68k/cpu.c
+++ b/cpukit/score/cpu/m68k/cpu.c
@@ -177,3 +177,32 @@ const unsigned char __BFFFOtable[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
#endif
+
+/*PAGE
+ *
+ * The following code context switches the software FPU emulation
+ * code provided with GCC.
+ */
+
+#if (CPU_SOFTWARE_FP == TRUE)
+extern Context_Control_fp _fpCCR;
+
+void CPU_Context_save_fp (void **fp_context_ptr)
+{
+ Context_Control_fp *fp;
+
+ fp = (Context_Control_fp *) *fp_context_ptr;
+
+ *fp = _fpCCR;
+}
+
+void CPU_Context_restore_fp (void **fp_context_ptr)
+{
+ Context_Control_fp *fp;
+
+ fp = (Context_Control_fp *) *fp_context_ptr;
+
+ _fpCCR = *fp;
+}
+#endif
+