From 17508d02bba1d47f4cf884b190566e72f69adb4e Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 26 Jul 2000 19:26:28 +0000 Subject: 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. --- cpukit/score/macros/rtems/score/address.inl | 6 ++++++ cpukit/score/macros/rtems/score/thread.inl | 11 +++++++++++ 2 files changed, 17 insertions(+) (limited to 'cpukit/score/macros/rtems/score') diff --git a/cpukit/score/macros/rtems/score/address.inl b/cpukit/score/macros/rtems/score/address.inl index 2f14aa633a..10623b1f76 100644 --- a/cpukit/score/macros/rtems/score/address.inl +++ b/cpukit/score/macros/rtems/score/address.inl @@ -51,8 +51,14 @@ * */ +#if (CPU_ALIGNMENT == 0) + (TRUE) +#elif defined(RTEMS_CPU_HAS_16_BIT_ADDRESSES) + ( ( (unsigned short)(_address) % CPU_ALIGNMENT ) == 0 ) #define _Addresses_Is_aligned( _address ) \ ( ( (unsigned32)(_address) % CPU_ALIGNMENT ) == 0 ) +#else +#endif /*PAGE * diff --git a/cpukit/score/macros/rtems/score/thread.inl b/cpukit/score/macros/rtems/score/thread.inl index 26671093b6..749b1c5205 100644 --- a/cpukit/score/macros/rtems/score/thread.inl +++ b/cpukit/score/macros/rtems/score/thread.inl @@ -67,6 +67,7 @@ * */ +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #define _Thread_Restart_self() \ { \ if ( _Thread_Executing->fp_context != NULL ) \ @@ -74,6 +75,12 @@ \ _CPU_Context_Restart_self( &_Thread_Executing->Registers ); \ } +#else +#define _Thread_Restart_self() \ + { \ + _CPU_Context_Restart_self( &_Thread_Executing->Registers ); \ + } +#endif /*PAGE * @@ -96,8 +103,10 @@ * */ +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #define _Thread_Is_allocated_fp( _the_thread ) \ ( (_the_thread) == _Thread_Allocated_fp ) +#endif /*PAGE * @@ -105,8 +114,10 @@ * */ +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #define _Thread_Deallocate_fp() \ _Thread_Allocated_fp = NULL +#endif /*PAGE * -- cgit v1.2.3