[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r19122 - in /fsf/trunk/ports: ./ sysdeps/alpha/bits/ sysdeps/alpha/fpu/ sysdeps/alpha/soft-fp/ sysdeps/unix/sysv/linux/alpha...



Author: eglibc
Date: Sat Jun 16 00:01:52 2012
New Revision: 19122

Log:
Import glibc-ports-mainline for 2012-06-16

Modified:
    fsf/trunk/ports/ChangeLog.alpha
    fsf/trunk/ports/sysdeps/alpha/bits/mathdef.h
    fsf/trunk/ports/sysdeps/alpha/fpu/cfloat-compat.h
    fsf/trunk/ports/sysdeps/alpha/fpu/s_copysign.c
    fsf/trunk/ports/sysdeps/alpha/fpu/s_copysignf.c
    fsf/trunk/ports/sysdeps/alpha/fpu/s_fabs.c
    fsf/trunk/ports/sysdeps/alpha/fpu/s_fabsf.c
    fsf/trunk/ports/sysdeps/alpha/fpu/s_nearbyint.c
    fsf/trunk/ports/sysdeps/alpha/fpu/s_nearbyintf.c
    fsf/trunk/ports/sysdeps/alpha/fpu/s_rint.c
    fsf/trunk/ports/sysdeps/alpha/fpu/s_rintf.c
    fsf/trunk/ports/sysdeps/alpha/soft-fp/sfp-machine.h
    fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/resource.h
    fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/shm.h
    fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/stat.h
    fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/sysconf.c

Modified: fsf/trunk/ports/ChangeLog.alpha
==============================================================================
--- fsf/trunk/ports/ChangeLog.alpha (original)
+++ fsf/trunk/ports/ChangeLog.alpha Sat Jun 16 00:01:52 2012
@@ -1,3 +1,35 @@
+2012-06-15  Richard Henderson  <rth@xxxxxxxxxxx>
+
+	* sysdeps/alpha/soft-fp/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): New.
+
+	* 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  <rth@xxxxxxxxxxx>
 
 	* sysdeps/alpha/strncmp.S: Bound count to LONG_MAX at startup.

Modified: fsf/trunk/ports/sysdeps/alpha/bits/mathdef.h
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/bits/mathdef.h (original)
+++ fsf/trunk/ports/sysdeps/alpha/bits/mathdef.h Sat Jun 16 00:01:52 2012
@@ -25,19 +25,9 @@
 #if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
 # define _MATH_H_MATHDEF	1
 
-# ifdef __GNUC__
-
-/* In GNU or ANSI mode, gcc leaves `float' expressions as-is.  */
-typedef float float_t;
-typedef double double_t;
-
-# else
-
-/* Wild guess at types for float_t and double_t. */
-typedef double float_t;
-typedef double double_t;
-
-# endif
+/* Alpha has "float" and "double" operations.  */
+typedef float float_t;    /* float expressions are evaluated as float.  */
+typedef double double_t;  /* double expressions are evaluated as double.  */
 
 /* The values returned by `ilogb' for 0 and NaN respectively.  */
 # define FP_ILOGB0     (-2147483647)

Modified: fsf/trunk/ports/sysdeps/alpha/fpu/cfloat-compat.h
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/fpu/cfloat-compat.h (original)
+++ fsf/trunk/ports/sysdeps/alpha/fpu/cfloat-compat.h Sat Jun 16 00:01:52 2012
@@ -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.  */
 

Modified: fsf/trunk/ports/sysdeps/alpha/fpu/s_copysign.c
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/fpu/s_copysign.c (original)
+++ fsf/trunk/ports/sysdeps/alpha/fpu/s_copysign.c Sat Jun 16 00:01:52 2012
@@ -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,8 +22,7 @@
 double
 __copysign (double x, double y)
 {
-  __asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x));
-  return x;
+  return __builtin_copysign (x, y);
 }
 
 weak_alias (__copysign, copysign)

Modified: fsf/trunk/ports/sysdeps/alpha/fpu/s_copysignf.c
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/fpu/s_copysignf.c (original)
+++ fsf/trunk/ports/sysdeps/alpha/fpu/s_copysignf.c Sat Jun 16 00:01:52 2012
@@ -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,8 +21,7 @@
 float
 __copysignf (float x, float y)
 {
-  __asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x));
-  return x;
+  return __builtin_copysignf (x, y);
 }
 
 weak_alias (__copysignf, copysignf)

Modified: fsf/trunk/ports/sysdeps/alpha/fpu/s_fabs.c
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/fpu/s_fabs.c (original)
+++ fsf/trunk/ports/sysdeps/alpha/fpu/s_fabs.c Sat Jun 16 00:01:52 2012
@@ -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)

