From owner-freebsd-bugs Tue Dec 17 15:40: 6 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3383237B401 for ; Tue, 17 Dec 2002 15:40:04 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9B4C43E4A for ; Tue, 17 Dec 2002 15:40:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gBHNe3x3088439 for ; Tue, 17 Dec 2002 15:40:03 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gBHNe3x8088438; Tue, 17 Dec 2002 15:40:03 -0800 (PST) Date: Tue, 17 Dec 2002 15:40:03 -0800 (PST) Message-Id: <200212172340.gBHNe3x8088438@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Mikhail Teterin Subject: Re: bin/43299: march=pentium4 miscompiles msun/src/e_pow.c Reply-To: Mikhail Teterin Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/43299; it has been noted by GNATS. From: Mikhail Teterin 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 #include 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