summaryrefslogtreecommitdiff
path: root/libc/sysdeps/x86_64/fpu
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/x86_64/fpu')
-rw-r--r--libc/sysdeps/x86_64/fpu/bits/fenv.h6
-rw-r--r--libc/sysdeps/x86_64/fpu/bits/mathinline.h39
-rw-r--r--libc/sysdeps/x86_64/fpu/e_log10l.S5
-rw-r--r--libc/sysdeps/x86_64/fpu/e_log2l.S5
-rw-r--r--libc/sysdeps/x86_64/fpu/e_logl.S5
-rw-r--r--libc/sysdeps/x86_64/fpu/e_powl.S12
-rw-r--r--libc/sysdeps/x86_64/fpu/e_scalbl.S4
-rw-r--r--libc/sysdeps/x86_64/fpu/math_private.h109
-rw-r--r--libc/sysdeps/x86_64/fpu/multiarch/Makefile22
-rw-r--r--libc/sysdeps/x86_64/fpu/multiarch/e_log.c3
-rw-r--r--libc/sysdeps/x86_64/fpu/multiarch/s_atan.c3
-rw-r--r--libc/sysdeps/x86_64/fpu/multiarch/s_sin.c6
-rw-r--r--libc/sysdeps/x86_64/fpu/multiarch/s_tan.c3
-rw-r--r--libc/sysdeps/x86_64/fpu/s_copysign.S6
-rw-r--r--libc/sysdeps/x86_64/fpu/s_copysignf.S6
-rw-r--r--libc/sysdeps/x86_64/fpu/s_expm1l.S7
-rw-r--r--libc/sysdeps/x86_64/fpu/s_log1pl.S5
17 files changed, 89 insertions, 157 deletions
diff --git a/libc/sysdeps/x86_64/fpu/bits/fenv.h b/libc/sysdeps/x86_64/fpu/bits/fenv.h
index 8bc245083..8142366b0 100644
--- a/libc/sysdeps/x86_64/fpu/bits/fenv.h
+++ b/libc/sysdeps/x86_64/fpu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2001,2004,2011 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2001,2004,2011,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
@@ -89,11 +89,11 @@ typedef struct
fenv_t;
/* If the default argument is used we use this value. */
-#define FE_DFL_ENV ((__const fenv_t *) -1)
+#define FE_DFL_ENV ((const fenv_t *) -1)
#ifdef __USE_GNU
/* Floating-point environment where none of the exception is masked. */
-# define FE_NOMASK_ENV ((__const fenv_t *) -2)
+# define FE_NOMASK_ENV ((const fenv_t *) -2)
#endif
diff --git a/libc/sysdeps/x86_64/fpu/bits/mathinline.h b/libc/sysdeps/x86_64/fpu/bits/mathinline.h
index 1a2c1ee99..038c64ee4 100644
--- a/libc/sysdeps/x86_64/fpu/bits/mathinline.h
+++ b/libc/sysdeps/x86_64/fpu/bits/mathinline.h
@@ -1,5 +1,5 @@
/* Inline math functions for x86-64.
- Copyright (C) 2002-2004, 2007, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004,2007,2009,2011,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
@@ -64,21 +64,20 @@ __MATH_INLINE int
__NTH (__signbitl (long double __x))
{
__extension__ union { long double __l; int __i[3]; } __u = { __l: __x };
- return (__u.__i[2] & 0x8000) != 0;
+ return __u.__i[2] & 0x8000;
}
__END_NAMESPACE_C99
#endif
-#if (__GNUC_PREREQ (2, 8) && !defined __NO_MATH_INLINES \
- && defined __OPTIMIZE__)
+#if __GNUC_PREREQ (2, 8) && !defined __NO_MATH_INLINES && defined __OPTIMIZE__
# ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
/* Round to nearest integer. */
-# if __WORDSIZE == 64 || defined __SSE_MATH__
+# ifdef __SSE_MATH__
__MATH_INLINE long int
__NTH (lrintf (float __x))
{
@@ -87,7 +86,7 @@ __NTH (lrintf (float __x))
return __res;
}
# endif
-# if __WORDSIZE == 64 || defined __SSE2_MATH__
+# ifdef __SSE2_MATH__
__MATH_INLINE long int
__NTH (lrint (double __x))
{
@@ -114,40 +113,64 @@ __NTH (llrint (double __x))
# endif
# if defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0 \
- && (__WORDSIZE == 64 || defined __SSE2_MATH__)
+ && defined __SSE2_MATH__
/* Determine maximum of two values. */
__MATH_INLINE float
__NTH (fmaxf (float __x, float __y))
{
+# ifdef __AVX__
+ float __res;
+ __asm ("vmaxss %2, %1, %0" : "=x" (__res) : "x" (x), "xm" (__y));
+ return __res;
+# else
__asm ("maxss %1, %0" : "+x" (__x) : "xm" (__y));
return __x;
+# endif
}
__MATH_INLINE double
__NTH (fmax (double __x, double __y))
{
+# ifdef __AVX__
+ float __res;
+ __asm ("vmaxsd %2, %1, %0" : "=x" (__res) : "x" (x), "xm" (__y));
+ return __res;
+# else
__asm ("maxsd %1, %0" : "+x" (__x) : "xm" (__y));
return __x;
+# endif
}
/* Determine minimum of two values. */
__MATH_INLINE float
__NTH (fminf (float __x, float __y))
{
+# ifdef __AVX__
+ float __res;
+ __asm ("vminss %2, %1, %0" : "=x" (__res) : "x" (x), "xm" (__y));
+ return __res;
+# else
__asm ("minss %1, %0" : "+x" (__x) : "xm" (__y));
return __x;
+# endif
}
__MATH_INLINE double
__NTH (fmin (double __x, double __y))
{
+# ifdef __AVX__
+ float __res;
+ __asm ("vminsd %2, %1, %0" : "=x" (__res) : "x" (x), "xm" (__y));
+ return __res;
+# else
__asm ("minsd %1, %0" : "+x" (__x) : "xm" (__y));
return __x;
+# endif
}
# endif
__END_NAMESPACE_C99
# endif
-# if defined __SSE4_1__ && (__WORDSIZE == 64 || defined __SSE2_MATH__)
+# if defined __SSE4_1__ && defined __SSE2_MATH__
# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
__BEGIN_NAMESPACE_C99
diff --git a/libc/sysdeps/x86_64/fpu/e_log10l.S b/libc/sysdeps/x86_64/fpu/e_log10l.S
index 50c58757a..ebc809e83 100644
--- a/libc/sysdeps/x86_64/fpu/e_log10l.S
+++ b/libc/sysdeps/x86_64/fpu/e_log10l.S
@@ -10,11 +10,8 @@
#include <machine/asm.h>
-#ifdef __ELF__
.section .rodata.cst8,"aM",@progbits,8
-#else
- .text
-#endif
+
.p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
diff --git a/libc/sysdeps/x86_64/fpu/e_log2l.S b/libc/sysdeps/x86_64/fpu/e_log2l.S
index 78dc2d5c0..140b93d10 100644
--- a/libc/sysdeps/x86_64/fpu/e_log2l.S
+++ b/libc/sysdeps/x86_64/fpu/e_log2l.S
@@ -9,11 +9,8 @@
#include <machine/asm.h>
-#ifdef __ELF__
.section .rodata.cst8,"aM",@progbits,8
-#else
- .text
-#endif
+
.p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
diff --git a/libc/sysdeps/x86_64/fpu/e_logl.S b/libc/sysdeps/x86_64/fpu/e_logl.S
index 2503b9a01..8876dc218 100644
--- a/libc/sysdeps/x86_64/fpu/e_logl.S
+++ b/libc/sysdeps/x86_64/fpu/e_logl.S
@@ -9,11 +9,8 @@
#include <machine/asm.h>
-#ifdef __ELF__
.section .rodata.cst8,"aM",@progbits,8
-#else
- .text
-#endif
+
.p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
diff --git a/libc/sysdeps/x86_64/fpu/e_powl.S b/libc/sysdeps/x86_64/fpu/e_powl.S
index a65c465ec..c24b60c14 100644
--- a/libc/sysdeps/x86_64/fpu/e_powl.S
+++ b/libc/sysdeps/x86_64/fpu/e_powl.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of pow function.
- Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, 2007, 2011
+ Copyright (C) 1996-1999, 2001, 2004, 2007, 2011-2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -21,11 +21,8 @@
#include <machine/asm.h>
-#ifdef __ELF__
.section .rodata.cst8,"aM",@progbits,8
-#else
- .text
-#endif
+
.p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
@@ -37,11 +34,8 @@ limit: .double 0.29
p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
ASM_SIZE_DIRECTIVE(p63)
-#ifdef __ELF__
.section .rodata.cst16,"aM",@progbits,16
-#else
- .text
-#endif
+
.p2align 3
ASM_TYPE_DIRECTIVE(infinity,@object)
inf_zero:
diff --git a/libc/sysdeps/x86_64/fpu/e_scalbl.S b/libc/sysdeps/x86_64/fpu/e_scalbl.S
index 5833321a1..8394310c9 100644
--- a/libc/sysdeps/x86_64/fpu/e_scalbl.S
+++ b/libc/sysdeps/x86_64/fpu/e_scalbl.S
@@ -10,11 +10,7 @@
#include <machine/asm.h>
-#ifdef __ELF__
.section .rodata
-#else
- .text
-#endif
.align ALIGNARG(4)
ASM_TYPE_DIRECTIVE(zero_nan,@object)
diff --git a/libc/sysdeps/x86_64/fpu/math_private.h b/libc/sysdeps/x86_64/fpu/math_private.h
index 7f52d5ee5..8e7971826 100644
--- a/libc/sysdeps/x86_64/fpu/math_private.h
+++ b/libc/sysdeps/x86_64/fpu/math_private.h
@@ -19,10 +19,14 @@
/* We can do a few things better on x86-64. */
-#ifdef __AVX__
+#if defined __AVX__ || defined SSE2AVX
# define MOVD "vmovd"
+# define STMXCSR "vstmxcsr"
+# define LDMXCSR "vldmxcsr"
#else
# define MOVD "movd"
+# define STMXCSR "stmxcsr"
+# define LDMXCSR "ldmxcsr"
#endif
/* Direct movement of float into integer register. */
@@ -86,7 +90,7 @@
({ int __di; GET_FLOAT_WORD (__di, (float) d); \
(__di & 0x7fffffff) < 0x7f800000; })
-#ifdef __AVX__
+#if defined __AVX__ || defined SSE2AVX
# define __ieee754_sqrt(d) \
({ double __res; \
asm ("vsqrtsd %1, %0, %0" : "=x" (__res) : "xm" ((double) (d))); \
@@ -112,7 +116,7 @@
#ifdef __SSE4_1__
# ifndef __rint
-# ifdef __AVX__
+# if defined __AVX__ || defined SSE2AVX
# define __rint(d) \
({ double __res; \
asm ("vroundsd $4, %1, %0, %0" : "=x" (__res) : "xm" ((double) (d))); \
@@ -125,7 +129,7 @@
# endif
# endif
# ifndef __rintf
-# ifdef __AVX__
+# if defined __AVX__ || defined SSE2AVX
# define __rintf(d) \
({ float __res; \
asm ("vroundss $4, %1, %0, %0" : "=x" (__res) : "xm" ((float) (d))); \
@@ -139,7 +143,7 @@
# endif
# ifndef __floor
-# ifdef __AVX__
+# if defined __AVX__ || defined SSE2AVX
# define __floor(d) \
({ double __res; \
asm ("vroundsd $1, %1, %0, %0" : "=x" (__res) : "xm" ((double) (d))); \
@@ -152,7 +156,7 @@
# endif
# endif
# ifndef __floorf
-# ifdef __AVX__
+# if defined __AVX__ || defined SSE2AVX
# define __floorf(d) \
({ float __res; \
asm ("vroundss $1, %1, %0, %0" : "=x" (__res) : "xm" ((float) (d))); \
@@ -169,121 +173,56 @@
/* Specialized variants of the <fenv.h> interfaces which only handle
either the FPU or the SSE unit. */
-#undef libc_fegetround
-#define libc_fegetround() \
- ({ \
- unsigned int mxcsr; \
- asm volatile ("stmxcsr %0" : "=m" (*&mxcsr)); \
- (mxcsr & 0x6000) >> 3; \
- })
-#undef libc_fegetroundf
-#define libc_fegetroundf() libc_fegetround ()
-// #define libc_fegetroundl() fegetround ()
-
-#undef libc_fesetround
-#define libc_fesetround(r) \
- do { \
- unsigned int mxcsr; \
- asm ("stmxcsr %0" : "=m" (*&mxcsr)); \
- mxcsr = (mxcsr & ~0x6000) | ((r) << 3); \
- asm volatile ("ldmxcsr %0" : : "m" (*&mxcsr)); \
- } while (0)
-#undef libc_fesetroundf
-#define libc_fesetroundf(r) libc_fesetround (r)
-// #define libc_fesetroundl(r) (void) fesetround (r)
-
#undef libc_feholdexcept
-#ifdef __AVX__
-# define libc_feholdexcept(e) \
- do { \
- unsigned int mxcsr; \
- asm ("vstmxcsr %0" : "=m" (*&mxcsr)); \
- (e)->__mxcsr = mxcsr; \
- mxcsr = (mxcsr | 0x1f80) & ~0x3f; \
- asm volatile ("vldmxcsr %0" : : "m" (*&mxcsr)); \
- } while (0)
-#else
-# define libc_feholdexcept(e) \
+#define libc_feholdexcept(e) \
do { \
unsigned int mxcsr; \
- asm ("stmxcsr %0" : "=m" (*&mxcsr)); \
+ asm (STMXCSR " %0" : "=m" (*&mxcsr)); \
(e)->__mxcsr = mxcsr; \
mxcsr = (mxcsr | 0x1f80) & ~0x3f; \
- asm volatile ("ldmxcsr %0" : : "m" (*&mxcsr)); \
+ asm volatile (LDMXCSR " %0" : : "m" (*&mxcsr)); \
} while (0)
-#endif
#undef libc_feholdexceptf
#define libc_feholdexceptf(e) libc_feholdexcept (e)
// #define libc_feholdexceptl(e) (void) feholdexcept (e)
#undef libc_feholdexcept_setround
-#ifdef __AVX__
-# define libc_feholdexcept_setround(e, r) \
+#define libc_feholdexcept_setround(e, r) \
do { \
unsigned int mxcsr; \
- asm ("vstmxcsr %0" : "=m" (*&mxcsr)); \
+ asm (STMXCSR " %0" : "=m" (*&mxcsr)); \
(e)->__mxcsr = mxcsr; \
mxcsr = ((mxcsr | 0x1f80) & ~0x603f) | ((r) << 3); \
- asm volatile ("vldmxcsr %0" : : "m" (*&mxcsr)); \
+ asm volatile (LDMXCSR " %0" : : "m" (*&mxcsr)); \
} while (0)
-#else
-# define libc_feholdexcept_setround(e, r) \
- do { \
- unsigned int mxcsr; \
- asm ("stmxcsr %0" : "=m" (*&mxcsr)); \
- (e)->__mxcsr = mxcsr; \
- mxcsr = ((mxcsr | 0x1f80) & ~0x603f) | ((r) << 3); \
- asm volatile ("ldmxcsr %0" : : "m" (*&mxcsr)); \
- } while (0)
-#endif
#undef libc_feholdexcept_setroundf
#define libc_feholdexcept_setroundf(e, r) libc_feholdexcept_setround (e, r)
// #define libc_feholdexcept_setroundl(e, r) ...
#undef libc_fetestexcept
-#ifdef __AVX__
-# define libc_fetestexcept(e) \
- ({ unsigned int mxcsr; asm volatile ("vstmxcsr %0" : "=m" (*&mxcsr)); \
+#define libc_fetestexcept(e) \
+ ({ unsigned int mxcsr; \
+ asm volatile (STMXCSR " %0" : "=m" (*&mxcsr)); \
mxcsr & (e) & FE_ALL_EXCEPT; })
-#else
-# define libc_fetestexcept(e) \
- ({ unsigned int mxcsr; asm volatile ("stmxcsr %0" : "=m" (*&mxcsr)); \
- mxcsr & (e) & FE_ALL_EXCEPT; })
-#endif
#undef libc_fetestexceptf
#define libc_fetestexceptf(e) libc_fetestexcept (e)
// #define libc_fetestexceptl(e) fetestexcept (e)
#undef libc_fesetenv
-#ifdef __AVX__
-# define libc_fesetenv(e) \
- asm volatile ("vldmxcsr %0" : : "m" ((e)->__mxcsr))
-#else
-# define libc_fesetenv(e) \
- asm volatile ("ldmxcsr %0" : : "m" ((e)->__mxcsr))
-#endif
+#define libc_fesetenv(e) \
+ asm volatile (LDMXCSR " %0" : : "m" ((e)->__mxcsr))
#undef libc_fesetenvf
#define libc_fesetenvf(e) libc_fesetenv (e)
// #define libc_fesetenvl(e) (void) fesetenv (e)
#undef libc_feupdateenv
-#ifdef __AVX__
-# define libc_feupdateenv(e) \
+#define libc_feupdateenv(e) \
do { \
unsigned int mxcsr; \
- asm volatile ("vstmxcsr %0" : "=m" (*&mxcsr)); \
- asm volatile ("vldmxcsr %0" : : "m" ((e)->__mxcsr)); \
+ asm volatile (STMXCSR " %0" : "=m" (*&mxcsr)); \
+ asm volatile (LDMXCSR " %0" : : "m" ((e)->__mxcsr)); \
__feraiseexcept (mxcsr & FE_ALL_EXCEPT); \
} while (0)
-#else
-# define libc_feupdateenv(e) \
- do { \
- unsigned int mxcsr; \
- asm volatile ("stmxcsr %0" : "=m" (*&mxcsr)); \
- asm volatile ("ldmxcsr %0" : : "m" ((e)->__mxcsr)); \
- __feraiseexcept (mxcsr & FE_ALL_EXCEPT); \
- } while (0)
-#endif
#undef libc_feupdateenvf
#define libc_feupdateenvf(e) libc_feupdateenv (e)
// #define libc_feupdateenvl(e) (void) feupdateenv (e)
diff --git a/libc/sysdeps/x86_64/fpu/multiarch/Makefile b/libc/sysdeps/x86_64/fpu/multiarch/Makefile
index be689036d..2a38ffc76 100644
--- a/libc/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/libc/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -34,21 +34,21 @@ CFLAGS-s_sin-fma4.c = -mfma4
CFLAGS-s_tan-fma4.c = -mfma4
endif
-ifeq ($(config-cflags-avx),yes)
+ifeq ($(config-cflags-sse2avx),yes)
libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
e_atan2-avx s_sin-avx s_tan-avx \
mplog-avx mpa-avx slowexp-avx \
mpexp-avx
-CFLAGS-e_atan2-avx.c = -mavx
-CFLAGS-e_exp-avx.c = -mavx
-CFLAGS-e_log-avx.c = -mavx
-CFLAGS-mpa-avx.c = -mavx
-CFLAGS-mpexp-avx.c = -mavx
-CFLAGS-mplog-avx.c = -mavx
-CFLAGS-s_atan-avx.c = -mavx
-CFLAGS-s_sin-avx.c = -mavx
-CFLAGS-slowexp-avx.c = -mavx
-CFLAGS-s_tan-avx.c = -mavx
+CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-mpa-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-mpexp-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-mplog-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-slowexp-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
endif
endif
diff --git a/libc/sysdeps/x86_64/fpu/multiarch/e_log.c b/libc/sysdeps/x86_64/fpu/multiarch/e_log.c
index 3b468d0f4..05f36680b 100644
--- a/libc/sysdeps/x86_64/fpu/multiarch/e_log.c
+++ b/libc/sysdeps/x86_64/fpu/multiarch/e_log.c
@@ -14,8 +14,7 @@ extern double __ieee754_log_fma4 (double);
libm_ifunc (__ieee754_log,
HAS_FMA4 ? __ieee754_log_fma4
- : (HAS_AVX ? __ieee754_log_avx
- : __ieee754_log_sse2));
+ : (HAS_AVX ? __ieee754_log_avx : __ieee754_log_sse2));
strong_alias (__ieee754_log, __log_finite)
# define __ieee754_log __ieee754_log_sse2
diff --git a/libc/sysdeps/x86_64/fpu/multiarch/s_atan.c b/libc/sysdeps/x86_64/fpu/multiarch/s_atan.c
index 3160201c1..ae16d7c9b 100644
--- a/libc/sysdeps/x86_64/fpu/multiarch/s_atan.c
+++ b/libc/sysdeps/x86_64/fpu/multiarch/s_atan.c
@@ -12,7 +12,8 @@ extern double __atan_fma4 (double);
# define __atan_fma4 ((void *) 0)
# endif
-libm_ifunc (atan, HAS_FMA4 ? __atan_fma4 : HAS_AVX ? __atan_avx : __atan_sse2);
+libm_ifunc (atan, (HAS_FMA4 ? __atan_fma4 :
+ HAS_AVX ? __atan_avx : __atan_sse2));
# define atan __atan_sse2
#endif
diff --git a/libc/sysdeps/x86_64/fpu/multiarch/s_sin.c b/libc/sysdeps/x86_64/fpu/multiarch/s_sin.c
index 1ba9dbc50..a0c2521c9 100644
--- a/libc/sysdeps/x86_64/fpu/multiarch/s_sin.c
+++ b/libc/sysdeps/x86_64/fpu/multiarch/s_sin.c
@@ -17,10 +17,12 @@ extern double __sin_fma4 (double);
# define __sin_fma4 ((void *) 0)
# endif
-libm_ifunc (__cos, HAS_FMA4 ? __cos_fma4 : HAS_AVX ? __cos_avx : __cos_sse2);
+libm_ifunc (__cos, (HAS_FMA4 ? __cos_fma4 :
+ HAS_AVX ? __cos_avx : __cos_sse2));
weak_alias (__cos, cos)
-libm_ifunc (__sin, HAS_FMA4 ? __sin_fma4 : HAS_AVX ? __sin_avx : __sin_sse2);
+libm_ifunc (__sin, (HAS_FMA4 ? __sin_fma4 :
+ HAS_AVX ? __sin_avx : __sin_sse2));
weak_alias (__sin, sin)
# define __cos __cos_sse2
diff --git a/libc/sysdeps/x86_64/fpu/multiarch/s_tan.c b/libc/sysdeps/x86_64/fpu/multiarch/s_tan.c
index 8f6601e17..904308fad 100644
--- a/libc/sysdeps/x86_64/fpu/multiarch/s_tan.c
+++ b/libc/sysdeps/x86_64/fpu/multiarch/s_tan.c
@@ -12,7 +12,8 @@ extern double __tan_fma4 (double);
# define __tan_fma4 ((void *) 0)
# endif
-libm_ifunc (tan, HAS_FMA4 ? __tan_fma4 : HAS_AVX ? __tan_avx : __tan_sse2);
+libm_ifunc (tan, (HAS_FMA4 ? __tan_fma4 :
+ HAS_AVX ? __tan_avx : __tan_sse2));
# define tan __tan_sse2
#endif
diff --git a/libc/sysdeps/x86_64/fpu/s_copysign.S b/libc/sysdeps/x86_64/fpu/s_copysign.S
index 66c36c88e..9cbb6cb99 100644
--- a/libc/sysdeps/x86_64/fpu/s_copysign.S
+++ b/libc/sysdeps/x86_64/fpu/s_copysign.S
@@ -1,5 +1,5 @@
/* copy sign, double version.
- Copyright (C) 2002, 2006, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2002.
@@ -20,11 +20,7 @@
#include <machine/asm.h>
-#ifdef __ELF__
.section .rodata.cst16,"aM",@progbits,16
-#else
- .text
-#endif
.align ALIGNARG(4)
ASM_TYPE_DIRECTIVE(signmask,@object)
diff --git a/libc/sysdeps/x86_64/fpu/s_copysignf.S b/libc/sysdeps/x86_64/fpu/s_copysignf.S
index 0fbe1d4c9..b4778146e 100644
--- a/libc/sysdeps/x86_64/fpu/s_copysignf.S
+++ b/libc/sysdeps/x86_64/fpu/s_copysignf.S
@@ -1,5 +1,5 @@
/* copy sign, double version.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2002.
@@ -20,11 +20,7 @@
#include <machine/asm.h>
-#ifdef __ELF__
.section .rodata
-#else
- .text
-#endif
.align ALIGNARG(4)
ASM_TYPE_DIRECTIVE(mask,@object)
diff --git a/libc/sysdeps/x86_64/fpu/s_expm1l.S b/libc/sysdeps/x86_64/fpu/s_expm1l.S
index c0b93e94a..9be1c6904 100644
--- a/libc/sysdeps/x86_64/fpu/s_expm1l.S
+++ b/libc/sysdeps/x86_64/fpu/s_expm1l.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of exp(x)-1.
- Copyright (C) 1996,1997,2001,2002,2008,2009 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,2001,2002,2008,2009,2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
Based on code by John C. Bowman <bowman@ipp-garching.mpg.de>.
@@ -24,11 +24,8 @@
#include <machine/asm.h>
-#ifdef __ELF__
.section .rodata
-#else
- .text
-#endif
+
.align ALIGNARG(4)
ASM_TYPE_DIRECTIVE(minus1,@object)
minus1: .double -1.0
diff --git a/libc/sysdeps/x86_64/fpu/s_log1pl.S b/libc/sysdeps/x86_64/fpu/s_log1pl.S
index ac2bd22a4..b4dbcdfa1 100644
--- a/libc/sysdeps/x86_64/fpu/s_log1pl.S
+++ b/libc/sysdeps/x86_64/fpu/s_log1pl.S
@@ -10,11 +10,8 @@
RCSID("$NetBSD: s_log1p.S,v 1.7 1995/05/09 00:10:58 jtc Exp $")
-#ifdef __ELF__
.section .rodata
-#else
- .text
-#endif
+
.align ALIGNARG(4)
/* The fyl2xp1 can only be used for values in
-1 + sqrt(2) / 2 <= x <= 1 - sqrt(2) / 2