summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/exec/score')
-rw-r--r--c/src/exec/score/cpu/a29k/rtems/score/cpu.h1
-rw-r--r--c/src/exec/score/cpu/c4x/.cvsignore13
-rw-r--r--c/src/exec/score/cpu/c4x/rtems/.cvsignore2
-rw-r--r--c/src/exec/score/cpu/c4x/rtems/score/.cvsignore2
-rw-r--r--c/src/exec/score/cpu/hppa1.1/rtems/score/cpu.h1
-rw-r--r--c/src/exec/score/cpu/i386/rtems/score/cpu.h1
-rw-r--r--c/src/exec/score/cpu/i960/rtems/score/cpu.h2
-rw-r--r--c/src/exec/score/cpu/mips/rtems/score/cpu.h1
-rw-r--r--c/src/exec/score/cpu/mips64orion/rtems/score/cpu.h1
-rw-r--r--c/src/exec/score/cpu/sh/rtems/score/cpu.h1
-rw-r--r--c/src/exec/score/cpu/sparc/rtems/score/cpu.h1
-rw-r--r--c/src/exec/score/cpu/unix/rtems/score/cpu.h1
-rw-r--r--c/src/exec/score/include/rtems/score/thread.h6
-rw-r--r--c/src/exec/score/inline/rtems/score/address.inl4
-rw-r--r--c/src/exec/score/inline/rtems/score/thread.inl6
-rw-r--r--c/src/exec/score/macros/rtems/score/address.inl6
-rw-r--r--c/src/exec/score/macros/rtems/score/thread.inl11
-rw-r--r--c/src/exec/score/src/thread.c2
-rw-r--r--c/src/exec/score/src/threadclose.c4
-rw-r--r--c/src/exec/score/src/threaddispatch.c2
-rw-r--r--c/src/exec/score/src/threadinitialize.c2
-rw-r--r--c/src/exec/score/src/threadloadenv.c2
22 files changed, 69 insertions, 3 deletions
diff --git a/c/src/exec/score/cpu/a29k/rtems/score/cpu.h b/c/src/exec/score/cpu/a29k/rtems/score/cpu.h
index 93528e5d7c..a4330123f2 100644
--- a/c/src/exec/score/cpu/a29k/rtems/score/cpu.h
+++ b/c/src/exec/score/cpu/a29k/rtems/score/cpu.h
@@ -187,6 +187,7 @@ extern void a29k_sigdfl_sup(void);
#else
#define CPU_HARDWARE_FP FALSE
#endif
+#define CPU_SOFTWARE_FP FALSE
/*
* Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
diff --git a/c/src/exec/score/cpu/c4x/.cvsignore b/c/src/exec/score/cpu/c4x/.cvsignore
new file mode 100644
index 0000000000..525275c115
--- /dev/null
+++ b/c/src/exec/score/cpu/c4x/.cvsignore
@@ -0,0 +1,13 @@
+Makefile
+Makefile.in
+aclocal.m4
+config.cache
+config.guess
+config.log
+config.status
+config.sub
+configure
+depcomp
+install-sh
+missing
+mkinstalldirs
diff --git a/c/src/exec/score/cpu/c4x/rtems/.cvsignore b/c/src/exec/score/cpu/c4x/rtems/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/c/src/exec/score/cpu/c4x/rtems/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/c/src/exec/score/cpu/c4x/rtems/score/.cvsignore b/c/src/exec/score/cpu/c4x/rtems/score/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/c/src/exec/score/cpu/c4x/rtems/score/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/c/src/exec/score/cpu/hppa1.1/rtems/score/cpu.h b/c/src/exec/score/cpu/hppa1.1/rtems/score/cpu.h
index e5db793923..037226fa21 100644
--- a/c/src/exec/score/cpu/hppa1.1/rtems/score/cpu.h
+++ b/c/src/exec/score/cpu/hppa1.1/rtems/score/cpu.h
@@ -56,6 +56,7 @@ extern "C" {
*/
#define CPU_HARDWARE_FP TRUE
+#define CPU_SOFTWARE_FP FALSE
#define CPU_ALL_TASKS_ARE_FP TRUE
#define CPU_IDLE_TASK_IS_FP FALSE
#define CPU_USE_DEFERRED_FP_SWITCH FALSE
diff --git a/c/src/exec/score/cpu/i386/rtems/score/cpu.h b/c/src/exec/score/cpu/i386/rtems/score/cpu.h
index ab256cfa57..a0b7c2c4e2 100644
--- a/c/src/exec/score/cpu/i386/rtems/score/cpu.h
+++ b/c/src/exec/score/cpu/i386/rtems/score/cpu.h
@@ -58,6 +58,7 @@ extern "C" {
#else
#define CPU_HARDWARE_FP FALSE
#endif
+#define CPU_SOFTWARE_FP FALSE
#define CPU_ALL_TASKS_ARE_FP FALSE
#define CPU_IDLE_TASK_IS_FP FALSE
diff --git a/c/src/exec/score/cpu/i960/rtems/score/cpu.h b/c/src/exec/score/cpu/i960/rtems/score/cpu.h
index 71834e6dd2..958e27e87b 100644
--- a/c/src/exec/score/cpu/i960/rtems/score/cpu.h
+++ b/c/src/exec/score/cpu/i960/rtems/score/cpu.h
@@ -58,6 +58,8 @@ extern "C" {
#define CPU_HARDWARE_FP FALSE
#endif
+#define CPU_SOFTWARE_FP FALSE
+
#define CPU_ALL_TASKS_ARE_FP FALSE
#define CPU_IDLE_TASK_IS_FP FALSE
#define CPU_USE_DEFERRED_FP_SWITCH TRUE
diff --git a/c/src/exec/score/cpu/mips/rtems/score/cpu.h b/c/src/exec/score/cpu/mips/rtems/score/cpu.h
index d7d1b42e0b..35d936ec7e 100644
--- a/c/src/exec/score/cpu/mips/rtems/score/cpu.h
+++ b/c/src/exec/score/cpu/mips/rtems/score/cpu.h
@@ -174,6 +174,7 @@ extern void mips_fatal_error ( int error );
#else
#define CPU_HARDWARE_FP FALSE
#endif
+#define CPU_SOFTWARE_FP FALSE
/*
* Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
diff --git a/c/src/exec/score/cpu/mips64orion/rtems/score/cpu.h b/c/src/exec/score/cpu/mips64orion/rtems/score/cpu.h
index d7d1b42e0b..35d936ec7e 100644
--- a/c/src/exec/score/cpu/mips64orion/rtems/score/cpu.h
+++ b/c/src/exec/score/cpu/mips64orion/rtems/score/cpu.h
@@ -174,6 +174,7 @@ extern void mips_fatal_error ( int error );
#else
#define CPU_HARDWARE_FP FALSE
#endif
+#define CPU_SOFTWARE_FP FALSE
/*
* Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
diff --git a/c/src/exec/score/cpu/sh/rtems/score/cpu.h b/c/src/exec/score/cpu/sh/rtems/score/cpu.h
index 43ccf35a73..f6c9252912 100644
--- a/c/src/exec/score/cpu/sh/rtems/score/cpu.h
+++ b/c/src/exec/score/cpu/sh/rtems/score/cpu.h
@@ -132,6 +132,7 @@ extern "C" {
*/
#define CPU_HARDWARE_FP FALSE
+#define CPU_SOFTWARE_FP FALSE
/*
* Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
diff --git a/c/src/exec/score/cpu/sparc/rtems/score/cpu.h b/c/src/exec/score/cpu/sparc/rtems/score/cpu.h
index 5baf9aac5f..f7fbf121f9 100644
--- a/c/src/exec/score/cpu/sparc/rtems/score/cpu.h
+++ b/c/src/exec/score/cpu/sparc/rtems/score/cpu.h
@@ -105,6 +105,7 @@ extern "C" {
#else
#define CPU_HARDWARE_FP FALSE
#endif
+#define CPU_SOFTWARE_FP FALSE
/*
* Are all tasks FLOATING_POINT tasks implicitly?
diff --git a/c/src/exec/score/cpu/unix/rtems/score/cpu.h b/c/src/exec/score/cpu/unix/rtems/score/cpu.h
index d7019c3eec..7e0cbf7777 100644
--- a/c/src/exec/score/cpu/unix/rtems/score/cpu.h
+++ b/c/src/exec/score/cpu/unix/rtems/score/cpu.h
@@ -158,6 +158,7 @@ extern "C" {
*/
#define CPU_HARDWARE_FP TRUE
+#define CPU_SOFTWARE_FP FALSE
/*
* Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
diff --git a/c/src/exec/score/include/rtems/score/thread.h b/c/src/exec/score/include/rtems/score/thread.h
index 4c8032f558..99b38e2034 100644
--- a/c/src/exec/score/include/rtems/score/thread.h
+++ b/c/src/exec/score/include/rtems/score/thread.h
@@ -119,7 +119,9 @@ typedef struct {
Priority_Control initial_priority; /* initial priority */
boolean core_allocated_stack;
Stack_Control Initial_stack; /* stack information */
+#if ( CPU_HARDWARE_FP == TRUE )
void *fp_context; /* initial FP context area address */
+#endif
void *stack; /* initial stack area address */
} Thread_Start_information;
@@ -215,7 +217,9 @@ struct Thread_Control_struct {
Priority_Information Priority_map;
Thread_Start_information Start;
Context_Control Registers;
+#if ( CPU_HARDWARE_FP == TRUE )
void *fp_context;
+#endif
void *API_Extensions[ THREAD_API_LAST + 1 ];
void **extensions;
rtems_task_variable_t *task_variables;
@@ -308,7 +312,9 @@ SCORE_EXTERN Thread_Control *_Thread_Heir;
* context is currently loaded.
*/
+#if ( CPU_HARDWARE_FP == TRUE )
SCORE_EXTERN Thread_Control *_Thread_Allocated_fp;
+#endif
/*
* _Thread_Handler_initialization
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
*
diff --git a/c/src/exec/score/macros/rtems/score/address.inl b/c/src/exec/score/macros/rtems/score/address.inl
index 2f14aa633a..10623b1f76 100644
--- a/c/src/exec/score/macros/rtems/score/address.inl
+++ b/c/src/exec/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/c/src/exec/score/macros/rtems/score/thread.inl b/c/src/exec/score/macros/rtems/score/thread.inl
index 26671093b6..749b1c5205 100644
--- a/c/src/exec/score/macros/rtems/score/thread.inl
+++ b/c/src/exec/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
*
diff --git a/c/src/exec/score/src/thread.c b/c/src/exec/score/src/thread.c
index 9cb197e5bc..c71f025d39 100644
--- a/c/src/exec/score/src/thread.c
+++ b/c/src/exec/score/src/thread.c
@@ -63,7 +63,9 @@ void _Thread_Handler_initialization(
_Context_Switch_necessary = FALSE;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
+#endif
_Thread_Do_post_task_switch_extension = 0;
diff --git a/c/src/exec/score/src/threadclose.c b/c/src/exec/score/src/threadclose.c
index 4f2c9a6de5..882672d47e 100644
--- a/c/src/exec/score/src/threadclose.c
+++ b/c/src/exec/score/src/threadclose.c
@@ -53,6 +53,7 @@ void _Thread_Close(
_User_extensions_Thread_delete( the_thread );
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
@@ -60,7 +61,8 @@ void _Thread_Close(
the_thread->fp_context = NULL;
if ( the_thread->Start.fp_context )
- (void) _Workspace_Free( the_thread->Start.fp_context );
+ (void) _Workspace_Free( the_thread->Start.fp_context );
+#endif
_Thread_Stack_Free( the_thread );
diff --git a/c/src/exec/score/src/threaddispatch.c b/c/src/exec/score/src/threaddispatch.c
index 311947cfa9..66a8996a12 100644
--- a/c/src/exec/score/src/threaddispatch.c
+++ b/c/src/exec/score/src/threaddispatch.c
@@ -92,7 +92,7 @@ void _Thread_Dispatch( void )
* operations.
*/
-#if ( CPU_HARDWARE_FP == TRUE )
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (heir->fp_context != NULL) && !_Thread_Is_allocated_fp( heir ) ) {
if ( _Thread_Allocated_fp != NULL )
diff --git a/c/src/exec/score/src/threadinitialize.c b/c/src/exec/score/src/threadinitialize.c
index 0d5154c400..fe4e9fa2b5 100644
--- a/c/src/exec/score/src/threadinitialize.c
+++ b/c/src/exec/score/src/threadinitialize.c
@@ -95,6 +95,7 @@ boolean _Thread_Initialize(
* Allocate the floating point area for this thread
*/
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
@@ -109,6 +110,7 @@ boolean _Thread_Initialize(
the_thread->fp_context = fp_area;
the_thread->Start.fp_context = fp_area;
+#endif
/*
* Allocate the extensions area for this thread
diff --git a/c/src/exec/score/src/threadloadenv.c b/c/src/exec/score/src/threadloadenv.c
index c3493eeccd..af1233f709 100644
--- a/c/src/exec/score/src/threadloadenv.c
+++ b/c/src/exec/score/src/threadloadenv.c
@@ -45,11 +45,13 @@ void _Thread_Load_environment(
{
boolean is_fp = FALSE;
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( the_thread->Start.fp_context ) {
the_thread->fp_context = the_thread->Start.fp_context;
_Context_Initialize_fp( &the_thread->fp_context );
is_fp = TRUE;
}
+#endif
the_thread->do_post_task_switch_extension = FALSE;
the_thread->is_preemptible = the_thread->Start.is_preemptible;