[RTEMS Project] #2270: SPARC: Optimized floating-point context handling

RTEMS trac trac at rtems.org
Mon Mar 2 08:50:32 UTC 2015

#2270: SPARC: Optimized floating-point context handling
 Reporter:  sebastian.huber  |       Owner:  sebastian.huber
     Type:  enhancement      |      Status:  accepted
 Priority:  normal           |   Milestone:  4.11.1
Component:  cpukit           |     Version:  4.11
 Severity:  normal           |  Resolution:
 Keywords:  SPARC            |

Comment (by sebastian.huber):

 From the SPARC Architecture Manual Version 8 we have:

 "PSR_enable_floating-point (EF)

 Bit 12 determines whether the FPU is enabled. If disabled, a floating-
 instruction will trap. 1 = enabled, 0 = disabled. If an implementation
 does not
 support a hardware FPU, PSR.EF should always read as 0 and writes to it
 be ignored.

 Programming Note

 Software can use the EF and EC bits to determine whether a particular
 process uses the FPU or CP.
 If a process does not use the FPU/CP, its registers do not need to be
 saved across a context switch."

 Where is it documented that the PSR[EF] may have side-effects like a
 power-down mode or leads to a pause of FP instructions?  Do the LEON
 processors such things?  Is an interrupt not context synchronizing on
 SPARC (like PowerPC for example)?

 The PSR[EF] is only set in case SPARC_HAS_FPU == 1 and the thread has the
 FP attribute.  So we already touch this bit during a context switch.  Why
 are the interrupts different?

Ticket URL: <http://devel.rtems.org/ticket/2270#comment:10>
RTEMS Project <http://www.rtems.org/>
RTEMS Project

More information about the bugs mailing list