/* 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
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. */
-/* 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.
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)
-/* 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.
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)
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)
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. */
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);