summaryrefslogtreecommitdiff
path: root/libc/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps')
-rw-r--r--libc/sysdeps/ieee754/dbl-64/s_fma.c4
-rw-r--r--libc/sysdeps/ieee754/dbl-64/s_fmaf.c4
-rw-r--r--libc/sysdeps/ieee754/dbl-64/wordsize-64/e_fmod.c4
-rw-r--r--libc/sysdeps/ieee754/ldbl-128/s_fmal.c5
-rw-r--r--libc/sysdeps/ieee754/ldbl-96/s_fmal.c5
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/Makefile1
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile3
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/Makefile2
-rw-r--r--libc/sysdeps/unix/sysv/linux/s390/s390-32/Makefile3
-rw-r--r--libc/sysdeps/unix/sysv/linux/s390/s390-64/Makefile3
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile3
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile3
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/Makefile4
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/bits/wchar.h (renamed from libc/sysdeps/unix/sysv/linux/i386/bits/wchar.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/sys/elf.h (renamed from libc/sysdeps/unix/sysv/linux/i386/sys/elf.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/sys/vm86.h (renamed from libc/sysdeps/unix/sysv/linux/i386/sys/vm86.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86_64/Makefile1
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h4
18 files changed, 39 insertions, 10 deletions
diff --git a/libc/sysdeps/ieee754/dbl-64/s_fma.c b/libc/sysdeps/ieee754/dbl-64/s_fma.c
index ab20a801a..ce3bd36fa 100644
--- a/libc/sysdeps/ieee754/dbl-64/s_fma.c
+++ b/libc/sysdeps/ieee754/dbl-64/s_fma.c
@@ -1,5 +1,5 @@
/* Compute x * y + z as ternary operation.
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2010.
@@ -158,6 +158,8 @@ __fma (double x, double y, double z)
if ((u.ieee.mantissa1 & 1) == 0)
u.ieee.mantissa1 |= libc_fetestexcept (FE_INEXACT) != 0;
v.d = a1 + u.d;
+ /* Ensure the addition is not scheduled after fetestexcept call. */
+ math_force_eval (v.d);
}
/* Reset rounding mode and test for inexact simultaneously. */
diff --git a/libc/sysdeps/ieee754/dbl-64/s_fmaf.c b/libc/sysdeps/ieee754/dbl-64/s_fmaf.c
index 7a939aaed..e7a0650f0 100644
--- a/libc/sysdeps/ieee754/dbl-64/s_fmaf.c
+++ b/libc/sysdeps/ieee754/dbl-64/s_fmaf.c
@@ -1,5 +1,5 @@
/* Compute x * y + z as ternary operation.
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2010.
@@ -40,6 +40,8 @@ __fmaf (float x, float y, float z)
/* Perform addition with round to odd. */
u.d = temp + (double) z;
+ /* Ensure the addition is not scheduled after fetestexcept call. */
+ math_force_eval (u.d);
/* Reset rounding mode and test for inexact simultaneously. */
int j = libc_feupdateenv_test (&env, FE_INEXACT) != 0;
diff --git a/libc/sysdeps/ieee754/dbl-64/wordsize-64/e_fmod.c b/libc/sysdeps/ieee754/dbl-64/wordsize-64/e_fmod.c
index 6d2540447..a630d10fe 100644
--- a/libc/sysdeps/ieee754/dbl-64/wordsize-64/e_fmod.c
+++ b/libc/sysdeps/ieee754/dbl-64/wordsize-64/e_fmod.c
@@ -24,8 +24,8 @@ static const double one = 1.0, Zero[] = {0.0, -0.0,};
double
__ieee754_fmod (double x, double y)
{
- int32_t n,i,ix,iy;
- int64_t hx,hy,hz,sx;
+ int32_t n,ix,iy;
+ int64_t hx,hy,hz,sx,i;
EXTRACT_WORDS64(hx,x);
EXTRACT_WORDS64(hy,y);
diff --git a/libc/sysdeps/ieee754/ldbl-128/s_fmal.c b/libc/sysdeps/ieee754/ldbl-128/s_fmal.c
index 3b85b17fa..963bbd734 100644
--- a/libc/sysdeps/ieee754/ldbl-128/s_fmal.c
+++ b/libc/sysdeps/ieee754/ldbl-128/s_fmal.c
@@ -1,5 +1,5 @@
/* Compute x * y + z as ternary operation.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2010.
@@ -21,6 +21,7 @@
#include <math.h>
#include <fenv.h>
#include <ieee754.h>
+#include <math_private.h>
/* This implementation uses rounding to odd to avoid problems with
double rounding. See a paper by Boldo and Melquiond:
@@ -175,7 +176,7 @@ __fmal (long double x, long double y, long double z)
u.ieee.mantissa3 |= fetestexcept (FE_INEXACT) != 0;
v.d = a1 + u.d;
/* Ensure the addition is not scheduled after fetestexcept call. */
- asm volatile ("" : : "m" (v));
+ math_force_eval (v.d);
int j = fetestexcept (FE_INEXACT) != 0;
feupdateenv (&env);
/* Ensure the following computations are performed in default rounding
diff --git a/libc/sysdeps/ieee754/ldbl-96/s_fmal.c b/libc/sysdeps/ieee754/ldbl-96/s_fmal.c
index 76866fbfa..ca1e0905a 100644
--- a/libc/sysdeps/ieee754/ldbl-96/s_fmal.c
+++ b/libc/sysdeps/ieee754/ldbl-96/s_fmal.c
@@ -1,5 +1,5 @@
/* Compute x * y + z as ternary operation.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2010.
@@ -21,6 +21,7 @@
#include <math.h>
#include <fenv.h>
#include <ieee754.h>
+#include <math_private.h>
/* This implementation uses rounding to odd to avoid problems with
double rounding. See a paper by Boldo and Melquiond:
@@ -174,6 +175,8 @@ __fmal (long double x, long double y, long double z)
if ((u.ieee.mantissa1 & 1) == 0)
u.ieee.mantissa1 |= fetestexcept (FE_INEXACT) != 0;
v.d = a1 + u.d;
+ /* Ensure the addition is not scheduled after fetestexcept call. */
+ math_force_eval (v.d);
int j = fetestexcept (FE_INEXACT) != 0;
feupdateenv (&env);
/* Ensure the following computations are performed in default rounding
diff --git a/libc/sysdeps/unix/sysv/linux/i386/Makefile b/libc/sysdeps/unix/sysv/linux/i386/Makefile
index f4585d788..acc30219e 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/Makefile
+++ b/libc/sysdeps/unix/sysv/linux/i386/Makefile
@@ -3,7 +3,6 @@ default-abi := 32
ifeq ($(subdir),misc)
sysdep_routines += ioperm iopl vm86 call_pselect6 call_fallocate
-sysdep_headers += sys/elf.h sys/perm.h sys/reg.h sys/vm86.h sys/debugreg.h sys/io.h
endif
ifeq ($(subdir),elf)
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
index 966a7689e..84324aa7e 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
@@ -1,3 +1,6 @@
+# See Makeconfig regarding the use of default-abi.
+default-abi := 32
+
ifeq ($(subdir),resource)
sysdep_routines += oldgetrlimit64
endif
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/Makefile b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/Makefile
new file mode 100644
index 000000000..3ba3b1f6e
--- /dev/null
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/Makefile
@@ -0,0 +1,2 @@
+# See Makeconfig regarding the use of default-abi.
+default-abi := 64
diff --git a/libc/sysdeps/unix/sysv/linux/s390/s390-32/Makefile b/libc/sysdeps/unix/sysv/linux/s390/s390-32/Makefile
index a509c9312..3216804f7 100644
--- a/libc/sysdeps/unix/sysv/linux/s390/s390-32/Makefile
+++ b/libc/sysdeps/unix/sysv/linux/s390/s390-32/Makefile
@@ -1,3 +1,6 @@
+# See Makeconfig regarding the use of default-abi.
+default-abi := 32
+
ifeq ($(subdir),login)
sysdep_routines += utmp32 utmpx32
libutil-routines += login32
diff --git a/libc/sysdeps/unix/sysv/linux/s390/s390-64/Makefile b/libc/sysdeps/unix/sysv/linux/s390/s390-64/Makefile
index 283361b3f..1f6ad2106 100644
--- a/libc/sysdeps/unix/sysv/linux/s390/s390-64/Makefile
+++ b/libc/sysdeps/unix/sysv/linux/s390/s390-64/Makefile
@@ -1,3 +1,6 @@
+# See Makeconfig regarding the use of default-abi.
+default-abi := 64
+
ifeq ($(subdir),misc)
sysdep_headers += sys/elf.h
endif
diff --git a/libc/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile b/libc/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
index 8f7e76be2..21c7dc168 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
+++ b/libc/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
@@ -1,3 +1,6 @@
+# See Makeconfig regarding the use of default-abi.
+default-abi := 32
+
asm-CPPFLAGS = -D__ASSEMBLY__
ASFLAGS-.os += -fPIC
LD += -melf32_sparc
diff --git a/libc/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile b/libc/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
index df4533af6..3e29dd841 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
+++ b/libc/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
@@ -1,2 +1,5 @@
+# See Makeconfig regarding the use of default-abi.
+default-abi := 64
+
sysdep-CFLAGS += -fcall-used-g6
LD += -melf64_sparc
diff --git a/libc/sysdeps/unix/sysv/linux/x86/Makefile b/libc/sysdeps/unix/sysv/linux/x86/Makefile
index cf4a55cf0..6412a9ef3 100644
--- a/libc/sysdeps/unix/sysv/linux/x86/Makefile
+++ b/libc/sysdeps/unix/sysv/linux/x86/Makefile
@@ -12,3 +12,7 @@ abi-64-ld-soname := ld-linux-x86-64.so.2
abi-x32-options := -U__i386__ -D__x86_64__ -D__ILP32__ -U__LP64__
abi-x32-condition := defined __x86_64__ && defined __ILP32__
abi-x32-ld-soname := ld-linux-x32.so.2
+
+ifeq ($(subdir),misc)
+sysdep_headers += sys/elf.h sys/perm.h sys/reg.h sys/vm86.h sys/debugreg.h sys/io.h
+endif
diff --git a/libc/sysdeps/unix/sysv/linux/i386/bits/wchar.h b/libc/sysdeps/unix/sysv/linux/x86/bits/wchar.h
index ec0f34a47..ec0f34a47 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/bits/wchar.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/bits/wchar.h
diff --git a/libc/sysdeps/unix/sysv/linux/i386/sys/elf.h b/libc/sysdeps/unix/sysv/linux/x86/sys/elf.h
index 1f4524cba..1f4524cba 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/sys/elf.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/sys/elf.h
diff --git a/libc/sysdeps/unix/sysv/linux/i386/sys/vm86.h b/libc/sysdeps/unix/sysv/linux/x86/sys/vm86.h
index c41b55d7b..c41b55d7b 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/sys/vm86.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/sys/vm86.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/Makefile b/libc/sysdeps/unix/sysv/linux/x86_64/Makefile
index dd4ab59c5..d6a9d360d 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/Makefile
+++ b/libc/sysdeps/unix/sysv/linux/x86_64/Makefile
@@ -1,6 +1,5 @@
ifeq ($(subdir),misc)
sysdep_routines += ioperm iopl
-sysdep_headers += sys/perm.h sys/reg.h sys/debugreg.h sys/io.h
endif
ifeq ($(subdir),stdlib)
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h b/libc/sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h
index 84a901743..de10277e2 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h
+++ b/libc/sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h
@@ -54,7 +54,9 @@
#define DR_LEN_1 (0x0) /* Settings for data length to trap on */
#define DR_LEN_2 (0x4)
#define DR_LEN_4 (0xC)
-#define DR_LEN_8 (0x8)
+#ifdef __x86_64__
+# define DR_LEN_8 (0x8)
+#endif
/* The low byte to the control register determine which registers are
enabled. There are 4 fields of two bits. One bit is "local", meaning