From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8108 invoked by alias); 15 Jun 2012 19:21:17 -0000 Received: (qmail 8055 invoked by uid 22791); 15 Jun 2012 19:21:11 -0000 X-SWARE-Spam-Status: No, hits=-4.8 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,SARE_SUB_OBFU_Q1,TW_PL 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:20:45 +0000 Received: by pbbrp2 with SMTP id rp2so6186843pbb.0 for ; Fri, 15 Jun 2012 12:20:44 -0700 (PDT) Received: by 10.68.192.39 with SMTP id hd7mr23073536pbc.97.1339788044471; Fri, 15 Jun 2012 12:20:44 -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.43 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Jun 2012 12:20:44 -0700 (PDT) From: Richard Henderson To: libc-ports@sourceware.org Subject: [PATCH 2/7] alpha: Remove some __GNUC_PREREQs that are too old Date: Fri, 15 Jun 2012 19:21:00 -0000 Message-Id: <1339788037-29519-3-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/msg00060.txt.bz2 --- sysdeps/alpha/fpu/cfloat-compat.h | 21 +++------------------ sysdeps/alpha/fpu/s_fabs.c | 7 +------ sysdeps/alpha/fpu/s_fabsf.c | 7 +------ sysdeps/unix/sysv/linux/alpha/sysconf.c | 28 ++-------------------------- 4 files changed, 7 insertions(+), 56 deletions(-) diff --git a/sysdeps/alpha/fpu/cfloat-compat.h b/sysdeps/alpha/fpu/cfloat-compat.h index f75bb9b..35542e6 100644 --- a/sysdeps/alpha/fpu/cfloat-compat.h +++ b/sysdeps/alpha/fpu/cfloat-compat.h @@ -1,5 +1,5 @@ /* Compatibility macros for old and new Alpha complex float ABI. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,35 +25,20 @@ follow the official Tru64 ABI, which passes the components of a complex as separate parameters. */ -#if __GNUC_PREREQ(3,4) - typedef union { double d; _Complex float cf; } c1_compat; +typedef union { double d; _Complex float cf; } c1_compat; # define c1_cfloat_decl(x) double x # define c1_cfloat_real(x) __real__ c1_cfloat_value (x) # define c1_cfloat_imag(x) __imag__ c1_cfloat_value (x) # define c1_cfloat_value(x) (((c1_compat *)(void *)&x)->cf) # define c1_cfloat_rettype double # define c1_cfloat_return(x) ({ c1_compat _; _.cf = (x); _.d; }) + # define c2_cfloat_decl(x) _Complex float x # define c2_cfloat_real(x) __real__ x # define c2_cfloat_imag(x) __imag__ x # define c2_cfloat_value(x) x # define c2_cfloat_rettype _Complex float # define c2_cfloat_return(x) x -#else -# define c1_cfloat_decl(x) _Complex float x -# define c1_cfloat_real(x) __real__ x -# define c1_cfloat_imag(x) __imag__ x -# define c1_cfloat_value(x) x -# define c1_cfloat_rettype _Complex float -# define c1_cfloat_return(x) x -# define c2_cfloat_decl(x) float x ## r, float x ## i -# define c2_cfloat_real(x) x ## r -# define c2_cfloat_imag(x) x ## i -# define c2_cfloat_value(x) \ - ({ _Complex float _; __real__ _ = x##r; __imag__ _ = x##i; _; }) -# define c2_cfloat_rettype double _Complex -# define c2_cfloat_return(x) x -#endif /* Get the proper symbol versions defined for each function. */ diff --git a/sysdeps/alpha/fpu/s_fabs.c b/sysdeps/alpha/fpu/s_fabs.c index 0105162..f970acd 100644 --- a/sysdeps/alpha/fpu/s_fabs.c +++ b/sysdeps/alpha/fpu/s_fabs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2006, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson. @@ -22,12 +22,7 @@ double __fabs (double x) { -#if __GNUC_PREREQ (2, 8) return __builtin_fabs (x); -#else - __asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x)); - return x; -#endif } weak_alias (__fabs, fabs) diff --git a/sysdeps/alpha/fpu/s_fabsf.c b/sysdeps/alpha/fpu/s_fabsf.c index 05f776e..5c80ae8 100644 --- a/sysdeps/alpha/fpu/s_fabsf.c +++ b/sysdeps/alpha/fpu/s_fabsf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 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. @@ -21,12 +21,7 @@ float __fabsf (float x) { -#if __GNUC_PREREQ (2, 8) return __builtin_fabsf (x); -#else - __asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x)); - return x; -#endif } weak_alias (__fabsf, fabsf) diff --git a/sysdeps/unix/sysv/linux/alpha/sysconf.c b/sysdeps/unix/sysv/linux/alpha/sysconf.c index afb7aa6..603157e 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysconf.c +++ b/sysdeps/unix/sysv/linux/alpha/sysconf.c @@ -28,30 +28,6 @@ static long int linux_sysconf (int name); extern long __libc_alpha_cache_shape[4]; -static inline unsigned long -implver (void) -{ - unsigned long i; -#if __GNUC_PREREQ(3,3) - i = __builtin_alpha_implver (); -#else - asm ("implver %0" : "=r" (i)); -#endif - return i; -} - -static inline unsigned long -amask (unsigned long x) -{ - unsigned long r; -#if __GNUC_PREREQ(3,3) - r = __builtin_alpha_amask (x); -#else - asm ("amask %1,%0" : "=r"(r) : "Ir"(x)); -#endif - return r; -} - /* Get the value of the system variable NAME. */ long int __sysconf (int name) @@ -79,7 +55,7 @@ __sysconf (int name) pages or have the kernel do the timings from KSEG. Fortunately, kernels beginning with 2.6.5 will pass us this info in auxvec. */ - switch (implver()) + switch (__builtin_alpha_implver ()) { case 0: /* EV4 */ /* EV4/LCA45 had 8k L1 caches; EV45 had 16k L1 caches. */ @@ -89,7 +65,7 @@ __sysconf (int name) break; case 1: /* EV5 */ - if (amask (1 << 8)) + if (__builtin_alpha_amask (1 << 8)) { /* MAX insns not present; either EV5 or EV56. */ shape_l1i = shape_l1d = CSHAPE(8*1024, 5, 1); -- 1.7.7.6