[patch][0/5] powerpc: Add support to fully comply with IEEE-754 standard

Kumar Gala galak at kernel.crashing.org
Wed Feb 7 18:11:36 EST 2007


On Feb 6, 2007, at 11:52 PM, Zhu Ebony-r57400 wrote:

>>>> 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?

It's based on what instruction you are trying to emulate.

- k




More information about the Linuxppc-dev mailing list