Coldfile and Floating Point Context
Joel Sherrill
joel.sherrill at OARcorp.com
Mon Mar 16 14:22:26 UTC 2009
Sebastian Huber wrote:
> Hi,
>
> 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 680[234]0 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. :)
--joel
More information about the users
mailing list