#211 closed enhancement (fixed)

fixes for deferred FPU context switching

Reported by: strauman Owned by: Joel Sherrill
Priority: normal Milestone: 2
Component: score Version: unknown
Severity: minor Keywords:
Cc: bugs@… Blocked By:


This patch (against rtems-ss-20020301) fixes saving / restoring
floating point context.
The fpsave / fprestore routines are only used in a executing
context which _is_ fp and hence has the FPU enabled. The current
behavior required the FPU always to be on which is very dangerous
if lazy context switching is used.

The patch also makes sure (on powerpc only) that the FPU is disabled
for integer tasks. Note that this is crucial if deferred fp context
switching is used. Otherwise, fp context corruption may go undetected!
Also note that even tasks which merely push/pop FP registers to/from the stack
without modifying them still MUST be FP tasks - otherwise (if lazy FP
context switching is used), FP register corruption (of other, FP, tasks
may occur)!

Furthermore, (on PPC) by default, lazy FP context save/restore is _disabled_


target: powerpc-rtems
host: i386-linux


Attachments (1)

fpctxt.diff (7.1 KB) - added by strauman on 12/03/06 at 13:31:13.

Download all attachments as: .zip

Change History (2)

comment:1 Changed on 05/14/02 at 16:54:41 by Joel Sherrill

Status: assignedclosed

State-Changed-From-To: open->closed
State-Changed-Why: Patch applied. Thanks.

Changed on 12/03/06 at 13:31:13 by strauman

Attachment: fpctxt.diff added


Note: See TracTickets for help on using tickets.