diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-07-17 07:30:46 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-07-25 11:41:12 +0200 |
commit | 146adb1edfaa0271ee0df5180a1f64d54e6e860d (patch) | |
tree | 4957ce3cfe1c5818ab121bf11465e131042f4952 /testsuites/sptests/spsize | |
parent | INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT (diff) | |
download | rtems-146adb1edfaa0271ee0df5180a1f64d54e6e860d.tar.bz2 |
sparc: Add lazy floating point switch
The SPARC ABI is a bit special with respect to the floating point context.
The complete floating point context is volatile. Thus, from an ABI point
of view nothing needs to be saved and restored during a context switch.
Instead the floating point context must be saved and restored during
interrupt processing. Historically, the deferred floating point switch was
used for SPARC and the complete floating point context is saved and
restored during a context switch to the new floating point unit owner.
This is a bit dangerous since post-switch actions (e.g. signal handlers)
and context switch extensions may silently corrupt the floating point
context.
The floating point unit is disabled for interrupt handlers. Thus, in case
an interrupt handler uses the floating point unit then this will result in a
trap (INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT).
In uniprocessor configurations, a lazy floating point context switch is
used. In case an active floating point thread is interrupted (PSR[EF] == 1)
and a thread dispatch is carried out, then this thread is registered as the
floating point owner. When a floating point owner is present during a
context switch, the floating point unit is disabled for the heir thread
(PSR[EF] == 0). The floating point disabled trap checks that the use of the
floating point unit is allowed and saves/restores the floating point context
on demand.
Update #3077.
Diffstat (limited to 'testsuites/sptests/spsize')
-rw-r--r-- | testsuites/sptests/spsize/size.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c index 3414ec0c80..7b7b3a5dbb 100644 --- a/testsuites/sptests/spsize/size.c +++ b/testsuites/sptests/spsize/size.c @@ -410,8 +410,7 @@ uninitialized += (sizeof _CPU_Interrupt_stack_low) + /* cpu.h */ uninitialized += (sizeof _CPU_Interrupt_stack_low) + - (sizeof _CPU_Interrupt_stack_high) + - (sizeof _CPU_Null_fp_context); + (sizeof _CPU_Interrupt_stack_high); #endif |