From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8944 invoked by alias); 3 Oct 2013 18:18:06 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 8928 invoked by uid 89); 3 Oct 2013 18:18:05 -0000 Received: from multi.imgtec.com (HELO multi.imgtec.com) (194.200.65.239) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 03 Oct 2013 18:18:05 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,NO_RECEIVED,NO_RELAYS autolearn=ham version=3.3.2 X-HELO: multi.imgtec.com From: "Steve Ellcey " Date: Thu, 03 Oct 2013 18:18:00 -0000 To: Subject: [PATCH] MIPS: Use sqrt instruction on mips32 and mips64. User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-ID: <5846cd67-3ec4-4b51-b6e2-3d50d044cbc1@BAMAIL02.ba.imgtec.org> X-SEF-Processed: 7_3_0_01192__2013_10_03_19_18_02 X-SW-Source: 2013-10/txt/msg00005.txt.bz2 This is a fix for PR 15632. The mips32 and mips64 glibc builds are not using the sqrt instruction in the sqrt libm functions. Each of the new files is a single line to include mips/fpu/e_sqrt.c (or e_sqrtf.c). I initially tried to create mips64/fpu but that did not work so I had to create both mips64/n32/fpu and mips64/n64/fpu instead. I did not see any sqrt tests in the glibc performance benchmarks, so I just ran a test of my own that did a bunch of sqrt operations and compiled it with -O2 -fno-builtins. It went from 61 seconds to 17 seconds on my 74k board. I also ran the glibc testsuite with the o32, n32, and n64 ABI's to verify there were no regressions in the testsuite. Ok to checkin? 2013-10-03 Steve Ellcey * sysdeps/mips/mips32/fpu/e_sqrt.c: New. * sysdeps/mips/mips32/fpu/e_sqrtf.c: New. * sysdeps/mips/mips64/n32/fpu/e_sqrt.c: New. * sysdeps/mips/mips64/n32/fpu/e_sqrtf.c: New. * sysdeps/mips/mips64/n64/fpu/e_sqrt.c: New. * sysdeps/mips/mips64/n64/fpu/e_sqrtf.c: New. diff --git a/ports/sysdeps/mips/mips32/fpu/e_sqrt.c b/ports/sysdeps/mips/mips32/fpu/e_sqrt.c new file mode 100644 index 0000000..81f4e77 --- /dev/null +++ b/ports/sysdeps/mips/mips32/fpu/e_sqrt.c @@ -0,0 +1 @@ +#include diff --git a/ports/sysdeps/mips/mips32/fpu/e_sqrtf.c b/ports/sysdeps/mips/mips32/fpu/e_sqrtf.c new file mode 100644 index 0000000..fb0700d --- /dev/null +++ b/ports/sysdeps/mips/mips32/fpu/e_sqrtf.c @@ -0,0 +1 @@ +#include diff --git a/ports/sysdeps/mips/mips64/n32/fpu/e_sqrt.c b/ports/sysdeps/mips/mips64/n32/fpu/e_sqrt.c new file mode 100644 index 0000000..81f4e77 --- /dev/null +++ b/ports/sysdeps/mips/mips64/n32/fpu/e_sqrt.c @@ -0,0 +1 @@ +#include diff --git a/ports/sysdeps/mips/mips64/n32/fpu/e_sqrtf.c b/ports/sysdeps/mips/mips64/n32/fpu/e_sqrtf.c new file mode 100644 index 0000000..fb0700d --- /dev/null +++ b/ports/sysdeps/mips/mips64/n32/fpu/e_sqrtf.c @@ -0,0 +1 @@ +#include diff --git a/ports/sysdeps/mips/mips64/n64/fpu/e_sqrt.c b/ports/sysdeps/mips/mips64/n64/fpu/e_sqrt.c new file mode 100644 index 0000000..81f4e77 --- /dev/null +++ b/ports/sysdeps/mips/mips64/n64/fpu/e_sqrt.c @@ -0,0 +1 @@ +#include diff --git a/ports/sysdeps/mips/mips64/n64/fpu/e_sqrtf.c b/ports/sysdeps/mips/mips64/n64/fpu/e_sqrtf.c new file mode 100644 index 0000000..fb0700d --- /dev/null +++ b/ports/sysdeps/mips/mips64/n64/fpu/e_sqrtf.c @@ -0,0 +1 @@ +#include