Subject: floating-point exceptions and SSE, fp lib standards
To: None <port-i386@netbsd.org>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: port-i386
Date: 04/19/2004 21:10:39
Hi -
using sse2 math instead of i387 gives a significant speedup on
pentium4, and probably using sse on p3/athlon is useful too
as long as single precision is sufficient.
(gcc emits sse code with -mfpmath=sse -msse[2])

While the kernel should be OK is this respect, the libc functions
dealing with exceptions (fp{get,set}{round,sticky,mask}) don't care
about the sse status.
These functions are rarely used, but some serious number crunching
software might do so. Do you know of any where this would be a problem?

The standardization status of the fp* functions is somewhat unclear to
me - it seems they are of sysV heritage, but I didn't find a mention
in susV3.
C99 has some equivalent functions named fe* which are appearently not
in common use yet. (implemented in glibc afaics)
Any background information, someone?

And, while we are here, does anyone have an idea why fabs() is
implemented in libc (rather than libm) in NetBSD?

best regards
Matthias