FPU emulation

Bruce M Simpson bms at incunabulum.net
Sun Jan 20 07:13:03 PST 2008

[Cc: to -embedded]
[Re: RDC R8610 x86 SOC, equally applicable to MIPS cores]

Bruce Evans wrote:
> libc/softfloat is probably the best practical way to support these.  It
> has higher quality than the FreeBSD FPU emulator and is hopefully easy
> to configure.  It was used by arm.  Not sure if it still is, or what
> happened to gcc support for soft-float after I stopped using it when
> I got a 486.  Even in 1988, soft-float was painful to configure because
> almost everyone assumed hardware or emulator support for x86s.

Thanks for the advice.

It looks current but I'd have to fire up -msoft-float to check. My 
understanding is that gcc did not always support -msoft-float for i386, 
and several Linux distributions have patches floating around to support 
it on i386.

Moreover, it appears that the i387 version of libm is a hardcoded 
dependency in buildworld for ARCH=i386. I'm not 100% sure what the best 
way is to deal with this is.

It seems reasonable that floating point can't be used in the kernel for 
these targets, however, someone is bound to trip over this -- I wonder 
if soft-float can be used in kernel or with threaded apps -- it looks 
that way, as I see no 'statics' in any of the library code.

Thanks again

More information about the freebsd-embedded mailing list