aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-06-16 08:03:44 +0000
committerUlrich Drepper <drepper@redhat.com>2003-06-16 08:03:44 +0000
commit301a6724af4f63ea696658ec7f4cded7b88f7a0e (patch)
tree58509e984c731ca93144134e091ddd7843993d63
parent4cfde89657ffccbfb2801986d767964da400c7ec (diff)
downloadglibc-301a6724af4f63ea696658ec7f4cded7b88f7a0e.zip
glibc-301a6724af4f63ea696658ec7f4cded7b88f7a0e.tar.gz
glibc-301a6724af4f63ea696658ec7f4cded7b88f7a0e.tar.bz2
Update.
* math/tgmath.h (__TGMATH_UNARY_IMAG_ONLY): Removed. 2003-06-15 Andreas Jaeger <aj@suse.de> * sysdeps/i386/fpu/feenablxcpt.c (feenableexcept): Correct setting of MXCSR. * sysdeps/i386/fpu/fedisblxcpt.c (fedisableexcept): Likewise. * sysdeps/i386/fpu/feholdexcpt.c (feholdexcept): Likewise. Reported by Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>. * math/tgmath.h (carg): Handle real arguments. (conj): Likewise. (cproj): Likewise. (cimag): Likewise. (creal): Likewise. * math/Makefile (CFLAGS-test-tgmath-ret.c): New. (tests): Add test-tgmath-ret. * math/test-tgmath-ret.c: New file. * math/tgmath.h (ilogb): Return always an int. 2003-06-16 Ulrich Drepper <drepper@redhat.com> computation so that prelinking works.
-rw-r--r--ChangeLog27
-rw-r--r--localedata/ChangeLog17
-rw-r--r--math/Makefile3
-rw-r--r--math/test-tgmath-ret.c85
-rw-r--r--math/tgmath.h25
-rw-r--r--nptl/ChangeLog7
-rw-r--r--sysdeps/i386/fpu/fedisblxcpt.c2
-rw-r--r--sysdeps/i386/fpu/feenablxcpt.c2
-rw-r--r--sysdeps/i386/fpu/feholdexcpt.c2
9 files changed, 146 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index d756124..17a3707 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,32 @@
2003-06-16 Ulrich Drepper <drepper@redhat.com>
+ * math/tgmath.h (__TGMATH_UNARY_IMAG_ONLY): Removed.
+
+2003-06-15 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/i386/fpu/feenablxcpt.c (feenableexcept): Correct setting
+ of MXCSR.
+ * sysdeps/i386/fpu/fedisblxcpt.c (fedisableexcept): Likewise.
+ * sysdeps/i386/fpu/feholdexcpt.c (feholdexcept): Likewise.
+ Reported by Arnaud Desitter
+ <arnaud.desitter@geography.oxford.ac.uk>.
+
+ * math/tgmath.h (carg): Handle real arguments.
+ (conj): Likewise.
+ (cproj): Likewise.
+ (cimag): Likewise.
+ (creal): Likewise.
+
+ * math/Makefile (CFLAGS-test-tgmath-ret.c): New.
+ (tests): Add test-tgmath-ret.
+ * math/test-tgmath-ret.c: New file.
+
+ * math/tgmath.h (ilogb): Return always an int.
+
+2003-06-16 Ulrich Drepper <drepper@redhat.com>
+
* elf/rtld.c (dl_main): Use l_map_start not l_addr in Phdr
- computation so that prelinking wroks.
+ computation so that prelinking works.
2003-06-15 Ulrich Drepper <drepper@redhat.com>
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index 767058e..944107c 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,3 +1,20 @@
+2003-06-16 Ulrich Drepper <drepper@redhat.com>
+
+ * locales/an_ES: New file. Contributed by Jordi Mallach Péez.
+
+2003-06-15 Petter Reinholdtsen <pere@hungry.com>
+
+ * tst-fmon.c (main): Remove unused variable 'monval'.
+
+ * tst-fmon.sh: Make sure all tests are executed before an error
+ code is reported to make.
+ * tst-numeric.sh: Likewise.
+
+2003-06-15 Petter Reinholdtsen <pere@hungry.com>
+
+ * locales/is_IS [LC_TIME]: Use lower case letters in month and
+ week day names. Patch from Bjarni Ingi Gislason.
+
2003-05-31 Petter Reinholdtsen <pere@hungry.com>
* locales/fi_FI: Add URL to a reference documenting Finish in
diff --git a/math/Makefile b/math/Makefile
index dc470d2..e34d41c 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -87,7 +87,7 @@ distribute += $(filter-out $(generated),$(long-m-yes:=.c) $(long-c-yes:=.c))
# Rules for the test suite.
tests = test-matherr test-fenv atest-exp atest-sincos atest-exp2 basic-test \
- test-misc test-fpucw tst-definitions test-tgmath
+ test-misc test-fpucw tst-definitions test-tgmath test-tgmath-ret
# We do the `long double' tests only if this data type is available and
# distinct from `double'.
test-longdouble-yes = test-ldouble test-ildoubl
@@ -126,6 +126,7 @@ CFLAGS-test-float.c = -fno-inline -ffloat-store
CFLAGS-test-double.c = -fno-inline -ffloat-store
CFLAGS-test-ldouble.c = -fno-inline -ffloat-store
CFLAGS-test-tgmath.c = -fno-builtin
+CFLAGS-test-tgmath-ret.c = -fno-builtin
CPPFLAGS-test-ifloat.c = -U__LIBC_INTERNAL_MATH_INLINES -D__FAST_MATH__ \
-DTEST_FAST_MATH
CPPFLAGS-test-idouble.c = -U__LIBC_INTERNAL_MATH_INLINES -D__FAST_MATH__ \
diff --git a/math/test-tgmath-ret.c b/math/test-tgmath-ret.c
new file mode 100644
index 0000000..8eef649
--- /dev/null
+++ b/math/test-tgmath-ret.c
@@ -0,0 +1,85 @@
+/* Test compilation of tgmath macros.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@suse.de>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <math.h>
+#include <complex.h>
+#include <tgmath.h>
+#include <stdio.h>
+
+static float fx;
+static double dx;
+static long double lx;
+static int errors = 0;
+
+static void
+our_error (const char *c)
+{
+ puts (c);
+ ++errors;
+}
+
+/* First function where the return type is constant. */
+
+#define CHECK_RET_CONST_TYPE(func, rettype, arg, name) \
+ if (sizeof (func (arg)) != sizeof (rettype)) \
+ our_error ("Return size of " #func " is wrong with " #name " argument");
+
+#define CHECK_RET_CONST_FLOAT(func, rettype) \
+ CHECK_RET_CONST_TYPE (func, rettype, fx, float)
+#define CHECK_RET_CONST_DOUBLE(func, rettype) \
+ CHECK_RET_CONST_TYPE (func, rettype, dx, double)
+#ifdef NO_LONG_DOUBLE
+# define CHECK_RET_CONST_LDOUBLE(func, rettype)
+#else
+# define CHECK_RET_CONST_LDOUBLE(func, rettype) \
+ CHECK_RET_CONST_TYPE (func, rettype, lx, long double)
+#endif
+
+#define CHECK_RET_CONST(func, rettype) \
+static void \
+check_return_ ##func (void) \
+{ \
+ CHECK_RET_CONST_FLOAT (func, rettype) \
+ CHECK_RET_CONST_DOUBLE (func, rettype) \
+ CHECK_RET_CONST_LDOUBLE (func, rettype) \
+}
+
+CHECK_RET_CONST(ilogb, int)
+CHECK_RET_CONST(lrint, long)
+CHECK_RET_CONST(lround, long)
+CHECK_RET_CONST(llrint, long long)
+CHECK_RET_CONST(llround, long long)
+
+static int
+do_test (void)
+{
+ check_return_ilogb ();
+ check_return_lrint ();
+ check_return_lround ();
+ check_return_llrint ();
+ check_return_llround ();
+
+ printf ("%Zd\n", sizeof(carg (lx)));
+
+ return errors != 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/math/tgmath.h b/math/tgmath.h
index 8b75cb5..168b262 100644
--- a/math/tgmath.h
+++ b/math/tgmath.h
@@ -177,19 +177,6 @@
/* XXX This definition has to be changed as soon as the compiler understands
the imaginary keyword. */
-# define __TGMATH_UNARY_IMAG_ONLY(Val, Fct) \
- (__extension__ ({ __tgmath_real_type (Val) __tgmres; \
- if (sizeof (Val) == sizeof (__complex__ double) \
- || __builtin_classify_type (__real__ (Val)) != 8) \
- __tgmres = Fct (Val); \
- else if (sizeof (Val) == sizeof (__complex__ float)) \
- __tgmres = Fct##f (Val); \
- else \
- __tgmres = __tgml(Fct) (Val); \
- __tgmres; }))
-
-/* XXX This definition has to be changed as soon as the compiler understands
- the imaginary keyword. */
# define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
(__extension__ ({ __tgmath_real_type ((Val1) + (Val2)) __tgmres; \
if ((sizeof (__real__ (Val1)) > sizeof (double) \
@@ -400,7 +387,7 @@
__TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, scalbln)
/* Return the binary exponent of X, which must be nonzero. */
-#define ilogb(Val) __TGMATH_UNARY_REAL_ONLY (Val, ilogb)
+#define ilogb(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, int, ilogb)
/* Return positive difference between X and Y. */
@@ -421,21 +408,21 @@
/* Absolute value, conjugates, and projection. */
/* Argument value of Z. */
-#define carg(Val) __TGMATH_UNARY_IMAG_ONLY (Val, carg)
+#define carg(Val) __TGMATH_UNARY_REAL_IMAG (Val, carg, carg)
/* Complex conjugate of Z. */
-#define conj(Val) __TGMATH_UNARY_IMAG_ONLY (Val, conj)
+#define conj(Val) __TGMATH_UNARY_REAL_IMAG (Val, conj, conj)
/* Projection of Z onto the Riemann sphere. */
-#define cproj(Val) __TGMATH_UNARY_IMAG_ONLY (Val, cproj)
+#define cproj(Val) __TGMATH_UNARY_REAL_IMAG (Val, cproj, cproj)
/* Decomposing complex values. */
/* Imaginary part of Z. */
-#define cimag(Val) __TGMATH_UNARY_IMAG_ONLY (Val, cimag)
+#define cimag(Val) __TGMATH_UNARY_REAL_IMAG (Val, cimag, cimag)
/* Real part of Z. */
-#define creal(Val) __TGMATH_UNARY_IMAG_ONLY (Val, creal)
+#define creal(Val) __TGMATH_UNARY_REAL_IMAG (Val, creal, creal)
#endif /* tgmath.h */
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 0b22326..66371c0 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,10 @@
+2003-06-16 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile: Add rules to build and run tst-cancel16 and
+ tst-cancelx16. Add missing CFLAGS definitions.
+ * tst-cancel16.c: New file.
+ * tst-cancelx16.c: New file.
+
2003-06-15 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/i386/dl-sysdep.h
diff --git a/sysdeps/i386/fpu/fedisblxcpt.c b/sysdeps/i386/fpu/fedisblxcpt.c
index 754d20d..6e337d3 100644
--- a/sysdeps/i386/fpu/fedisblxcpt.c
+++ b/sysdeps/i386/fpu/fedisblxcpt.c
@@ -46,7 +46,7 @@ fedisableexcept (int excepts)
/* Get the current control word. */
__asm__ ("stmxcsr %0" : "=m" (*&xnew_exc));
- xnew_exc |= excepts;
+ xnew_exc |= excepts << 7;
__asm__ ("ldmxcsr %0" : : "m" (*&xnew_exc));
}
diff --git a/sysdeps/i386/fpu/feenablxcpt.c b/sysdeps/i386/fpu/feenablxcpt.c
index 65a0a29..0f841ca 100644
--- a/sysdeps/i386/fpu/feenablxcpt.c
+++ b/sysdeps/i386/fpu/feenablxcpt.c
@@ -46,7 +46,7 @@ feenableexcept (int excepts)
/* Get the current control word. */
__asm__ ("ldmxcsr %0" : "=m" (*&xnew_exc));
- xnew_exc &= ~excepts;
+ xnew_exc &= ~(excepts << 7);
__asm__ ("stmxcsr %0" : : "m" (*&xnew_exc));
}
diff --git a/sysdeps/i386/fpu/feholdexcpt.c b/sysdeps/i386/fpu/feholdexcpt.c
index bdbf910..5d622ad 100644
--- a/sysdeps/i386/fpu/feholdexcpt.c
+++ b/sysdeps/i386/fpu/feholdexcpt.c
@@ -44,7 +44,7 @@ feholdexcept (fenv_t *envp)
__asm__ ("stmxcsr %0" : "=m" (*&xwork));
/* Set all exceptions to non-stop. */
- work |= 0x1f80;
+ xwork |= 0x1f80;
__asm__ ("ldmxcsr %0" : : "m" (*&xwork));
}