exception handling poll

Joel Sherrill joel@OARcorp.com
Sat Oct 18 08:53:00 GMT 1997


On Fri, 17 Oct 1997, David Edelsohn wrote:

> >>>>> Joel Sherrill writes:
> 
> Joel> This would work if NONE of the application used floating point.  But this
> Joel> is a case where there are multiple tasks/threads running and you want to
> Joel> specify on an individual basis whether a particular thread uses FP.  The
> Joel> application must be linked with the HW FP math library. 
> 
> Joel> Does the distinction make sense?  
> 
> 	I guess that I do not understand why you cannot have two versions
> of the libraries and link with the appropriate library whether you want to
> utilize hardware FP or not.  If you link with the appropriate HW FP math
> library, why cannot all libraries be treated similarly?

Because for tasks which specify that they do not use the FPU, we would
like to be able to disable the FP via the MSR.  This insures that a task
which does not have a FP context never touches the FPU.  If it uses the
FPU, then a fault is generated.  This scheme actually works well on the
sparc. 

The entire application is a single linked image. There is no virtual
memory or separate address spaces.  You either have the HW or software FP
routines in the application -- not both.

This type of thing is common in embedded RTOS' since it is an obvious way
to speed context switch time.

--joel




More information about the Gcc mailing list