Modified: fsf/trunk/ports/sysdeps/alpha/fpu/s_fabsf.c
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/fpu/s_fabsf.c (original)
+++ fsf/trunk/ports/sysdeps/alpha/fpu/s_fabsf.c Sat Jun 16 00:01:52 2012
@@ -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)

Modified: fsf/trunk/ports/sysdeps/alpha/fpu/s_nearbyint.c
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/fpu/s_nearbyint.c (original)
+++ fsf/trunk/ports/sysdeps/alpha/fpu/s_nearbyint.c Sat Jun 16 00:01:52 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 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.
 
@@ -19,22 +19,23 @@
 #include <math.h>
 #include <math_ldbl_opt.h>
 
-#ifdef _IEEE_FP_INEXACT
-#error "Don't compile with -mieee-with-inexact"
-#endif
 
 double
 __nearbyint (double x)
 {
-  double two52 = copysign (0x1.0p52, x);
-  double r;
-  
-  r = x + two52;
-  r = r - two52;
+  if (isless (fabs (x), 9007199254740992.0))	/* 1 << DBL_MANT_DIG */
+    {
+      double tmp1, new_x;
+      __asm ("cvttq/svd %2,%1\n\t"
+	     "cvtqt/d %1,%0\n\t"
+	     : "=f"(new_x), "=&f"(tmp1)
+	     : "f"(x));
 
-  /* nearbyint(-0.1) == -0, and in general we'll always have the same sign
-     as our input.  */
-  return copysign (r, x);
+      /* nearbyint(-0.1) == -0, and in general we'll always have the same
+	 sign as our input.  */
+      x = copysign(new_x, x);
+    }
+  return x;
 }
 
 weak_alias (__nearbyint, nearbyint)
@@ -42,6 +43,6 @@
 strong_alias (__nearbyint, __nearbyintl)
 weak_alias (__nearbyint, nearbyintl)
 #endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_0);
 #endif

Modified: fsf/trunk/ports/sysdeps/alpha/fpu/s_nearbyintf.c
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/fpu/s_nearbyintf.c (original)
+++ fsf/trunk/ports/sysdeps/alpha/fpu/s_nearbyintf.c Sat Jun 16 00:01:52 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson.
 
@@ -18,22 +18,29 @@
 
 #include <math.h>
 
-#ifdef _IEEE_FP_INEXACT
-#error "Don't compile with -mieee-with-inexact"
-#endif
-
 float
 __nearbyintf (float x)
 {
-  float two23 = copysignf (0x1.0p23, x);
-  float r;
+  if (isless (fabsf (x), 16777216.0f))	/* 1 << FLT_MANT_DIG */
+    {
+      /* Note that Alpha S_Floating is stored in registers in a
+	 restricted T_Floating format, so we don't even need to
+	 convert back to S_Floating in the end.  The initial
+	 conversion to T_Floating is needed to handle denormals.  */
 
-  r = x + two23;
-  r = r - two23;
+      float tmp1, tmp2, new_x;
 
-  /* nearbyint(-0.1) == -0, and in general we'll always have the same sign
-     as our input.  */
-  return copysign (r, x);
+      __asm ("cvtst/s %3,%2\n\t"
+	     "cvttq/svd %2,%1\n\t"
+	     "cvtqt/d %1,%0\n\t"
+	     : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2)
+	     : "f"(x));
+
+      /* nearbyintf(-0.1) == -0, and in general we'll always have the same
+	 sign as our input.  */
+      x = copysignf(new_x, x);
+    }
+  return x;
 }
 
 weak_alias (__nearbyintf, nearbyintf)

Modified: fsf/trunk/ports/sysdeps/alpha/fpu/s_rint.c
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/fpu/s_rint.c (original)
+++ fsf/trunk/ports/sysdeps/alpha/fpu/s_rint.c Sat Jun 16 00:01:52 2012
@@ -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 @@
   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));

Modified: fsf/trunk/ports/sysdeps/alpha/fpu/s_rintf.c
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/fpu/s_rintf.c (original)
+++ fsf/trunk/ports/sysdeps/alpha/fpu/s_rintf.c Sat Jun 16 00:01:52 2012
@@ -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 @@
       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));

