fsqrt

Dan Malek d6malek at digitaldans.com
Sat Jun 8 10:20:25 EST 2013


On Jun 7, 2013, at 4:30 PM, Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:

> Right, looking more, the code really sucks.

Hey!  :)

> ….  Either you use the existing
> apparent ability for MATH_EMU to operate in minimal mode, ie,
> load/store/fmr only (which seems to do exactly the same thing as the
> code in softemu8xx.c which we can then get rid of), or just get rid of
> that minimal mode altogether.

The purpose for that "minimal code" was the signal handlers were hand-coded assembly that always did the FPU load/store regardless of compiler flags.  Over time, it became convenient to emulate a few others, even with user space math emulation, for similar reasons.

> And while at it make it a general config option for all soft-emu
> processors (there is no bloody reason why that should be 8xx specfic) or
> just get rid of the whole concept of half-emulation.

Looks like the code just evolved and the 8xx was never cleaned up.

The partial emulation is a convenience for the libraries that may still have FP instructions directly coded.  There are also permutations of real FPU but not all instructions, and no FPU to consider for fetching operands and storing results to be considered for the various configuration options.

Thanks.

	-- Dan



More information about the Linuxppc-dev mailing list