From ce28a8ab09cdd49890261d37b5b9280131d18014 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 2 Feb 2007 09:48:26 +0000 Subject: Updated to fedora-glibc-20070202T0923 --- sysdeps/i386/bits/byteswap.h | 6 ++++-- sysdeps/i386/dl-trampoline.S | 18 +++++++++--------- sysdeps/ieee754/ldbl-128ibm/s_ceill.c | 7 +------ sysdeps/ieee754/ldbl-128ibm/s_copysignl.c | 15 ++++++++------- sysdeps/ieee754/ldbl-128ibm/s_fabsl.c | 4 ++-- sysdeps/ieee754/ldbl-128ibm/s_floorl.c | 8 +------- sysdeps/ieee754/ldbl-128ibm/s_roundl.c | 7 +------ sysdeps/ieee754/ldbl-128ibm/s_truncl.c | 7 +------ sysdeps/unix/sysv/linux/getdents.c | 5 ++--- sysdeps/unix/sysv/linux/i386/sysdep.h | 18 +++++++++++++----- sysdeps/unix/sysv/linux/sys/personality.h | 11 +++++++---- sysdeps/unix/sysv/linux/x86_64/sysdep.h | 31 ++++++++++++++++++++++--------- sysdeps/x86_64/bits/byteswap.h | 6 ++++-- 13 files changed, 75 insertions(+), 68 deletions(-) (limited to 'sysdeps') diff --git a/sysdeps/i386/bits/byteswap.h b/sysdeps/i386/bits/byteswap.h index bed27559c5..3baad85e8a 100644 --- a/sysdeps/i386/bits/byteswap.h +++ b/sysdeps/i386/bits/byteswap.h @@ -1,5 +1,6 @@ /* Macros to swap the order of bytes in integer values. - Copyright (C) 1997,1998,2000,2002,2003,2006 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007 + 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 @@ -66,7 +67,8 @@ __bswap_16 (unsigned short int __bsx) `bswap' opcode. On i386 we have to use three instructions. */ # if !defined __i486__ && !defined __pentium__ && !defined __pentiumpro__ \ && !defined __pentium4__ && !defined __k8__ && !defined __athlon__ \ - && !defined __k6__ + && !defined __k6__ && !defined __nocona__ && !defined __core2__ \ + && !defined __geode__ # define __bswap_32(x) \ (__extension__ \ ({ register unsigned int __v, __x = (x); \ diff --git a/sysdeps/i386/dl-trampoline.S b/sysdeps/i386/dl-trampoline.S index fd87eb711d..f991797ee9 100644 --- a/sysdeps/i386/dl-trampoline.S +++ b/sysdeps/i386/dl-trampoline.S @@ -1,5 +1,5 @@ /* PLT trampolines. i386 version. - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2007 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 @@ -101,29 +101,29 @@ _dl_runtime_profile: */ cfi_adjust_cfa_offset (12) 1: movl %ebx, (%esp) - cfi_rel_offset (3, 0) + cfi_rel_offset (ebx, 0) movl %edx, %ebx # This is the frame buffer size pushl %edi cfi_adjust_cfa_offset (4) - cfi_rel_offset (7, 0) + cfi_rel_offset (edi, 0) pushl %esi cfi_adjust_cfa_offset (4) - cfi_rel_offset (6, 0) + cfi_rel_offset (esi, 0) leal 44(%esp), %esi movl %ebx, %ecx movl %esp, %edi subl %ebx, %edi andl $0xfffffff0, %edi # Align stack movl %esp, %ebx - cfi_def_cfa_register (3) + cfi_def_cfa_register (ebx) movl %edi, %esp shrl $2, %ecx rep movsl movl (%edi), %esi - cfi_restore (6) + cfi_restore (esi) movl 4(%edi), %edi - cfi_restore (7) + cfi_restore (edi) /* %ebx+40 return address %ebx+36 PLT1 @@ -144,9 +144,9 @@ _dl_runtime_profile: movl 20(%ebx), %eax call *(%ebx) movl %ebx, %esp - cfi_def_cfa_register (4) + cfi_def_cfa_register (esp) movl 8(%esp), %ebx - cfi_restore (3) + cfi_restore (ebx) /* +40 return address +36 PLT1 diff --git a/sysdeps/ieee754/ldbl-128ibm/s_ceill.c b/sysdeps/ieee754/ldbl-128ibm/s_ceill.c index 035e4f52ce..6252e9140b 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_ceill.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_ceill.c @@ -1,6 +1,6 @@ /* Ceil (round to +inf) long double floating-point values. IBM extended format long double version. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 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 @@ -19,7 +19,6 @@ 02111-1307 USA. */ #include -#include #include #include #include @@ -44,11 +43,9 @@ __ceill (x) __builtin_inf ()), 1)) { double orig_xh; - int save_round = fegetround (); /* Long double arithmetic, including the canonicalisation below, only works in round-to-nearest mode. */ - fesetround (FE_TONEAREST); /* Convert the high double to integer. */ orig_xh = xh; @@ -81,8 +78,6 @@ __ceill (x) /* Ensure we return -0 rather than +0 when appropriate. */ if (orig_xh < 0.0) xh = -__builtin_fabs (xh); - - fesetround (save_round); } return ldbl_pack (xh, xl); diff --git a/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c b/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c index 7e7b44168d..1a198c16e8 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c @@ -25,6 +25,7 @@ static char rcsid[] = "$NetBSD: $"; #include "math.h" #include "math_private.h" +#include #ifdef __STDC__ long double __copysignl(long double x, long double y) @@ -33,13 +34,13 @@ static char rcsid[] = "$NetBSD: $"; long double x,y; #endif { - if (y < 0.0) - { - if (x >= 0.0) - x = -x; - } - else if (x < 0.0) + if (signbit (x) != signbit (y)) x = -x; return x; } -weak_alias (__copysignl, copysignl) + +#ifdef IS_IN_libm +long_double_symbol (libm, __copysignl, copysignl); +#else +long_double_symbol (libc, __copysignl, copysignl); +#endif diff --git a/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c b/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c index 62663125ee..89eb205101 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c @@ -37,7 +37,7 @@ static char rcsid[] = "$NetBSD: $"; GET_LDOUBLE_WORDS64(hx,lx,x); lx = lx ^ ( hx & 0x8000000000000000LL ); hx = hx & 0x7fffffffffffffffLL; - SET_LDOUBLE_WORDS64(hx,lx,x); - return x; + SET_LDOUBLE_WORDS64(x,hx,lx); + return x; } long_double_symbol (libm, __fabsl, fabsl); diff --git a/sysdeps/ieee754/ldbl-128ibm/s_floorl.c b/sysdeps/ieee754/ldbl-128ibm/s_floorl.c index 4c4ae9b035..eff7572405 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_floorl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_floorl.c @@ -1,6 +1,6 @@ /* Round to int long double floating-point values. IBM extended format long double version. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 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 @@ -19,7 +19,6 @@ 02111-1307 USA. */ #include -#include #include #include #include @@ -43,11 +42,8 @@ __floorl (x) && __builtin_isless (__builtin_fabs (xh), __builtin_inf ()), 1)) { - int save_round = fegetround (); - /* Long double arithmetic, including the canonicalisation below, only works in round-to-nearest mode. */ - fesetround (FE_TONEAREST); /* Convert the high double to integer. */ hi = ldbl_nearbyint (xh); @@ -75,8 +71,6 @@ __floorl (x) xh = hi; xl = lo; ldbl_canonicalize (&xh, &xl); - - fesetround (save_round); } return ldbl_pack (xh, xl); diff --git a/sysdeps/ieee754/ldbl-128ibm/s_roundl.c b/sysdeps/ieee754/ldbl-128ibm/s_roundl.c index 0880e6ee22..d633bfa4c8 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_roundl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_roundl.c @@ -1,6 +1,6 @@ /* Round to int long double floating-point values. IBM extended format long double version. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 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 @@ -22,7 +22,6 @@ when it's coded in C. */ #include -#include #include #include #include @@ -47,11 +46,9 @@ __roundl (x) __builtin_inf ()), 1)) { double orig_xh; - int save_round = fegetround (); /* Long double arithmetic, including the canonicalisation below, only works in round-to-nearest mode. */ - fesetround (FE_TONEAREST); /* Convert the high double to integer. */ orig_xh = xh; @@ -88,8 +85,6 @@ __roundl (x) xh = hi; xl = lo; ldbl_canonicalize (&xh, &xl); - - fesetround (save_round); } return ldbl_pack (xh, xl); diff --git a/sysdeps/ieee754/ldbl-128ibm/s_truncl.c b/sysdeps/ieee754/ldbl-128ibm/s_truncl.c index d7bc47ee0d..ceace0d43e 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_truncl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_truncl.c @@ -1,6 +1,6 @@ /* Truncate (toward zero) long double floating-point values. IBM extended format long double version. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 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 @@ -22,7 +22,6 @@ when it's coded in C. */ #include -#include #include #include #include @@ -47,11 +46,9 @@ __truncl (x) __builtin_inf ()), 1)) { double orig_xh; - int save_round = fegetround (); /* Long double arithmetic, including the canonicalisation below, only works in round-to-nearest mode. */ - fesetround (FE_TONEAREST); /* Convert the high double to integer. */ orig_xh = xh; @@ -92,8 +89,6 @@ __truncl (x) /* Ensure we return -0 rather than +0 when appropriate. */ if (orig_xh < 0.0) xh = -__builtin_fabs (xh); - - fesetround (save_round); } return ldbl_pack (xh, xl); diff --git a/sysdeps/unix/sysv/linux/getdents.c b/sysdeps/unix/sysv/linux/getdents.c index 836cbf3922..b33d1789ad 100644 --- a/sysdeps/unix/sysv/linux/getdents.c +++ b/sysdeps/unix/sysv/linux/getdents.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1993, 1995-2003, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995-2003, 2004, 2006, 2007 + 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 @@ -50,8 +51,6 @@ extern int __have_no_getdents64 attribute_hidden; # define __have_no_getdents64 0 #endif -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) - /* For Linux we need a special version of this file since the definition of `struct dirent' is not the same for the kernel and the libc. There is one additional field which might be introduced diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 5286676fc1..89d5b12043 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,1993,1995-2000,2002-2005,2006 +/* Copyright (C) 1992,1993,1995-2000,2002-2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. @@ -566,15 +566,23 @@ asm (".L__X'%ebx = 1\n\t" is too complicated here since we have no PC-relative addressing mode. */ #else # ifdef __ASSEMBLER__ -# define PTR_MANGLE(reg) xorl %gs:POINTER_GUARD, reg -# define PTR_DEMANGLE(reg) PTR_MANGLE (reg) +# define PTR_MANGLE(reg) xorl %gs:POINTER_GUARD, reg; \ + roll $9, reg +# define PTR_DEMANGLE(reg) rorl $9, reg; \ + xorl %gs:POINTER_GUARD, reg # else -# define PTR_MANGLE(var) asm ("xorl %%gs:%c2, %0" \ +# define PTR_MANGLE(var) asm ("xorl %%gs:%c2, %0\n" \ + "roll $9, %0" \ + : "=r" (var) \ + : "0" (var), \ + "i" (offsetof (tcbhead_t, \ + pointer_guard))) +# define PTR_DEMANGLE(var) asm ("rorl $9, %0\n" \ + "xorl %%gs:%c2, %0" \ : "=r" (var) \ : "0" (var), \ "i" (offsetof (tcbhead_t, \ pointer_guard))) -# define PTR_DEMANGLE(var) PTR_MANGLE (var) # endif #endif diff --git a/sysdeps/unix/sysv/linux/sys/personality.h b/sysdeps/unix/sysv/linux/sys/personality.h index 5d14a9bc80..ff7c61aa52 100644 --- a/sysdeps/unix/sysv/linux/sys/personality.h +++ b/sysdeps/unix/sysv/linux/sys/personality.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2007 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 @@ -16,7 +16,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* Taken verbatim from Linux 2.4 (include/linux/personality.h). */ +/* Taken verbatim from Linux 2.6 (include/linux/personality.h). */ #ifndef _SYS_PERSONALITY_H #define _SYS_PERSONALITY_H 1 @@ -27,11 +27,13 @@ These occupy the top three bytes. */ enum { + ADDR_NO_RANDOMIZE = 0x0040000, MMAP_PAGE_ZERO = 0x0100000, ADDR_LIMIT_32BIT = 0x0800000, SHORT_INODE = 0x1000000, WHOLE_SECONDS = 0x2000000, STICKY_TIMEOUTS = 0x4000000, + ADDR_LIMIT_3GB = 0x8000000 }; /* Personality types. @@ -52,14 +54,15 @@ enum PER_SUNOS = 0x0006 | STICKY_TIMEOUTS, PER_XENIX = 0x0007 | STICKY_TIMEOUTS | SHORT_INODE, PER_LINUX32 = 0x0008, + PER_LINUX32_3GB = 0x0008 | ADDR_LIMIT_3GB, PER_IRIX32 = 0x0009 | STICKY_TIMEOUTS, /* IRIX5 32-bit */ PER_IRIXN32 = 0x000a | STICKY_TIMEOUTS, /* IRIX6 new 32-bit */ PER_IRIX64 = 0x000b | STICKY_TIMEOUTS, /* IRIX6 64-bit */ PER_RISCOS = 0x000c, PER_SOLARIS = 0x000d | STICKY_TIMEOUTS, PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, - PER_HPUX = 0x000f, - PER_OSF4 = 0x0010, + PER_OSF4 = 0x000f, + PER_HPUX = 0x0010, PER_MASK = 0x00ff, }; diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h index 5dfffca455..3a0a632aab 100644 --- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h +++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2001-2005, 2007 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 @@ -317,24 +317,37 @@ /* We cannot use the thread descriptor because in ld.so we use setjmp earlier than the descriptor is initialized. */ # ifdef __ASSEMBLER__ -# define PTR_MANGLE(reg) xorq __pointer_chk_guard_local(%rip), reg -# define PTR_DEMANGLE(reg) PTR_MANGLE (reg) +# define PTR_MANGLE(reg) xorq __pointer_chk_guard_local(%rip), reg; \ + rolq $17, reg +# define PTR_DEMANGLE(reg) rorq $17, reg; \ + xorq __pointer_chk_guard_local(%rip), reg # else -# define PTR_MANGLE(reg) asm ("xorq __pointer_chk_guard_local(%%rip), %0"\ +# define PTR_MANGLE(reg) asm ("xorq __pointer_chk_guard_local(%%rip), %0\n" \ + "rolq $17, %0" \ + : "=r" (reg) : "0" (reg)) +# define PTR_DEMANGLE(reg) asm ("rorq $17, %0\n" \ + "xorq __pointer_chk_guard_local(%%rip), %0" \ : "=r" (reg) : "0" (reg)) -# define PTR_DEMANGLE(reg) PTR_MANGLE (reg) # endif #else # ifdef __ASSEMBLER__ -# define PTR_MANGLE(reg) xorq %fs:POINTER_GUARD, reg -# define PTR_DEMANGLE(reg) PTR_MANGLE (reg) +# define PTR_MANGLE(reg) xorq %fs:POINTER_GUARD, reg; \ + rolq $17, reg +# define PTR_DEMANGLE(reg) rorq $17, reg; \ + xorq %fs:POINTER_GUARD, reg # else -# define PTR_MANGLE(var) asm ("xorq %%fs:%c2, %0" \ +# define PTR_MANGLE(var) asm ("xorq %%fs:%c2, %0\n" \ + "rolq $17, %0" \ + : "=r" (var) \ + : "0" (var), \ + "i" (offsetof (tcbhead_t, \ + pointer_guard))) +# define PTR_DEMANGLE(var) asm ("rorq $17, %0\n" \ + "xorq %%fs:%c2, %0" \ : "=r" (var) \ : "0" (var), \ "i" (offsetof (tcbhead_t, \ pointer_guard))) -# define PTR_DEMANGLE(var) PTR_MANGLE (var) # endif #endif diff --git a/sysdeps/x86_64/bits/byteswap.h b/sysdeps/x86_64/bits/byteswap.h index e1c861c75f..7514a9f4db 100644 --- a/sysdeps/x86_64/bits/byteswap.h +++ b/sysdeps/x86_64/bits/byteswap.h @@ -1,5 +1,6 @@ /* Macros to swap the order of bytes in integer values. - Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007 + 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 @@ -59,7 +60,8 @@ # if __WORDSIZE == 64 || (defined __i486__ || defined __pentium__ \ || defined __pentiumpro__ || defined __pentium4__ \ || defined __k8__ || defined __athlon__ \ - || defined __k6__) + || defined __k6__ || defined __nocona__ \ + || defined __core2__ || defined __geode__) /* To swap the bytes in a word the i486 processors and up provide the `bswap' opcode. On i386 we have to use three instructions. */ # define __bswap_32(x) \ -- cgit v1.2.3