summaryrefslogtreecommitdiffstats
path: root/testsuites/tmtests
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-26 19:28:11 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-26 19:28:11 +0000
commitca7858bb8856f1afcc537f39763b7c951e5068d3 (patch)
tree3f01b3bb41ce9b2d7bc16c300391382918758caf /testsuites/tmtests
parentPort of RTEMS to the Texas Instruments C3x/C4x DSP families including (diff)
downloadrtems-ca7858bb8856f1afcc537f39763b7c951e5068d3.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 'testsuites/tmtests')
-rw-r--r--testsuites/tmtests/tm26/task1.c15
1 files changed, 15 insertions, 0 deletions
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",