Changeset 00d2a828 in rtems
- Timestamp:
- 05/28/97 20:36:35 (27 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 3a8256d
- Parents:
- 5c995d7
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/rtems/headers/attr.h
r5c995d7 r00d2a828 48 48 #define RTEMS_PRIORITY_CEILING 0x00000040 49 49 50 #if ( CPU_HARDWARE_FP == TRUE ) 50 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 51 51 #define ATTRIBUTES_NOT_SUPPORTED 0 52 52 #else -
c/src/exec/rtems/include/rtems/rtems/attr.h
r5c995d7 r00d2a828 48 48 #define RTEMS_PRIORITY_CEILING 0x00000040 49 49 50 #if ( CPU_HARDWARE_FP == TRUE ) 50 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 51 51 #define ATTRIBUTES_NOT_SUPPORTED 0 52 52 #else -
c/src/exec/score/cpu/m68k/cpu.c
r5c995d7 r00d2a828 178 178 }; 179 179 #endif 180 181 /*PAGE 182 * 183 * The following code context switches the software FPU emulation 184 * code provided with GCC. 185 */ 186 187 #if (CPU_SOFTWARE_FP == TRUE) 188 extern Context_Control_fp _fpCCR; 189 190 void CPU_Context_save_fp (void **fp_context_ptr) 191 { 192 Context_Control_fp *fp; 193 194 fp = (Context_Control_fp *) *fp_context_ptr; 195 196 *fp = _fpCCR; 197 } 198 199 void CPU_Context_restore_fp (void **fp_context_ptr) 200 { 201 Context_Control_fp *fp; 202 203 fp = (Context_Control_fp *) *fp_context_ptr; 204 205 _fpCCR = *fp; 206 } 207 #endif 208 -
c/src/exec/score/cpu/m68k/cpu.h
r5c995d7 r00d2a828 53 53 * Some family members have no FP, some have an FPU such as the 54 54 * MC68881/MC68882 for the MC68020, others have it built in (MC68030, 040). 55 * 56 * NOTE: If on a CPU without hardware FP, then one can use software 57 * emulation. The gcc software FP emulation code has data which 58 * must be contexted switched on a per task basis. 55 59 */ 56 60 57 61 #if ( M68K_HAS_FPU == 1 ) 58 62 #define CPU_HARDWARE_FP TRUE 63 #define CPU_SOFTWARE_FP FALSE 59 64 #else 60 65 #define CPU_HARDWARE_FP FALSE 66 #if defined(__GCC__) 67 #define CPU_SOFTWARE_FP TRUE 68 #else 69 #define CPU_SOFTWARE_FP FALSE 70 #endif 61 71 #endif 62 72 … … 109 119 110 120 /* 121 * Floating point context ares 122 */ 123 124 #if (CPU_SOFTWARE_FP == TRUE) 125 126 /* 127 * This is the same as gcc's view of the software FP condition code 128 * register _fpCCR. The implementation of the emulation code is 129 * in the gcc-VERSION/config/m68k directory. This structure is 130 * correct as of gcc 2.7.2.2. 131 */ 132 133 typedef struct { 134 unsigned16 _exception_bits; 135 unsigned16 _trap_enable_bits; 136 unsigned16 _sticky_bits; 137 unsigned16 _rounding_mode; 138 unsigned16 _format; 139 unsigned16 _last_operation; 140 union { 141 float sf; 142 double df; 143 } _operand1; 144 union { 145 float sf; 146 double df; 147 } _operand2; 148 } Context_Control_fp; 149 150 #else 151 152 /* 111 153 * FP context save area for the M68881/M68882 numeric coprocessors. 112 154 */ … … 118 160 /* 4 bytes for non-null flag */ 119 161 } Context_Control_fp; 162 #endif 120 163 121 164 /* … … 292 335 } 293 336 337 /* 338 * Floating Point Context Area Support routines 339 */ 340 341 #if (CPU_SOFTWARE_FP == TRUE) 342 343 /* 344 * This software FP implementation is only for GCC. 345 */ 346 347 #define _CPU_Context_Fp_start( _base, _offset ) \ 348 ((void *) _Addresses_Add_offset( (_base), (_offset) ) ) 349 350 351 #define _CPU_Context_Initialize_fp( _fp_area ) \ 352 { \ 353 Context_Control_fp *_fp; \ 354 _fp = *(Context_Control_fp **)_fp_area; \ 355 _fp->_exception_bits = 0; \ 356 _fp->_trap_enable_bits = 0; \ 357 _fp->_sticky_bits = 0; \ 358 _fp->_rounding_mode = 0; /* ROUND_TO_NEAREST */ \ 359 _fp->_format = 0; /* NIL */ \ 360 _fp->_last_operation = 0; /* NOOP */ \ 361 _fp->_operand1.df = 0; \ 362 _fp->_operand2.df = 0; \ 363 } 364 #else 294 365 #define _CPU_Context_Fp_start( _base, _offset ) \ 295 366 ((void *) \ … … 306 377 *(_fp_area) = (unsigned8 *)(_fp_context); \ 307 378 } 379 #endif 308 380 309 381 /* end of Context handler macros */ -
c/src/exec/score/cpu/m68k/cpu_asm.s
r5c995d7 r00d2a828 52 52 * CPU_FP_CONTEXT_SIZE is higher than expected to account for the 53 53 * -1 pushed at end of this sequence. 54 */ 54 * 55 * Neither of these entries is required if we have software FPU 56 * emulation. But if we don't have an FPU or emulation, then 57 * we need the stub versions of these routines. 58 */ 59 60 #if (CPU_SOFTWARE_FP == FALSE) 55 61 56 62 .set FPCONTEXT_ARG, 4 | save FP context argument … … 87 93 #endif 88 94 rts 95 #endif 89 96 90 97 /*PAGE -
c/src/exec/score/src/thread.c
r5c995d7 r00d2a828 213 213 214 214 215 #if ( CPU_HARDWARE_FP == TRUE ) 215 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 216 216 /* 217 217 * don't need to worry about saving BSP's floating point state -
cpukit/rtems/include/rtems/rtems/attr.h
r5c995d7 r00d2a828 48 48 #define RTEMS_PRIORITY_CEILING 0x00000040 49 49 50 #if ( CPU_HARDWARE_FP == TRUE ) 50 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 51 51 #define ATTRIBUTES_NOT_SUPPORTED 0 52 52 #else -
cpukit/score/cpu/m68k/cpu.c
r5c995d7 r00d2a828 178 178 }; 179 179 #endif 180 181 /*PAGE 182 * 183 * The following code context switches the software FPU emulation 184 * code provided with GCC. 185 */ 186 187 #if (CPU_SOFTWARE_FP == TRUE) 188 extern Context_Control_fp _fpCCR; 189 190 void CPU_Context_save_fp (void **fp_context_ptr) 191 { 192 Context_Control_fp *fp; 193 194 fp = (Context_Control_fp *) *fp_context_ptr; 195 196 *fp = _fpCCR; 197 } 198 199 void CPU_Context_restore_fp (void **fp_context_ptr) 200 { 201 Context_Control_fp *fp; 202 203 fp = (Context_Control_fp *) *fp_context_ptr; 204 205 _fpCCR = *fp; 206 } 207 #endif 208 -
cpukit/score/src/thread.c
r5c995d7 r00d2a828 213 213 214 214 215 #if ( CPU_HARDWARE_FP == TRUE ) 215 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 216 216 /* 217 217 * don't need to worry about saving BSP's floating point state
Note: See TracChangeset
for help on using the changeset viewer.