From ca7858bb8856f1afcc537f39763b7c951e5068d3 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 26 Jul 2000 19:28:11 +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. --- testsuites/tmtests/tm26/task1.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'testsuites/tmtests/tm26/task1.c') diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c index 248ffae296..b660b36b21 100644 --- a/testsuites/tmtests/tm26/task1.c +++ b/testsuites/tmtests/tm26/task1.c @@ -281,7 +281,9 @@ rtems_task Low_task( _Thread_Disable_dispatch(); Timer_initialize(); +#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1) _Context_Restore_fp( &_Thread_Executing->fp_context ); +#endif _Context_Switch( &executing->Registers, &_Thread_Executing->Registers ); } @@ -306,8 +308,10 @@ rtems_task Floating_point_task_1( _Thread_Disable_dispatch(); Timer_initialize(); +#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1) _Context_Save_fp( &executing->fp_context ); _Context_Restore_fp( &_Thread_Executing->fp_context ); +#endif _Context_Switch( &executing->Registers, &_Thread_Executing->Registers ); /* switch to Floating_point_task_2 */ @@ -327,8 +331,10 @@ rtems_task Floating_point_task_1( _Thread_Disable_dispatch(); Timer_initialize(); +#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1) _Context_Save_fp( &executing->fp_context ); _Context_Restore_fp( &_Thread_Executing->fp_context ); +#endif _Context_Switch( &executing->Registers, &_Thread_Executing->Registers ); /* switch to Floating_point_task_2 */ } @@ -356,8 +362,10 @@ rtems_task Floating_point_task_2( _Thread_Disable_dispatch(); Timer_initialize(); +#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1) _Context_Save_fp( &executing->fp_context ); _Context_Restore_fp( &_Thread_Executing->fp_context ); +#endif _Context_Switch( &executing->Registers, &_Thread_Executing->Registers ); /* switch to Floating_point_task_1 */ @@ -493,6 +501,7 @@ void complete_test( void ) 0 ); +#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1) put_time( "fp context switch: restore 1st FP task", context_switch_restore_1st_fp_time, @@ -524,6 +533,12 @@ void complete_test( void ) 0, 0 ); +#else + puts( "fp context switch: restore 1st FP task - NA" ); + puts( "fp context switch: save idle, restore initialized - NA" ); + puts( "fp context switch: save idle, restore idle - NA" ); + puts( "fp context switch: save initialized, restore initialized - NA" ); +#endif put_time( "_Thread_Resume", -- cgit v1.2.3