[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Coldfile and Floating Point Context
- Date: Mon, 16 Mar 2009 09:22:26 -0500
- From: joel.sherrill at OARcorp.com (Joel Sherrill)
- Subject: Coldfile and Floating Point Context
Sebastian Huber wrote:
> I have problems with an initialization task with enabled floating point (which
> is needed for the global C++ constructors). The call to
> _CPU_Context_restore_fp results in an exception because it tries to execute a
> floating point instruction with DF set in the CACR register (= disabled
> floating point). Why is the floating point unit not enabled in the
> restore/save FP routines? On the PowerPC platform the FP unit will be enabled
> during a restore/save since a FP context switch may occur in an ISR or
> exception handler when the FPU is not available. Is this different on the
> ColdFire? Where is the right place to enable the FP unit?
I'm just guessing here since my memory of the 6800 is old. :)
I don't remember those CPUs having a way to disable the FPU. So
this is very likely a feature that is new to the Coldfire FPU. My
suggestion without reading any manuals would be to enable
it like the PowerPC and SPARC FP switch routines do and make
that code conditional on the Coldfire with FPU.
> Have a nice day!
You too. Whatever is left of it there in Germany. :)