Date: Tue, 17 Dec 2002 15:40:03 -0800 (PST) From: Mikhail Teterin <mi+mx@aldan.algebra.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/43299: march=pentium4 miscompiles msun/src/e_pow.c Message-ID: <200212172340.gBHNe3x8088438@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/43299; it has been noted by GNATS. From: Mikhail Teterin <mi+mx@aldan.algebra.com> To: freebsd-gnats-submit@FreeBSD.org, mi@aldan.algebra.com Cc: deischen@FreeBSD.org, bde@FreeBSD.org Subject: Re: bin/43299: march=pentium4 miscompiles msun/src/e_pow.c Date: Tue, 17 Dec 2002 18:41:46 -0500 The described problem no longer exists. Probably -- thanks to the recent commit: deischen 2002/12/02 11:58:55 PST Modified files: sys/i386/i386 genassym.c locore.s machdep.c sys/i386/include signal.h ucontext.h Log: Align the FPU state in the ucontext and sigcontext to 16 bytes to accomodate the new SSE/XMM floating point save/restore instructions. This commit is mostly from bde and includes some style nits. Approved by: re (jhb) However, on my 2GHz Pentium4, the pow(3) is between 10 to 15% slower, when compiled for pentium4, than it is, when compiled for pentium3. The little program follows. It prints out the results of the explicit __ieee754_pow(), and than goes to work. #include <math.h> #include <stdio.h> double __ieee754_pow(double, double); int main() { int i; printf("%g^%g is %g\n", 2.0, 2.1, __ieee754_pow(2.0, 2.1)); printf("%g^%g is %g\n", 11.0, -2.1, __ieee754_pow(11.0, -2.1)); for (i = 0; i < 10000000; i++) __ieee754_pow(11.0, -2.1); return 0; } I compile it (named t.c) as follows: cd /usr/src/lib/msun/src cc $FLAGS t.c e_exp.c ../i387/s_scalbn.S ../i387/e_sqrt.S e_pow.c To exclude the effects of the precompiled -lm. -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212172340.gBHNe3x8088438>