SPARC fp_disabled exception

Jerry Needell jerry.needell at
Wed Aug 6 12:14:09 UTC 2008

I have run into an interesting situation that I wonder if others have  
dealt with.  I am running RTEMS on a LEON3 (SPARC -v8) processor with  
an FPU. I am using RTEMS 4.8 and gcc 4.2.1.
	The floating point operations of my application are limited to a few  
tasks and I create those using RTEMS_FLOATING_POINT. Other tasks that  
do not need floating point support are created with  
RTEMS_NO_FLOATING_POINT. I have been developing and running this  
application for a few months and this approach has been working well.  
I recently added a significant amount of code to one of the non- 
floating-point tasks and started seeing "fp_disabled" traps  the task  
created with RTEMS_NO_FLOATING_POINT.  I looked at the generated code  
and as expected, found that gcc had opted to use some of the floating  
point registers to store variables. By creating the task with  
RTEMS_FLOATING POINT, the problem went away, but I was curious of  
there is a better way to deal with this.

So, I have 2 questions:
1) If am going to enable the FPU with gcc 4.2.1 must all tasks be  
created with RTEMS_FLOATING_POINT? If so, then the documentation  
probably should be altered to reflect this.

2)  Is there a way to ensure that gcc will not use the FP registers in  


More information about the users mailing list