Modified: fsf/trunk/ports/sysdeps/alpha/soft-fp/sfp-machine.h
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/soft-fp/sfp-machine.h (original)
+++ fsf/trunk/ports/sysdeps/alpha/soft-fp/sfp-machine.h Sat Jun 16 00:01:52 2012
@@ -1,6 +1,6 @@
 /* Machine-dependent software floating-point definitions.
    Alpha userland IEEE 128-bit version.
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@xxxxxxxxxx),
 		  Jakub Jelinek (jj@xxxxxxxxxxxxxx) and
@@ -91,3 +91,6 @@
       __ieee_set_fp_control (t | _fex);				\
     }								\
 } while (0)
+
+#define FP_TRAPPING_EXCEPTIONS					\
+  ((__ieee_get_fp_control () & SWCR_ENABLE_MASK) << SWCR_ENABLE_SHIFT)

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/resource.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/resource.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/resource.h Sat Jun 16 00:01:52 2012
@@ -1,6 +1,5 @@
 /* Bit values & structures for resource limits.  Alpha/Linux version.
-   Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005
-   Free Software Foundation, Inc.
+   Copyright (C) 1994-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
@@ -99,7 +98,13 @@
   __RLIMIT_RTPRIO = 14,
 #define RLIMIT_RTPRIO __RLIMIT_RTPRIO
 
-  __RLIMIT_NLIMITS = 15,
+  /* Maximum CPU time in ÃÂs that a process scheduled under a real-time
+     scheduling policy may consume without making a blocking system
+     call before being forcibly descheduled.  */
+  __RLIMIT_RTTIME = 15,
+#define RLIMIT_RTTIME __RLIMIT_RTTIME
+
+  __RLIMIT_NLIMITS = 16,
   __RLIM_NLIMITS = __RLIMIT_NLIMITS
 #define RLIMIT_NLIMITS __RLIMIT_NLIMITS
 #define RLIM_NLIMITS __RLIM_NLIMITS
@@ -157,10 +162,11 @@
 #define RUSAGE_SELF RUSAGE_SELF
 
   /* All of its terminated child processes.  */
-  RUSAGE_CHILDREN = -1,
+  RUSAGE_CHILDREN = -1
 #define RUSAGE_CHILDREN RUSAGE_CHILDREN
 
 #ifdef __USE_GNU
+  ,
   /* The calling thread.  */
   RUSAGE_THREAD = 1
 # define RUSAGE_THREAD RUSAGE_THREAD
@@ -230,3 +236,31 @@
   PRIO_USER = 2			/* WHO is a user ID.  */
 #define PRIO_USER PRIO_USER
 };
+
+
+__BEGIN_DECLS
+
+#ifdef __USE_GNU
+/* Modify and return resource limits of a process atomically.  */
+# ifndef __USE_FILE_OFFSET64
+extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
+		    const struct rlimit *__new_limit,
+		    struct rlimit *__old_limit) __THROW;
+# else
+#  ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (prlimit, (__pid_t __pid,
+				     enum __rlimit_resource __resource,
+				     const struct rlimit *__new_limit,
+				     struct rlimit *__old_limit), prlimit64);
+#  else
+#   define prlimit prlimit64
+#  endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource,
+		      const struct rlimit64 *__new_limit,
+		      struct rlimit64 *__old_limit) __THROW;
+# endif
+#endif
+
+__END_DECLS

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/shm.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/shm.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/shm.h Sat Jun 16 00:01:52 2012
@@ -1,5 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004
-   Free Software Foundation, Inc.
+/* Copyright (C) 1995-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
@@ -30,6 +29,7 @@
 #define SHM_RDONLY	010000		/* attach read-only else read-write */
 #define SHM_RND		020000		/* round attach address to SHMLBA */
 #define SHM_REMAP	040000		/* take-over region on attach */
+#define SHM_EXEC	0100000		/* execution access */
 
 /* Commands for `shmctl'.  */
 #define SHM_LOCK	11		/* lock segment (root only) */

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/stat.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/stat.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/stat.h Sat Jun 16 00:01:52 2012
@@ -1,5 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2010,2012
-   Free Software Foundation, Inc.
+/* Copyright (C) 1996-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
@@ -153,8 +152,7 @@
 #define	__S_IWRITE	0200	/* Write by owner.  */
 #define	__S_IEXEC	0100	/* Execute by owner.  */
 
-#if defined __USE_ATFILE || defined __USE_GNU
-/* XXX This will change to the macro for the next 2008 POSIX revision.  */
+#ifdef __USE_ATFILE
 # define UTIME_NOW	((1l << 30) - 1l)
 # define UTIME_OMIT	((1l << 30) - 2l)
 #endif

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/sysconf.c
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/sysconf.c (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/sysconf.c Sat Jun 16 00:01:52 2012
@@ -28,30 +28,6 @@
 
 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 @@
 	 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 @@
 	  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);

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits