Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: MATH_EMULATE



Matthias Drochner <M.Drochner%fz-juelich.de@localhost> writes:
> I think the problem is less that the kernel code is
> bitrotten

No, the kernel code seems to be fine. The in-kernel emulator is
supposed to do only the four major ops, with libm handling the libm
stuff in software.

> but that userland CFLAGS and/or gcc have
> changed to inline fp ops:
> $ objdump -d /sbin/ping|grep sqrt
> 08048d00 <sqrt@plt>:
>  8049aeb:       d9 fa                   fsqrt
>  8049c15:       e8 e6 f0 ff ff          call   8048d00 <sqrt@plt>

That seems to be the problem. If fsqrt is inlined, then libm can't ever
handle the stuff and we lose.

> The in-kernel emulator has always been incomplete.

Yes, and it *never* handled sqrt.

I'm somewhat reluctant to force userland to make function calls to do
things like sqrt if the compiler is now smart enough to inline them --
it is bad to slow down 99% of people for the benefit of 1%.

This is perhaps yet more reason to force non-FPU machines to use a
userland explicitly compiled with soft float.


-- 
Perry E. Metzger                perry%piermont.com@localhost



Home | Main Index | Thread Index | Old Index