From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12797 invoked by alias); 15 Jun 2012 19:28:09 -0000 Received: (qmail 12789 invoked by uid 22791); 15 Jun 2012 19:28:08 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pb0-f41.google.com (HELO mail-pb0-f41.google.com) (209.85.160.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Jun 2012 19:27:46 +0000 Received: by pbbrp2 with SMTP id rp2so6193442pbb.0 for ; Fri, 15 Jun 2012 12:27:45 -0700 (PDT) Received: by 10.68.231.10 with SMTP id tc10mr2910860pbc.107.1339788048801; Fri, 15 Jun 2012 12:20:48 -0700 (PDT) Received: from anchor.twiddle.home ([173.160.232.49]) by mx.google.com with ESMTPS id tm2sm14126864pbc.69.2012.06.15.12.20.48 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Jun 2012 12:20:48 -0700 (PDT) From: Richard Henderson To: libc-ports@sourceware.org Subject: [PATCH 7/7] alpha: Always handle inexact in rint implementations Date: Fri, 15 Jun 2012 19:28:00 -0000 Message-Id: <1339788037-29519-8-git-send-email-rth@twiddle.net> In-Reply-To: <1339788037-29519-1-git-send-email-rth@twiddle.net> References: <1339788037-29519-1-git-send-email-rth@twiddle.net> X-IsSubscribed: yes 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 X-SW-Source: 2012-06/txt/msg00064.txt.bz2 --- ChangeLog.alpha | 30 ++++++++++++++++++++++++++++++ sysdeps/alpha/fpu/s_rint.c | 9 ++------- sysdeps/alpha/fpu/s_rintf.c | 6 +----- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 824083c..5ec3634 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,33 @@ +2012-06-15 Richard Henderson + + * sysdeps/alpha/fpu/s_rint.c (__rint): Handle inexact regardless + of -mieee-with-inexact. + * sysdeps/alpha/fpu/s_rintf.c (__rintf): Likewise. + + [BZ #13848] + * sysdeps/alpha/fpu/s_nearbyint.c (__nearbyint): Fix corner cases + similar to BZ#5350. + * sysdeps/alpha/fpu/s_nearbyintf.c (__nearbyintf): Likewise. + + * sysdeps/alpha/fpu/s_copysign.c (__copysign): Use builtin. + * sysdeps/alpha/fpu/s_copysignf.c (__copysignf): Use builtin. + + * sysdeps/unix/sysv/linux/alpha/bits/resource.h (RLIMIT_RTTIME): New. + (prlimit, prlimit64): New declarations. + * sysdeps/unix/sysv/linux/alpha/bits/shm.h (SHM_EXEC): New. + * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Use only __USE_ATFILE + to protect UTIME_NOW and UTIME_OMIT. + + * sysdeps/alpha/fpu/cfloat-compat.h: Remove __GNUC_PREREQ check. + * sysdeps/alpha/fpu/s_fabs.c (__fabs): Likewise. + * sysdeps/alpha/fpu/s_fabsf.c (__fabsf): Likewise. + * sysdeps/unix/sysv/linux/alpha/sysconf.c (implver): Remove. + (amask): Remove. + (__sysconf): Use builtins directly. + + * sysdeps/alpha/bits/mathdef.h (float_t): Define as float + regardless of __GNUC__. + 2012-06-06 Richard Henderson * sysdeps/alpha/strncmp.S: Bound count to LONG_MAX at startup. diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_rint.c index b58ef81..6ddcc13 100644 --- a/sysdeps/alpha/fpu/s_rint.c +++ b/sysdeps/alpha/fpu/s_rint.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -26,12 +26,7 @@ __rint (double x) if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */ { double tmp1, new_x; - __asm ( -#ifdef _IEEE_FP_INEXACT - "cvttq/svid %2,%1\n\t" -#else - "cvttq/svd %2,%1\n\t" -#endif + __asm ("cvttq/svid %2,%1\n\t" "cvtqt/d %1,%0\n\t" : "=f"(new_x), "=&f"(tmp1) : "f"(x)); diff --git a/sysdeps/alpha/fpu/s_rintf.c b/sysdeps/alpha/fpu/s_rintf.c index b17bf8c..226e77e 100644 --- a/sysdeps/alpha/fpu/s_rintf.c +++ b/sysdeps/alpha/fpu/s_rintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -32,11 +32,7 @@ __rintf (float x) float tmp1, tmp2, new_x; __asm ("cvtst/s %3,%2\n\t" -#ifdef _IEEE_FP_INEXACT "cvttq/svid %2,%1\n\t" -#else - "cvttq/svd %2,%1\n\t" -#endif "cvtqt/d %1,%0\n\t" : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2) : "f"(x)); -- 1.7.7.6