Re: [PATCH 32/35] m68k: add ColdFire FPU support for the V4e ColdFire CPU's

Joshua Juran
2011-12-28T11:17:31Z

On Dec 27, 2011, at 9:53 PM, Greg Ungerer wrote:

> if (CPU_IS_COLDFIRE) {
> __asm__ volatile ("fsave %0"
> : : "m" (*sc->sc_fpstate) :
> "memory");
> } else {
> __asm__ volatile (".chip 68k/68881\n\t"
> "fsave %0\n\t"
> ".chip 68k"
> : : "m" (*sc->sc_fpstate) :
> "memory");
> }
>
> I am still concerned about the use of ".chip 68k" in general though.
> Just not sure how we can avoid it. I guess there is no way to jus
> t revert to the original CPU choice?

#define CPU "68040"

_asm__ volatile (".chip 68k/68881\n\t"
"fsave %0\n\t"
".chip " CPU
: : "m" (*sc->sc_fpstate) : "memory");

Josh