diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-07-26 19:26:28 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-07-26 19:26:28 +0000 |
commit | 17508d02bba1d47f4cf884b190566e72f69adb4e (patch) | |
tree | a1b8738fd54754c0210ac709a4b650bc7d3c4538 /c/src/exec/score/inline/rtems | |
parent | Patch rtems-rc-20000713-1-cvs.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff) | |
download | rtems-17508d02bba1d47f4cf884b190566e72f69adb4e.tar.bz2 |
Port of RTEMS to the Texas Instruments C3x/C4x DSP families including
a BSP (c4xsim) supporting the simulator included with gdb. This port
was done by Joel Sherrill and Jennifer Averett of OAR Corporation.
Also included with this port is a space/time optimization to eliminate
FP context switch management on CPUs without hardware or software FP.
An issue with this port was that sizeof(unsigned32) = sizeof(unsigned8)
on this CPU. This required addressing alignment checks and assumptions
as well as fixing code that assumed sizeof(unsigned32) == 4.
Diffstat (limited to 'c/src/exec/score/inline/rtems')
-rw-r--r-- | c/src/exec/score/inline/rtems/score/address.inl | 4 | ||||
-rw-r--r-- | c/src/exec/score/inline/rtems/score/thread.inl | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/c/src/exec/score/inline/rtems/score/address.inl b/c/src/exec/score/inline/rtems/score/address.inl index b9a0373aff..54f11c3ca4 100644 --- a/c/src/exec/score/inline/rtems/score/address.inl +++ b/c/src/exec/score/inline/rtems/score/address.inl @@ -90,7 +90,9 @@ RTEMS_INLINE_ROUTINE boolean _Addresses_Is_aligned ( void *address ) { -#if defined(RTEMS_CPU_HAS_16_BIT_ADDRESSES) +#if (CPU_ALIGNMENT == 0) + return TRUE; +#elif defined(RTEMS_CPU_HAS_16_BIT_ADDRESSES) return ( ( (unsigned short)address % CPU_ALIGNMENT ) == 0 ); #else return ( ( (unsigned32)address % CPU_ALIGNMENT ) == 0 ); diff --git a/c/src/exec/score/inline/rtems/score/thread.inl b/c/src/exec/score/inline/rtems/score/thread.inl index f1a2410c95..0c98830f76 100644 --- a/c/src/exec/score/inline/rtems/score/thread.inl +++ b/c/src/exec/score/inline/rtems/score/thread.inl @@ -111,8 +111,10 @@ RTEMS_INLINE_ROUTINE void _Thread_Unblock ( RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); +#endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); } @@ -144,12 +146,14 @@ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) * FALSE otherwise. */ +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE boolean _Thread_Is_allocated_fp ( Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); } +#endif /*PAGE * @@ -161,10 +165,12 @@ RTEMS_INLINE_ROUTINE boolean _Thread_Is_allocated_fp ( * point context is now longer associated with an active thread. */ +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; } +#endif /*PAGE * |