mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 22:40:05 +00:00
alpha: Remove some __GNUC_PREREQs that are too old
This commit is contained in:
parent
a7940a7085
commit
c0b21b6958
@ -1,5 +1,5 @@
|
|||||||
/* Compatibility macros for old and new Alpha complex float ABI.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
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
|
follow the official Tru64 ABI, which passes the components of a complex
|
||||||
as separate parameters. */
|
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_decl(x) double x
|
||||||
# define c1_cfloat_real(x) __real__ c1_cfloat_value (x)
|
# define c1_cfloat_real(x) __real__ c1_cfloat_value (x)
|
||||||
# define c1_cfloat_imag(x) __imag__ 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_value(x) (((c1_compat *)(void *)&x)->cf)
|
||||||
# define c1_cfloat_rettype double
|
# define c1_cfloat_rettype double
|
||||||
# define c1_cfloat_return(x) ({ c1_compat _; _.cf = (x); _.d; })
|
# define c1_cfloat_return(x) ({ c1_compat _; _.cf = (x); _.d; })
|
||||||
|
|
||||||
# define c2_cfloat_decl(x) _Complex float x
|
# define c2_cfloat_decl(x) _Complex float x
|
||||||
# define c2_cfloat_real(x) __real__ x
|
# define c2_cfloat_real(x) __real__ x
|
||||||
# define c2_cfloat_imag(x) __imag__ x
|
# define c2_cfloat_imag(x) __imag__ x
|
||||||
# define c2_cfloat_value(x) x
|
# define c2_cfloat_value(x) x
|
||||||
# define c2_cfloat_rettype _Complex float
|
# define c2_cfloat_rettype _Complex float
|
||||||
# define c2_cfloat_return(x) x
|
# 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. */
|
/* Get the proper symbol versions defined for each function. */
|
||||||
|
|
||||||
|
@ -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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Richard Henderson.
|
Contributed by Richard Henderson.
|
||||||
|
|
||||||
@ -22,12 +22,7 @@
|
|||||||
double
|
double
|
||||||
__fabs (double x)
|
__fabs (double x)
|
||||||
{
|
{
|
||||||
#if __GNUC_PREREQ (2, 8)
|
|
||||||
return __builtin_fabs (x);
|
return __builtin_fabs (x);
|
||||||
#else
|
|
||||||
__asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x));
|
|
||||||
return x;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
weak_alias (__fabs, fabs)
|
weak_alias (__fabs, fabs)
|
||||||
|
@ -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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Richard Henderson.
|
Contributed by Richard Henderson.
|
||||||
|
|
||||||
@ -21,12 +21,7 @@
|
|||||||
float
|
float
|
||||||
__fabsf (float x)
|
__fabsf (float x)
|
||||||
{
|
{
|
||||||
#if __GNUC_PREREQ (2, 8)
|
|
||||||
return __builtin_fabsf (x);
|
return __builtin_fabsf (x);
|
||||||
#else
|
|
||||||
__asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x));
|
|
||||||
return x;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
weak_alias (__fabsf, fabsf)
|
weak_alias (__fabsf, fabsf)
|
||||||
|
@ -28,30 +28,6 @@ static long int linux_sysconf (int name);
|
|||||||
|
|
||||||
extern long __libc_alpha_cache_shape[4];
|
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. */
|
/* Get the value of the system variable NAME. */
|
||||||
long int
|
long int
|
||||||
__sysconf (int name)
|
__sysconf (int name)
|
||||||
@ -79,7 +55,7 @@ __sysconf (int name)
|
|||||||
pages or have the kernel do the timings from KSEG. Fortunately,
|
pages or have the kernel do the timings from KSEG. Fortunately,
|
||||||
kernels beginning with 2.6.5 will pass us this info in auxvec. */
|
kernels beginning with 2.6.5 will pass us this info in auxvec. */
|
||||||
|
|
||||||
switch (implver())
|
switch (__builtin_alpha_implver ())
|
||||||
{
|
{
|
||||||
case 0: /* EV4 */
|
case 0: /* EV4 */
|
||||||
/* EV4/LCA45 had 8k L1 caches; EV45 had 16k L1 caches. */
|
/* EV4/LCA45 had 8k L1 caches; EV45 had 16k L1 caches. */
|
||||||
@ -89,7 +65,7 @@ __sysconf (int name)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: /* EV5 */
|
case 1: /* EV5 */
|
||||||
if (amask (1 << 8))
|
if (__builtin_alpha_amask (1 << 8))
|
||||||
{
|
{
|
||||||
/* MAX insns not present; either EV5 or EV56. */
|
/* MAX insns not present; either EV5 or EV56. */
|
||||||
shape_l1i = shape_l1d = CSHAPE(8*1024, 5, 1);
|
shape_l1i = shape_l1d = CSHAPE(8*1024, 5, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user