[patch][0/5] powerpc: Add support to fully comply with IEEE-754 standard
Zhu Ebony-r57400
ebony.zhu at freescale.com
Wed Feb 7 16:52:30 EST 2007
> >> This snippet of code breaks it from math-emu/sfp-machine.h
> >>
> >>>> +#ifdef CONFIG_SPE
> >>>> +#define __FPU_FPSCR (current->thread.spefscr)
> >>>> +#else
> >>>> #define __FPU_FPSCR (current->thread.fpscr.val)
> >>>> +#endif
> >>
> >> By doing this if I want 'classic FP' emulation as well as the IEEE
> >> fixup my fpscr for classic emu will not be updated properly.
> >
> > Logically, user can choose "SPE Support" and "Math
> emulation" at the
> > same time on menuconfig. But from my understanding, it is not
> > necessary to select math-emu on a SPE available system,
> since SPE can
> > do math operation.
>
> This is not true. If I want to run a "classic" PPC binary
> with FP I need "Math emulation" and if I want to run an SPE
> one I enable "SPE Support". I could want to run both of
> these types of binaries on the same system at the same time.
If this is the case, maybe we need a separate macro like
#define __SPE_SPEFSCR (current->thread.spefscr)
But if we do this, how does the kernel know if the emulation is for
"classic" PPC binary with FP or an SPE one, thus corresponding
registers(fpscr or spefscr) being updated?
B.R.
Ebony
More information about the Linuxppc-dev
mailing list