Changeset a51b352 in rtems for c/src/lib/libbsp/sparc

Timestamp:
05/30/15 15:48:27 (9 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
b88d346f
Parents:
335e5ca
git-author:
Sebastian Huber <sebastian.huber@…> (05/30/15 15:48:27)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/09/15 07:05:50)
Message:

sparc: Add SPARC_USE_SAFE_FP_SUPPORT

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 is
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.

On SMP configurations the deferred floating point switch is not
supported in principle. So use here a safe floating point support. Safe
means that the volatile floating point context is saved and restored
around a thread dispatch issued during interrupt processing. Thus
post-switch actions and context switch extensions may safely use the
floating point unit.

Update #2270.

(No files)

Note: See TracChangeset for help on using the changeset viewer.