From f8ea3acb623f42f696b69c6de7b37c1e7cca719c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 1 Jul 2004 17:50:47 +0000 Subject: Update. 2004-07-01 Martin Schwidefsky * sysdeps/s390/fpu/bits/mathinline.h [__LIBC_INTERNAL_MATH_INLINES] (__ieee754_sqrt): Define as __MATH_INLINE using sqdbr instruction. (__ieee754_sqrtf): Define as __MATH_INLINE using sqebr instruction. * sysdeps/s390/fpu/e_sqrt.c: New file. * sysdeps/s390/fpu/e_sqrtf.c: New file. * sysdeps/s390/Implies: New file. * sysdeps/s390/s390-32/Implies: Remove ieee754, move ieee754/dbl-64 and ieee754/flt-32 to s390/Implies. * sysdeps/s390/s390-64/Implies: Likewise. 2004-06-30 Jakub Jelinek * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Include tls.h. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/clone.S (thread_start): DO_CALL (exit, 1) instead of branching to _exit. * sysdeps/unix/sysv/linux/s390/s390-64/clone.S (thread_start): Likewise. * sysdeps/s390/fpu/bits/mathinline.h: New file. * include/glob.h (glob64): Add libc_hidden_proto. * sysdeps/generic/glob64.c (glob64): Add libc_hidden_def. * sysdeps/gnu/glob64.c (glob64): Likewise. * sysdeps/unix/sysv/linux/i386/glob64.c (glob64): Likewise. --- ChangeLog | 29 ++++++++++ iconv/Makefile | 2 +- include/glob.h | 1 + sysdeps/generic/glob64.c | 5 +- sysdeps/gnu/glob64.c | 1 + sysdeps/s390/Implies | 2 + sysdeps/s390/fpu/bits/mathinline.h | 77 +++++++++++++++++++++++++++ sysdeps/s390/fpu/e_sqrt.c | 29 ++++++++++ sysdeps/s390/fpu/e_sqrtf.c | 29 ++++++++++ sysdeps/s390/s390-32/Implies | 3 -- sysdeps/s390/s390-64/Implies | 3 -- sysdeps/unix/sysv/linux/i386/glob64.c | 1 + sysdeps/unix/sysv/linux/s390/s390-32/clone.S | 17 +----- sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S | 3 +- sysdeps/unix/sysv/linux/s390/s390-64/clone.S | 8 +-- sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S | 3 +- 16 files changed, 181 insertions(+), 32 deletions(-) create mode 100644 sysdeps/s390/Implies create mode 100644 sysdeps/s390/fpu/bits/mathinline.h create mode 100644 sysdeps/s390/fpu/e_sqrt.c create mode 100644 sysdeps/s390/fpu/e_sqrtf.c diff --git a/ChangeLog b/ChangeLog index 6663b7c..e0e5925 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,32 @@ +2004-07-01 Martin Schwidefsky + + * sysdeps/s390/fpu/bits/mathinline.h [__LIBC_INTERNAL_MATH_INLINES] + (__ieee754_sqrt): Define as __MATH_INLINE using sqdbr instruction. + (__ieee754_sqrtf): Define as __MATH_INLINE using sqebr instruction. + * sysdeps/s390/fpu/e_sqrt.c: New file. + * sysdeps/s390/fpu/e_sqrtf.c: New file. + * sysdeps/s390/Implies: New file. + * sysdeps/s390/s390-32/Implies: Remove ieee754, move + ieee754/dbl-64 and ieee754/flt-32 to s390/Implies. + * sysdeps/s390/s390-64/Implies: Likewise. + +2004-06-30 Jakub Jelinek + + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Include tls.h. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. + + * sysdeps/unix/sysv/linux/s390/s390-32/clone.S (thread_start): + DO_CALL (exit, 1) instead of branching to _exit. + * sysdeps/unix/sysv/linux/s390/s390-64/clone.S (thread_start): + Likewise. + + * sysdeps/s390/fpu/bits/mathinline.h: New file. + + * include/glob.h (glob64): Add libc_hidden_proto. + * sysdeps/generic/glob64.c (glob64): Add libc_hidden_def. + * sysdeps/gnu/glob64.c (glob64): Likewise. + * sysdeps/unix/sysv/linux/i386/glob64.c (glob64): Likewise. + 2004-06-11 Jakub Jelinek * sysdeps/i386/fpu/libm-test-ulps: Update for GCC 3.4. diff --git a/iconv/Makefile b/iconv/Makefile index c245ff7..fe0c453 100644 --- a/iconv/Makefile +++ b/iconv/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1997,1998,2000,2001,2002,2003 Free Software Foundation, Inc. +# Copyright (C) 1997,1998,2000-2003,2004 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 diff --git a/include/glob.h b/include/glob.h index d83cf5c..821568e 100644 --- a/include/glob.h +++ b/include/glob.h @@ -2,6 +2,7 @@ #include libc_hidden_proto (glob) +libc_hidden_proto (glob64) libc_hidden_proto (globfree) libc_hidden_proto (globfree64) diff --git a/sysdeps/generic/glob64.c b/sysdeps/generic/glob64.c index d78b513..2bfab74 100644 --- a/sysdeps/generic/glob64.c +++ b/sysdeps/generic/glob64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998,99,2002 Free Software Foundation, Inc. +/* Copyright (C) 1998,99,2002,2004 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 @@ -42,12 +42,13 @@ glob64 (const char *pattern, int flags, __set_errno (ENOSYS); return GLOB_NOSYS; } +libc_hidden_def (glob64) void globfree64 (glob64_t *pglob) { } -libc_hidden_def (globfree64); +libc_hidden_def (globfree64) stub_warning (glob64) #include diff --git a/sysdeps/gnu/glob64.c b/sysdeps/gnu/glob64.c index cb0161c..210c9c2 100644 --- a/sysdeps/gnu/glob64.c +++ b/sysdeps/gnu/glob64.c @@ -21,4 +21,5 @@ #include +libc_hidden_def (glob64) libc_hidden_def (globfree64) diff --git a/sysdeps/s390/Implies b/sysdeps/s390/Implies new file mode 100644 index 0000000..5b29b26 --- /dev/null +++ b/sysdeps/s390/Implies @@ -0,0 +1,2 @@ +ieee754/dbl-64 +ieee754/flt-32 diff --git a/sysdeps/s390/fpu/bits/mathinline.h b/sysdeps/s390/fpu/bits/mathinline.h new file mode 100644 index 0000000..d83d9ca --- /dev/null +++ b/sysdeps/s390/fpu/bits/mathinline.h @@ -0,0 +1,77 @@ +/* Inline math functions for s390. + Copyright (C) 2004 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 + 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. */ + +#ifndef _MATH_H +# error "Never use directly; include instead." +#endif + +#ifdef __cplusplus +# define __MATH_INLINE __inline +#else +# define __MATH_INLINE extern __inline +#endif + +#if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \ + && defined __OPTIMIZE__ + +#ifdef __USE_ISOC99 + +/* Test for negative number. Used in the signbit() macro. */ +__MATH_INLINE int __signbitf (float __x) __THROW +{ + __extension__ union { float __f; int __i; } __u = { __f: __x }; + return __u.__i < 0; +} + +__MATH_INLINE int __signbit (double __x) __THROW +{ + __extension__ union { double __d; long __i; } __u = { __d: __x }; + return __u.__i < 0; +} + +#endif /* C99 */ + +/* This code is used internally in the GNU libc. */ +#ifdef __LIBC_INTERNAL_MATH_INLINES + +#include +#include +#include + +__MATH_INLINE double +__ieee754_sqrt (double x) +{ + double res; + + asm ( "sqdbr %0,%1" : "=f" (res) : "f" (x) ); + return res; +} + +__MATH_INLINE float +__ieee754_sqrtf (float x) +{ + float res; + + asm ( "sqebr %0,%1" : "=f" (res) : "f" (x) ); + return res; +} + +#endif /* __LIBC_INTERNAL_MATH_INLINES */ + +#endif /* __NO_MATH_INLINES */ diff --git a/sysdeps/s390/fpu/e_sqrt.c b/sysdeps/s390/fpu/e_sqrt.c new file mode 100644 index 0000000..e4b183e --- /dev/null +++ b/sysdeps/s390/fpu/e_sqrt.c @@ -0,0 +1,29 @@ +/* Copyright (C) 2004 Free Software Foundation, Inc. + Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). + This file is part of the GNU C Library. + + 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 + +double +__ieee754_sqrt (double x) +{ + double res; + + asm ( "sqdbr %0,%1" : "=f" (res) : "f" (x) ); + return res; +} diff --git a/sysdeps/s390/fpu/e_sqrtf.c b/sysdeps/s390/fpu/e_sqrtf.c new file mode 100644 index 0000000..5b5e06e --- /dev/null +++ b/sysdeps/s390/fpu/e_sqrtf.c @@ -0,0 +1,29 @@ +/* Copyright (C) 2004 Free Software Foundation, Inc. + Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). + This file is part of the GNU C Library. + + 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 + +float +__ieee754_sqrtf (float x) +{ + float res; + + asm ( "sqebr %0,%1" : "=f" (res) : "f" (x) ); + return res; +} diff --git a/sysdeps/s390/s390-32/Implies b/sysdeps/s390/s390-32/Implies index 71bec4d..39a34c5 100644 --- a/sysdeps/s390/s390-32/Implies +++ b/sysdeps/s390/s390-32/Implies @@ -1,4 +1 @@ wordsize-32 -ieee754 -ieee754/dbl-64 -ieee754/flt-32 diff --git a/sysdeps/s390/s390-64/Implies b/sysdeps/s390/s390-64/Implies index b3f9202..a8cae95 100644 --- a/sysdeps/s390/s390-64/Implies +++ b/sysdeps/s390/s390-64/Implies @@ -1,4 +1 @@ wordsize-64 -ieee754 -ieee754/dbl-64 -ieee754/flt-32 diff --git a/sysdeps/unix/sysv/linux/i386/glob64.c b/sysdeps/unix/sysv/linux/i386/glob64.c index b83f82b..997355d 100644 --- a/sysdeps/unix/sysv/linux/i386/glob64.c +++ b/sysdeps/unix/sysv/linux/i386/glob64.c @@ -23,6 +23,7 @@ #include "shlib-compat.h" +libc_hidden_def (glob64) libc_hidden_def (globfree64) versioned_symbol (libc, __glob64, glob64, GLIBC_2_2); diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/clone.S b/sysdeps/unix/sysv/linux/s390/s390-32/clone.S index f01433f..442045b 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/clone.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). @@ -59,18 +59,5 @@ thread_start: ahi %r15,-96 /* make room on the stack for the save area */ xc 0(4,%r15),0(%r15) basr %r14,%r1 /* jump to fn */ -#ifdef PIC - basr %r12,0 -.L0: lr %r1,%r12 - al %r12,.L1-.L0(%r12) - al %r1,.L2-.L0(%r1) - br %r1 /* branch to _exit -> thread termination */ -.L1: .long _GLOBAL_OFFSET_TABLE_ - .L0 -.L2: .long _exit@PLT - .L0 -#else - basr %r1,0 -.L0: al %r1,.L1-.L0(0,%r1) - br %r1 /* branch to _exit -> thread termination */ -.L1: .long _exit - .L0 -#endif + DO_CALL (exit, 1) weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S index b1f1733..1aad4ab 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include /* The following code is only used in the shared library when we compile the reentrant version. Otherwise each system call defines diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/clone.S b/sysdeps/unix/sysv/linux/s390/s390-64/clone.S index f70bd15..724ca61 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/clone.S +++ b/sysdeps/unix/sysv/linux/s390/s390-64/clone.S @@ -1,5 +1,5 @@ /* Wrapper around clone system call. 64 bit S/390 version. - Copyright (C) 2001, 2003 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -60,9 +60,5 @@ thread_start: aghi %r15,-160 /* make room on the stack for the save area */ xc 0(8,%r15),0(%r15) basr %r14,%r1 /* jump to fn */ -#ifdef PIC - jg _exit@PLT /* branch to _exit -> thread termination */ -#else - jg _exit /* branch to _exit -> thread termination */ -#endif + DO_CALL (exit, 1) weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S index ce1f03e..4299257 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S +++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include /* The following code is only used in the shared library when we -- cgit v1.1