diff options
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/attr.h | 2 | ||||
-rw-r--r-- | cpukit/score/cpu/m68k/cpu.c | 29 | ||||
-rw-r--r-- | cpukit/score/src/thread.c | 2 |
3 files changed, 31 insertions, 2 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/attr.h b/cpukit/rtems/include/rtems/rtems/attr.h index cada11dbad..84f79f636f 100644 --- a/cpukit/rtems/include/rtems/rtems/attr.h +++ b/cpukit/rtems/include/rtems/rtems/attr.h @@ -47,7 +47,7 @@ typedef unsigned32 rtems_attribute; #define RTEMS_NO_PRIORITY_CEILING 0x00000000 #define RTEMS_PRIORITY_CEILING 0x00000040 -#if ( CPU_HARDWARE_FP == TRUE ) +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #define ATTRIBUTES_NOT_SUPPORTED 0 #else #define ATTRIBUTES_NOT_SUPPORTED RTEMS_FLOATING_POINT 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 + diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c index e4a3614a53..b63ad619bd 100644 --- a/cpukit/score/src/thread.c +++ b/cpukit/score/src/thread.c @@ -212,7 +212,7 @@ void _Thread_Start_multitasking( void ) */ -#if ( CPU_HARDWARE_FP == TRUE ) +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) /* * don't need to worry about saving BSP's floating point state */ |