diff options
author | Andreas Schwab <schwab@redhat.com> | 2009-12-14 16:38:19 +0100 |
---|---|---|
committer | Andreas Schwab <schwab@redhat.com> | 2009-12-14 16:38:19 +0100 |
commit | 57596e7a129337d40dc4c966aa65009b7339f3cc (patch) | |
tree | 5922f5630b0bca97035c598775d4c9ee8ce4c2a6 /sysdeps | |
parent | 72500358549b4df4cd239e081733a643fb3b3d03 (diff) | |
parent | 2510d01ddba195f8cfaa3c2349f75e0612719d82 (diff) |
Merge remote branch 'origin/master' into fedora/master
Diffstat (limited to 'sysdeps')
31 files changed, 181 insertions, 119 deletions
diff --git a/sysdeps/i386/i686/multiarch/strcspn.S b/sysdeps/i386/i686/multiarch/strcspn.S index 73e7eb45a8..b2310e4a8b 100644 --- a/sysdeps/i386/i686/multiarch/strcspn.S +++ b/sysdeps/i386/i686/multiarch/strcspn.S @@ -23,7 +23,7 @@ #ifdef HAVE_SSE4_SUPPORT #include <sysdep.h> -#include <ifunc-defines.h> +#include <init-arch.h> #ifdef USE_AS_STRPBRK #define STRCSPN_SSE42 __strpbrk_sse42 @@ -64,7 +64,7 @@ ENTRY(STRCSPN) jne 1f call __init_cpu_features 1: leal STRCSPN_IA32@GOTOFF(%ebx), %eax - testl $(1<<20), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET+__cpu_features@GOTOFF(%ebx) + testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) jz 2f leal STRCSPN_SSE42@GOTOFF(%ebx), %eax 2: popl %ebx @@ -80,7 +80,7 @@ ENTRY(STRCSPN) jne 1f call __init_cpu_features 1: leal STRCSPN_IA32, %eax - testl $(1<<20), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET+__cpu_features + testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features jz 2f leal STRCSPN_SSE42, %eax 2: ret diff --git a/sysdeps/i386/i686/multiarch/strlen.S b/sysdeps/i386/i686/multiarch/strlen.S index 0c1e8646ff..9786add745 100644 --- a/sysdeps/i386/i686/multiarch/strlen.S +++ b/sysdeps/i386/i686/multiarch/strlen.S @@ -19,7 +19,7 @@ 02111-1307 USA. */ #include <sysdep.h> -#include <ifunc-defines.h> +#include <init-arch.h> /* Define multiple versions only for the definition in libc and for the DSO. In static binaries, we need strlen before the initialization @@ -46,7 +46,7 @@ ENTRY(strlen) jne 1f call __init_cpu_features 1: leal __strlen_ia32@GOTOFF(%ebx), %eax - testl $(1<<26), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_EDX_OFFSET+__cpu_features@GOTOFF(%ebx) + testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) jz 2f leal __strlen_sse2@GOTOFF(%ebx), %eax 2: popl %ebx diff --git a/sysdeps/i386/i686/multiarch/strspn.S b/sysdeps/i386/i686/multiarch/strspn.S index f306d2d1fb..7fe6f97f41 100644 --- a/sysdeps/i386/i686/multiarch/strspn.S +++ b/sysdeps/i386/i686/multiarch/strspn.S @@ -23,7 +23,7 @@ #ifdef HAVE_SSE4_SUPPORT #include <sysdep.h> -#include <ifunc-defines.h> +#include <init-arch.h> /* Define multiple versions only for the definition in libc. */ #ifndef NOT_IN_libc @@ -49,7 +49,7 @@ ENTRY(strspn) jne 1f call __init_cpu_features 1: leal __strspn_ia32@GOTOFF(%ebx), %eax - testl $(1<<20), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET+__cpu_features@GOTOFF(%ebx) + testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) jz 2f leal __strspn_sse42@GOTOFF(%ebx), %eax 2: popl %ebx @@ -65,7 +65,7 @@ ENTRY(strspn) jne 1f call __init_cpu_features 1: leal __strspn_ia32, %eax - testl $(1<<20), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET+__cpu_features + testl $index_SSE2, CPUID_OFFSET+index_SSE4_2+__cpu_features jz 2f leal __strspn_sse42, %eax 2: ret diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index a788d18fee..62c38f69be 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -719,13 +719,8 @@ gaih_inet (const char *name, const struct gaih_service *service, if (status != NSS_STATUS_TRYAGAIN || rc != ERANGE || herrno != NETDB_INTERNAL) { - if (herrno == NETDB_INTERNAL) - { - __set_h_errno (herrno); - _res.options = old_res_options; - return -EAI_SYSTEM; - } - if (herrno == TRY_AGAIN) + if (status == NSS_STATUS_TRYAGAIN + && herrno == TRY_AGAIN) no_data = EAI_AGAIN; else no_data = herrno == NO_DATA; diff --git a/sysdeps/s390/s390-32/dl-trampoline.S b/sysdeps/s390/s390-32/dl-trampoline.S index fbbbc189db..cedef46382 100644 --- a/sysdeps/s390/s390-32/dl-trampoline.S +++ b/sysdeps/s390/s390-32/dl-trampoline.S @@ -45,6 +45,7 @@ _dl_runtime_resolve: stm %r2,%r5,32(%r15) # save registers st %r14,8(%r15) + cfi_offset (r14, -88) lr %r0,%r15 # create stack frame ahi %r15,-96 cfi_adjust_cfa_offset (96) @@ -76,6 +77,11 @@ _dl_runtime_profile: st %r6,8(%r15) st %r12,12(%r15) st %r14,16(%r15) + cfi_offset (r6, -64) + cfi_offset (f0, -40) + cfi_offset (f2, -32) + cfi_offset (r12, -84) + cfi_offset (r14, -80) lr %r12,%r15 # create stack frame cfi_def_cfa_register (12) ahi %r15,-96 diff --git a/sysdeps/s390/s390-32/s390-mcount.S b/sysdeps/s390/s390-32/s390-mcount.S index 6d11f9bbdb..aae433bbc5 100644 --- a/sysdeps/s390/s390-32/s390-mcount.S +++ b/sysdeps/s390/s390-32/s390-mcount.S @@ -50,11 +50,15 @@ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(_mcount) ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(_mcount), @function) + cfi_startproc .align ALIGNARG(4) C_LABEL(_mcount) /* Save the caller-clobbered registers. */ ahi %r15,-128 + cfi_adjust_cfa_offset (128) stm %r14,%r5,96(%r15) + cfi_offset (r14, 0) + cfi_offset (r15, 4) l %r2,132(%r15) # callers address = first parameter la %r2,0(%r2) # clear bit 0 la %r3,0(%r14) # callees address = second parameter @@ -77,7 +81,9 @@ C_LABEL(_mcount) */ lm %r14,%r5,96(%r15) ahi %r15,128 + cfi_adjust_cfa_offset (-128) br %r14 + cfi_endproc ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(_mcount)) #undef mcount diff --git a/sysdeps/s390/s390-64/dl-trampoline.S b/sysdeps/s390/s390-64/dl-trampoline.S index 72043c9779..b49c68108d 100644 --- a/sysdeps/s390/s390-64/dl-trampoline.S +++ b/sysdeps/s390/s390-64/dl-trampoline.S @@ -42,6 +42,7 @@ _dl_runtime_resolve: stmg 2,5,64(15) # save registers stg 14,96(15) + cfi_offset (r14, -64) lgr 0,15 # create stack frame aghi 15,-160 cfi_adjust_cfa_offset (160) @@ -72,6 +73,13 @@ _dl_runtime_profile: stg %r6,16(%r15) stg %r12,24(%r15) stg %r14,32(%r15) + cfi_offset (r6, -96) + cfi_offset (f0, -56) + cfi_offset (f2, -48) + cfi_offset (f4, -40) + cfi_offset (f6, -32) + cfi_offset (r12, -136) + cfi_offset (r14, -128) lgr %r12,%r15 # create stack frame cfi_def_cfa_register (12) aghi %r15,-160 diff --git a/sysdeps/s390/s390-64/s390x-mcount.S b/sysdeps/s390/s390-64/s390x-mcount.S index 78b55218a9..e866c3f5a9 100644 --- a/sysdeps/s390/s390-64/s390x-mcount.S +++ b/sysdeps/s390/s390-64/s390x-mcount.S @@ -46,11 +46,15 @@ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(_mcount) ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(_mcount), @function) + cfi_startproc .align ALIGNARG(4) C_LABEL(_mcount) /* Save the caller-clobbered registers. */ aghi %r15,-224 + cfi_adjust_cfa_offset (224) stmg %r14,%r5,160(%r15) + cfi_offset (r14, 0) + cfi_offset (r15, 8) lg %r2,232(%r15) # callers address = first parameter la %r2,0(%r2) # clear bit 0 la %r3,0(%r14) # callees address = second parameter @@ -65,7 +69,9 @@ C_LABEL(_mcount) return value. */ lmg %r14,%r5,160(%r15) aghi %r15,224 + cfi_adjust_cfa_offset (-224) br %r14 + cfi_endproc ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(_mcount)) #undef mcount diff --git a/sysdeps/sh/elf/initfini.c b/sysdeps/sh/elf/initfini.c index 6c8ed85292..2ae328caa2 100644 --- a/sysdeps/sh/elf/initfini.c +++ b/sysdeps/sh/elf/initfini.c @@ -1,5 +1,5 @@ /* Special .init and .fini section support for SH. - Copyright (C) 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 2000, 2002, 2009 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 @@ -47,52 +47,48 @@ __asm__ ("\ \n\ #include \"defs.h\"\n\ -#define SHARED\n\ \n\ /*@HEADER_ENDS*/\n\ \n\ /*@TESTS_BEGIN*/\n\ -\n\ + .align 5\n\ /*@TESTS_END*/\n\ \n\ /*@_init_PROLOG_BEGINS*/\n\ - .section .init\n\ + .section .init,\"ax\",@progbits\n\ .align 5\n\ .global _init\n\ - .type _init,@function\n\ + .type _init, @function\n\ _init:\n\ mov.l r12,@-r15\n\ + mova .L12,r0\n\ + mov.l .L12,r12\n\ mov.l r14,@-r15\n\ - sts.l pr,@-r15\n\ -#ifdef SHARED\n\ - mova .L22,r0\n\ - mov.l .L22,r12\n\ add r0,r12\n\ - mova .L23,r0\n\ - mov.l .L23,r1\n\ - add r0,r1\n\ -#else\n\ - mov.l .L23,r1\n\ -#endif\n\ - jsr @r1\n\ - mov r15,r14\n\ + mov.l .L13,r0\n\ + sts.l pr,@-r15\n\ + mov.l @(r0,r12),r1\n\ + tst r1,r1\n\ + bt/s .L8\n\ + mov r15,r14\n\ + mov.l .L14,r1\n\ + bsrf r1\n\ +.LPCS0:\n\ + nop\n\ +.L8:\n\ bra 1f\n\ - nop\n\ + nop\n\ .align 2\n\ -#ifdef SHARED\n\ -.L22:\n\ +.L12:\n\ .long _GLOBAL_OFFSET_TABLE_\n\ -.L23:\n\ - .long __gmon_start__@PLT\n\ -#else\n\ -.L23:\n\ - .long __gmon_start__\n\ -#endif\n\ +.L13:\n\ + .long __gmon_start__@GOT\n\ +.L14:\n\ + .long __gmon_start__@PLT-(.LPCS0+2-(.))\n\ 1:\n\ ALIGN\n\ END_INIT\n\ \n\ - \n\ /*@_init_PROLOG_ENDS*/\n\ \n\ /*@_init_EPILOG_BEGINS*/\n\ @@ -100,60 +96,58 @@ _init:\n\ mov r14,r15\n\ lds.l @r15+,pr\n\ mov.l @r15+,r14\n\ - rts \n\ mov.l @r15+,r12\n\ - END_INIT\n\ - .section .text\n\ - .align 5\n\ - .weak __gmon_start__\n\ - .type __gmon_start__,@function\n\ -__gmon_start__:\n\ - mov.l r14,@-r15\n\ - mov r15,r14\n\ - mov r14,r15\n\ rts \n\ - mov.l @r15+,r14\n\ - \n\ + nop\n\ + END_INIT\n\ +\n\ /*@_init_EPILOG_ENDS*/\n\ \n\ /*@_fini_PROLOG_BEGINS*/\n\ - .section .fini\n\ + .section .fini,\"ax\",@progbits\n\ .align 5\n\ .global _fini\n\ - .type _fini,@function\n\ + .type _fini, @function\n\ _fini:\n\ mov.l r12,@-r15\n\ + mova .L19,r0\n\ mov.l r14,@-r15\n\ sts.l pr,@-r15\n\ -#ifdef SHARED\n\ - mova .L27,r0\n\ - mov.l .L27,r12\n\ - add r0,r12\n\ -#endif\n\ + mov.l .L19,r12\n\ mov r15,r14\n\ + add r0,r12\n\ + bra 0f\n\ + nop\n\ + .align 2\n\ +.L19:\n\ + .long _GLOBAL_OFFSET_TABLE_\n\ +0:\n\ ALIGN\n\ END_FINI\n\ -#ifdef SHARED\n\ +\n\ +/*@_fini_PROLOG_ENDS*/\n\ + mov.l .L20,r1\n\ + bsrf r1\n\ +.LPCS1:\n\ + nop\n\ bra 1f\n\ - nop\n\ - .align 2\n\ -.L27:\n\ - .long _GLOBAL_OFFSET_TABLE_\n\ -#endif\n\ + nop\n\ + .align 2\n\ +.L20:\n\ + .long i_am_not_a_leaf@PLT-(.LPCS1+2-(.))\n\ 1:\n\ -/*@_fini_PROLOG_ENDS*/\n\ -\n\ /*@_fini_EPILOG_BEGINS*/\n\ .section .fini\n\ mov r14,r15\n\ lds.l @r15+,pr\n\ mov.l @r15+,r14\n\ - rts \n\ mov.l @r15+,r12\n\ -\n\ + rts \n\ + nop\n\ END_FINI\n\ - \n\ +\n\ /*@_fini_EPILOG_ENDS*/\n\ \n\ -/*@TRAILER_BEGINS*/\ +/*@TRAILER_BEGINS*/\n\ + .weak __gmon_start__\n\ "); diff --git a/sysdeps/sh/sh4/fpu/fpu_control.h b/sysdeps/sh/sh4/fpu/fpu_control.h index 43eb9e5492..d1be46d12f 100644 --- a/sysdeps/sh/sh4/fpu/fpu_control.h +++ b/sysdeps/sh/sh4/fpu/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word definitions. SH version. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2009 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 @@ -45,6 +45,8 @@ typedef unsigned int fpu_control_t; #define _FPU_GETCW(cw) __asm__ ("sts fpscr,%0" : "=r" (cw)) #if defined __GNUC__ +/* GCC provides this function. */ +extern void __set_fpscr (unsigned long); #define _FPU_SETCW(cw) __set_fpscr ((cw)) #else #define _FPU_SETCW(cw) __asm__ ("lds %0,fpscr" : : "r" (cw)) diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions index 50c70513ff..f09ef6d983 100644 --- a/sysdeps/unix/sysv/linux/Versions +++ b/sysdeps/unix/sysv/linux/Versions @@ -146,6 +146,8 @@ libc { _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; ntp_gettimex; + + recvmmsg; } GLIBC_PRIVATE { # functions used in other libraries diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h index 18269a99b9..8ba9eed6f0 100644 --- a/sysdeps/unix/sysv/linux/bits/sched.h +++ b/sysdeps/unix/sysv/linux/bits/sched.h @@ -27,11 +27,14 @@ /* Scheduling algorithms. */ -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 +#define SCHED_OTHER 0 +#define SCHED_FIFO 1 +#define SCHED_RR 2 #ifdef __USE_GNU -# define SCHED_BATCH 3 +# define SCHED_BATCH 3 +# define SCHED_IDLE 5 + +# define SCHED_RESET_ON_FORK 0x40000000 #endif #ifdef __USE_MISC diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h index f23b338a35..aa78087a72 100644 --- a/sysdeps/unix/sysv/linux/bits/socket.h +++ b/sysdeps/unix/sysv/linux/bits/socket.h @@ -234,8 +234,8 @@ enum #define MSG_MORE MSG_MORE MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file - descriptor received through - SCM_RIGHTS. */ + descriptor received through + SCM_RIGHTS. */ #define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC }; @@ -259,6 +259,15 @@ struct msghdr int msg_flags; /* Flags on received message. */ }; +#ifdef __USE_GNU +/* For `recvmmsg'. */ +struct mmsghdr + { + struct msghdr msg_hdr; /* Actual message header. */ + unsigned int msg_len; /* Number of received bytes for the entry. */ + }; +#endif + /* Structure used for storage of ancillary data object information. */ struct cmsghdr { @@ -403,4 +412,18 @@ struct linger int l_linger; /* Time to linger. */ }; + +__BEGIN_DECLS + +/* Receive a message as described by MESSAGE from socket FD. + Returns the number of bytes read or -1 for errors. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags, + __const struct timespec *__tmo); + +__END_DECLS + #endif /* bits/socket.h */ diff --git a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h index f57a461b67..8eaf7c368b 100644 --- a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h @@ -29,7 +29,7 @@ /* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ + located on a few file systems. */ #define O_ACCMODE 0003 #define O_RDONLY 00 #define O_WRONLY 01 @@ -41,7 +41,7 @@ #define O_APPEND 02000 #define O_NONBLOCK 04000 #define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 +#define O_SYNC 04010000 #define O_FSYNC O_SYNC #define O_ASYNC 020000 @@ -57,7 +57,7 @@ We define the symbols here but let them do the same as O_SYNC since this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_DSYNC 010000 /* Synchronize data. */ # define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif diff --git a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h index a98ca3a208..c65a11e1ca 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h @@ -28,7 +28,7 @@ #endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ + located on a few file systems. */ #define O_ACCMODE 0003 #define O_RDONLY 00 #define O_WRONLY 01 @@ -40,7 +40,7 @@ #define O_APPEND 02000 #define O_NONBLOCK 04000 #define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 +#define O_SYNC 04010000 #define O_FSYNC O_SYNC #define O_ASYNC 020000 @@ -61,7 +61,7 @@ We define the symbols here but let them do the same as O_SYNC since this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_DSYNC 010000 /* Synchronize data. */ # define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h index 010483a945..40fe1e50d7 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h @@ -29,7 +29,7 @@ /* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ + located on a few file systems. */ #define O_ACCMODE 0003 #define O_RDONLY 00 #define O_WRONLY 01 @@ -41,7 +41,7 @@ #define O_APPEND 02000 #define O_NONBLOCK 04000 #define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 +#define O_SYNC 04010000 #define O_FSYNC O_SYNC #define O_ASYNC 020000 @@ -61,7 +61,7 @@ We define the symbols here but let them do the same as O_SYNC since this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_DSYNC 010000 /* Synchronize data. */ # define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif diff --git a/sysdeps/unix/sysv/linux/ptsname.c b/sysdeps/unix/sysv/linux/ptsname.c index 129d09085e..1f1c64bc8c 100644 --- a/sysdeps/unix/sysv/linux/ptsname.c +++ b/sysdeps/unix/sysv/linux/ptsname.c @@ -128,7 +128,7 @@ __ptsname_internal (int fd, char *buf, size_t buflen, struct stat64 *stp) } ptyno = minor (stp->st_rdev); -#if __LINUX_KERNEL_VERSION >= 131443 +#if __LINUX_KERNEL_VERSION < 131443 /* This is for the old BSD pseudo terminals. As of Linux 2.1.115 these are no longer supported. */ if (major (stp->st_rdev) == 4) diff --git a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h index 8815eca868..c9e6a4504b 100644 --- a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h @@ -29,7 +29,7 @@ /* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ + located on a few file systems. */ #define O_ACCMODE 0003 #define O_RDONLY 00 #define O_WRONLY 01 @@ -41,7 +41,7 @@ #define O_APPEND 02000 #define O_NONBLOCK 04000 #define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 +#define O_SYNC 04010000 #define O_FSYNC O_SYNC #define O_ASYNC 020000 @@ -66,7 +66,7 @@ We define the symbols here but let them do the same as O_SYNC since this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_DSYNC 010000 /* Synchronize data. */ # define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif diff --git a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h index f57a461b67..8eaf7c368b 100644 --- a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h @@ -29,7 +29,7 @@ /* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ + located on a few file systems. */ #define O_ACCMODE 0003 #define O_RDONLY 00 #define O_WRONLY 01 @@ -41,7 +41,7 @@ #define O_APPEND 02000 #define O_NONBLOCK 04000 #define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 +#define O_SYNC 04010000 #define O_FSYNC O_SYNC #define O_ASYNC 020000 @@ -57,7 +57,7 @@ We define the symbols here but let them do the same as O_SYNC since this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_DSYNC 010000 /* Synchronize data. */ # define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h index 08c5c999fb..03c5ba59bd 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h @@ -29,7 +29,7 @@ #endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ + located on a few file systems. */ #define O_RDONLY 0x0000 #define O_WRONLY 0x0001 #define O_RDWR 0x0002 @@ -39,7 +39,7 @@ #define O_CREAT 0x0200 /* not fcntl */ #define O_TRUNC 0x0400 /* not fcntl */ #define O_EXCL 0x0800 /* not fcntl */ -#define O_SYNC 0x2000 +#define O_SYNC 0x802000 #define O_NONBLOCK 0x4000 #define O_NDELAY (0x0004 | O_NONBLOCK) #define O_NOCTTY 0x8000 /* not fcntl */ @@ -64,7 +64,7 @@ operations. We define the symbols here but let them do the same as O_SYNC since this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_DSYNC 0x2000 /* Synchronize data. */ # define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index a87906a4e3..a1a449eb4b 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -53,6 +53,7 @@ prctl EXTRA prctl i:iiiii __prctl prctl putpmsg - putpmsg i:ippii putpmsg query_module EXTRA query_module i:sipip query_module quotactl EXTRA quotactl i:isip quotactl +recvmmsg EXTRA recvmmsg Ci:ipiip recvmmsg remap_file_pages - remap_file_pages i:piiii __remap_file_pages remap_file_pages sched_getp - sched_getparam i:ip __sched_getparam sched_getparam sched_gets - sched_getscheduler i:i __sched_getscheduler sched_getscheduler diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h index f5dfd8b0b9..43835081c0 100644 --- a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h @@ -29,7 +29,7 @@ /* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ + located on a few file systems. */ #define O_ACCMODE 0003 #define O_RDONLY 00 #define O_WRONLY 01 @@ -41,7 +41,7 @@ #define O_APPEND 02000 #define O_NONBLOCK 04000 #define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 +#define O_SYNC 04010000 #define O_FSYNC O_SYNC #define O_ASYNC 020000 @@ -57,7 +57,7 @@ We define the symbols here but let them do the same as O_SYNC since this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_DSYNC 010000 /* Synchronize data. */ # define O_RSYNC O_SYNC /* Synchronize read operations. */ #endif diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h index 9b12831a6e..0f8f77a8a1 100644 --- a/sysdeps/x86_64/multiarch/init-arch.h +++ b/sysdeps/x86_64/multiarch/init-arch.h @@ -16,6 +16,20 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef __ASSEMBLER__ + +#include <ifunc-defines.h> + +#define bit_SSE2 (1 << 26) +#define bit_SSSE3 (1 << 9) +#define bit_SSE4_2 (1 << 20) + +#define index_SSE2 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_EDX_OFFSET +#define index_SSSE3 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET +#define index_SSE4_2 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET + +#else /* __ASSEMBLER__ */ + #include <sys/param.h> enum @@ -71,3 +85,5 @@ extern const struct cpu_features *__get_cpu_features (void) #define HAS_POPCOUNT HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 23) #define HAS_SSE4_2 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 20) #define HAS_FMA HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 12) + +#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/x86_64/multiarch/rawmemchr.S b/sysdeps/x86_64/multiarch/rawmemchr.S index 08fd8769fc..2a8a6909ef 100644 --- a/sysdeps/x86_64/multiarch/rawmemchr.S +++ b/sysdeps/x86_64/multiarch/rawmemchr.S @@ -18,7 +18,7 @@ 02111-1307 USA. */ #include <sysdep.h> -#include <ifunc-defines.h> +#include <init-arch.h> /* Define multiple versions only for the definition in lib. */ @@ -30,7 +30,7 @@ ENTRY(rawmemchr) jne 1f call __init_cpu_features 1: leaq __rawmemchr_sse2(%rip), %rax - testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip) + testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip) jz 2f leaq __rawmemchr_sse42(%rip), %rax 2: ret diff --git a/sysdeps/x86_64/multiarch/strchr.S b/sysdeps/x86_64/multiarch/strchr.S index b35566d1a5..27eead9852 100644 --- a/sysdeps/x86_64/multiarch/strchr.S +++ b/sysdeps/x86_64/multiarch/strchr.S @@ -18,7 +18,7 @@ 02111-1307 USA. */ #include <sysdep.h> -#include <ifunc-defines.h> +#include <init-arch.h> /* Define multiple versions only for the definition in libc. */ @@ -30,7 +30,7 @@ ENTRY(strchr) jne 1f call __init_cpu_features 1: leaq __strchr_sse2(%rip), %rax - testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip) + testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip) jz 2f leaq __strchr_sse42(%rip), %rax 2: ret diff --git a/sysdeps/x86_64/multiarch/strcmp.S b/sysdeps/x86_64/multiarch/strcmp.S index 05adf1e2e6..1d939195aa 100644 --- a/sysdeps/x86_64/multiarch/strcmp.S +++ b/sysdeps/x86_64/multiarch/strcmp.S @@ -19,7 +19,7 @@ 02111-1307 USA. */ #include <sysdep.h> -#include <ifunc-defines.h> +#include <init-arch.h> #ifdef USE_AS_STRNCMP /* Since the counter, %r11, is unsigned, we branch to strcmp_exitz @@ -64,10 +64,10 @@ ENTRY(STRCMP) call __init_cpu_features 1: leaq STRCMP_SSE42(%rip), %rax - testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip) + testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip) jnz 2f leaq STRCMP_SSSE3(%rip), %rax - testl $(1<<9), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip) + testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip) jnz 2f leaq STRCMP_SSE2(%rip), %rax 2: ret diff --git a/sysdeps/x86_64/multiarch/strcpy.S b/sysdeps/x86_64/multiarch/strcpy.S index 7e400a9140..02fa8d0710 100644 --- a/sysdeps/x86_64/multiarch/strcpy.S +++ b/sysdeps/x86_64/multiarch/strcpy.S @@ -19,7 +19,7 @@ 02111-1307 USA. */ #include <sysdep.h> -#include <ifunc-defines.h> +#include <init-arch.h> #if !defined (USE_AS_STPCPY) && !defined (USE_AS_STRNCPY) # ifndef STRCPY @@ -63,7 +63,7 @@ ENTRY(STRCPY) jne 1f call __init_cpu_features 1: leaq STRCPY_SSE2(%rip), %rax - testl $(1<<9), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip) + testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip) jz 2f leaq STRCPY_SSSE3(%rip), %rax 2: ret diff --git a/sysdeps/x86_64/multiarch/strcspn.S b/sysdeps/x86_64/multiarch/strcspn.S index cc75ab70e6..f00d52c2c0 100644 --- a/sysdeps/x86_64/multiarch/strcspn.S +++ b/sysdeps/x86_64/multiarch/strcspn.S @@ -23,7 +23,7 @@ #ifdef HAVE_SSE4_SUPPORT #include <sysdep.h> -#include <ifunc-defines.h> +#include <init-arch.h> #ifdef USE_AS_STRPBRK #define STRCSPN_SSE42 __strpbrk_sse42 @@ -49,7 +49,7 @@ ENTRY(STRCSPN) jne 1f call __init_cpu_features 1: leaq STRCSPN_SSE2(%rip), %rax - testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip) + testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip) jz 2f leaq STRCSPN_SSE42(%rip), %rax 2: ret diff --git a/sysdeps/x86_64/multiarch/strlen.S b/sysdeps/x86_64/multiarch/strlen.S index 4342c6cdab..509f9c9605 100644 --- a/sysdeps/x86_64/multiarch/strlen.S +++ b/sysdeps/x86_64/multiarch/strlen.S @@ -19,7 +19,7 @@ 02111-1307 USA. */ #include <sysdep.h> -#include <ifunc-defines.h> +#include <init-arch.h> /* Define multiple versions only for the definition in libc and for @@ -33,7 +33,7 @@ ENTRY(strlen) jne 1f call __init_cpu_features 1: leaq __strlen_sse2(%rip), %rax - testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip) + testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip) jz 2f leaq __strlen_sse42(%rip), %rax 2: ret diff --git a/sysdeps/x86_64/multiarch/strrchr.S b/sysdeps/x86_64/multiarch/strrchr.S index f6665f34b7..0d17fdb585 100644 --- a/sysdeps/x86_64/multiarch/strrchr.S +++ b/sysdeps/x86_64/multiarch/strrchr.S @@ -18,7 +18,7 @@ 02111-1307 USA. */ #include <sysdep.h> -#include <ifunc-defines.h> +#include <init-arch.h> /* Define multiple versions only for the definition in libc and for @@ -32,7 +32,7 @@ ENTRY(strrchr) jne 1f call __init_cpu_features 1: leaq __strrchr_sse2(%rip), %rax - testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip) + testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip) jz 2f leaq __strrchr_sse42(%rip), %rax 2: ret diff --git a/sysdeps/x86_64/multiarch/strspn.S b/sysdeps/x86_64/multiarch/strspn.S index 4183a2cf60..1c5662692b 100644 --- a/sysdeps/x86_64/multiarch/strspn.S +++ b/sysdeps/x86_64/multiarch/strspn.S @@ -23,7 +23,7 @@ #ifdef HAVE_SSE4_SUPPORT #include <sysdep.h> -#include <ifunc-defines.h> +#include <init-arch.h> /* Define multiple versions only for the definition in libc. */ #ifndef NOT_IN_libc @@ -34,7 +34,7 @@ ENTRY(strspn) jne 1f call __init_cpu_features 1: leaq __strspn_sse2(%rip), %rax - testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip) + testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip) jz 2f leaq __strspn_sse42(%rip), %rax 2: ret |