diff --git a/bindresvport.blacklist b/bindresvport.blacklist index ae64c70..8b285bd 100644 --- a/bindresvport.blacklist +++ b/bindresvport.blacklist @@ -4,8 +4,10 @@ # called by RPC services. This mostly solves the problem, that a # RPC service uses a well known port of another service. # +623 # ASF, used by IPMI on some cards 631 # cups 636 # ldaps +664 # Secure ASF, used by IPMI on some cards 774 # rpasswd 921 # lwresd 993 # imaps diff --git a/glibc-2.10-mcheck-free-race.diff b/glibc-2.10-mcheck-free-race.diff deleted file mode 100644 index 23bb78f..0000000 --- a/glibc-2.10-mcheck-free-race.diff +++ /dev/null @@ -1,49 +0,0 @@ -2009-06-15 Petr Baudis - - * malloc/hooks.c (free_check): Do not invoke mem2chunk_check() - without main_arena mutex held. - -Index: malloc/hooks.c -=================================================================== ---- malloc/hooks.c.orig -+++ malloc/hooks.c -@@ -276,25 +276,33 @@ free_check(mem, caller) Void_t* mem; con - mchunkptr p; - - if(!mem) return; -+#ifndef ATOMIC_FASTBINS -+ (void)mutex_lock(&main_arena.mutex); -+#endif - p = mem2chunk_check(mem, NULL); - if(!p) { -+#ifndef ATOMIC_FASTBINS -+ (void)mutex_unlock(&main_arena.mutex); -+#endif - malloc_printerr(check_action, "free(): invalid pointer", mem); - return; - } - #if HAVE_MMAP - if (chunk_is_mmapped(p)) { - munmap_chunk(p); -- return; -- } -+ } else - #endif -+ { - #if 0 /* Erase freed memory. */ -- memset(mem, 0, chunksize(p) - (SIZE_SZ+1)); -+ memset(mem, 0, chunksize(p) - (SIZE_SZ+1)); - #endif - #ifdef ATOMIC_FASTBINS -- _int_free(&main_arena, p, 0); -+ _int_free(&main_arena, p, 0); - #else -- (void)mutex_lock(&main_arena.mutex); -- _int_free(&main_arena, p); -+ _int_free(&main_arena, p); -+#endif -+ } -+#ifndef ATOMIC_FASTBINS - (void)mutex_unlock(&main_arena.mutex); - #endif - } diff --git a/glibc-2.10.1-44dbdf3777.tar.bz2 b/glibc-2.10.1-44dbdf3777.tar.bz2 deleted file mode 100644 index 086bc77..0000000 --- a/glibc-2.10.1-44dbdf3777.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e7a101729724f4487592df4011be0f9766992cc6cf70b39b07c45875897ce742 -size 15594985 diff --git a/glibc-2.11-1bc1954c7357.tar.bz2 b/glibc-2.11-1bc1954c7357.tar.bz2 new file mode 100644 index 0000000..81d08cb --- /dev/null +++ b/glibc-2.11-1bc1954c7357.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0ab54f44140cae0caac44045051efa49d7fe663257dd95a47231d1bfec789fd +size 15683806 diff --git a/glibc-2.3.3-amd64-string.diff b/glibc-2.3.3-amd64-string.diff index 89179f1..d9d0cba 100644 --- a/glibc-2.3.3-amd64-string.diff +++ b/glibc-2.3.3-amd64-string.diff @@ -1,466 +1,3 @@ -============================================================ -Index: sysdeps/x86_64/strlen.S -=================================================================== ---- sysdeps/x86_64/strlen.S.orig -+++ sysdeps/x86_64/strlen.S -@@ -1,54 +1,405 @@ --/* strlen(str) -- determine the length of the string STR. -- Copyright (C) 2009 Free Software Foundation, Inc. -- Contributed by Ulrich Drepper . -- 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 -- -- -- .text --ENTRY(strlen) -- movq %rdi, %rcx -- movq %rdi, %r8 -- andq $~15, %rdi -- pxor %xmm1, %xmm1 -- orl $0xffffffff, %esi -- movdqa (%rdi), %xmm0 -- subq %rdi, %rcx -- leaq 16(%rdi), %rdi -- pcmpeqb %xmm1, %xmm0 -- shl %cl, %esi -- pmovmskb %xmm0, %edx -- xorl %eax, %eax -- negq %r8 -- andl %esi, %edx -- jnz 1f -- --2: movdqa (%rdi), %xmm0 -- leaq 16(%rdi), %rdi -- pcmpeqb %xmm1, %xmm0 -- pmovmskb %xmm0, %edx -- testl %edx, %edx -- jz 2b -- --1: leaq -16(%rdi,%r8), %rdi -- bsfl %edx, %eax -- addq %rdi, %rax -- ret -+# $Header: /K8_Projects/Glibc/amd64strlen.S 3 10/06/03 11:00 Emenezes $ -+ -+# (c) 2002 Advanced Micro Devices, Inc. -+# YOUR USE OF THIS CODE IS SUBJECT TO THE TERMS -+# AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC -+# LICENSE FOUND IN THE "README" FILE THAT IS -+# INCLUDED WITH THIS FILE -+ -+#include "sysdep.h" -+#include -+ -+#ifdef PIC -+ .globl _rtld_local_ro -+ .hidden _rtld_local_ro -+ .set _rtld_local_ro,_rtld_global_ro -+#endif -+ .text -+ -+ENTRY (strlen) # (const char *s) -+ -+ mov %rdi, %rsi -+ neg %rdi -+ -+L(strlenaligntry): -+ mov %rsi , %r8 -+ and $7, %r8d -+ jz L(strlenalignafter) -+ -+L(strlenalign): # 8-byte align -+ sub $8, %r8 -+ -+ .p2align 4 -+ -+L(strlenalignloop): -+ cmpb $0, (%rsi) -+ je L(exit) -+ -+ inc %rsi -+ inc %r8 -+ jnz L(strlenalignloop) -+ -+ .p2align 4 -+ -+L(strlenalignafter): -+ -+L(strlen56try): -+ -+L(strlen56): # 56-byte -+ mov (%rsi), %rax -+ mov $0xfefefefefefefeff, %rcx -+ -+L(strlen56loop): -+ mov %rcx, %r8 -+ add %rax, %r8 -+ jnc L(strlentail) -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ inc %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ lea 8 (%rsi), %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ jnc L(strlentail) -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ inc %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ lea 8 (%rsi), %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ jnc L(strlentail) -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ inc %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ lea 8 (%rsi), %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ jnc L(strlentail) -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ inc %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ lea 8 (%rsi), %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ jnc L(strlentail) -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ inc %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ lea 8 (%rsi), %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ jnc L(strlentail) -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ inc %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ lea 8 (%rsi), %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ jnc L(strlentail) -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ inc %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ lea 8 (%rsi), %rsi -+ -+L(strlen56after): -+ -+L(strlen32): # 32-byte -+# mov $0xfefefefefefefeff, %rcx -+# mov (%rsi), %rax -+ -+#ifdef PIC -+ mov _rtld_local_ro@GOTPCREL(%rip), %r8 -+ mov RTLD_GLOBAL_DL_CACHE1SIZE(%r8), %r9 -+#else -+ mov _dl_cache1size, %r9 -+#endif -+ -+ .p2align 4 -+ -+L(strlen32loop): -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ sub $32, %r9 -+ -+ mov 8 (%rsi), %rax -+ lea 8 (%rsi), %rsi -+ -+ jbe L(strlen32loop) -+ -+L(strlen32after): -+ -+L(strlenpretry): -+ -+L(strlenpre): # 64-byte prefetch -+# mov $0xfefefefefefefeff, %rcx -+# mov (%rsi), %rax -+ -+ .p2align 4 -+ -+L(strlenpreloop): -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ mov %rcx, %r8 -+ add %rax, %r8 -+ sbb %rdx, %rdx -+ -+ xor %rax, %r8 -+ or %rcx, %r8 -+ sub %rdx, %r8 -+ jnz L(strlentail) -+ -+ prefetcht0 512 (%rsi) -+ -+ mov 8 (%rsi), %rax -+ add $8, %rsi -+ -+ jmp L(strlenpreloop) -+ -+ .p2align 4 -+ -+L(strlenpreafter): -+ -+L(strlentailtry): -+ -+L(strlentail): # 4-byte tail -+ -+L(strlentailloop): -+ test %al, %al -+ jz L(exit) -+ -+ inc %rsi -+ -+ test %ah, %ah -+ jz L(exit) -+ -+ inc %rsi -+ -+ test $0x00ff0000, %eax -+ jz L(exit) -+ -+ inc %rsi -+ -+ test $0xff000000, %eax -+ jz L(exit) -+ -+ inc %rsi -+ -+ shr $32, %rax -+ jmp L(strlentailloop) -+ -+L(strlentailafter): -+ -+ .p2align 4 -+ -+L(exit): -+ lea (%rdi, %rsi), %rax -+ ret -+ - END(strlen) - libc_hidden_builtin_def (strlen) Index: sysdeps/x86_64/dl-machine.h =================================================================== --- sysdeps/x86_64/dl-machine.h.orig @@ -510,13 +47,13 @@ Index: sysdeps/x86_64/Makefile =================================================================== --- sysdeps/x86_64/Makefile.orig +++ sysdeps/x86_64/Makefile -@@ -4,6 +4,9 @@ long-double-fcts = yes +@@ -4,7 +4,8 @@ long-double-fcts = yes ifeq ($(subdir),csu) sysdep_routines += hp-timing elide-routines.os += hp-timing -+ +-gen-as-const-headers += link-defines.sym +# get offset to rtld_global._dl_* -+gen-as-const-headers += rtld-global-offsets.sym ++gen-as-const-headers += link-defines.sym rtld-global-offsets.sym endif ifeq ($(subdir),gmon) @@ -1645,9 +1182,364 @@ Index: sysdeps/x86_64/elf/rtld-global-offsets.sym +RTLD_GLOBAL_DL_CACHE2SIZEHALF rtdl_global_offsetof (_dl_cache2sizehalf) Index: sysdeps/x86_64/memcmp.S =================================================================== ---- /dev/null +--- sysdeps/x86_64/memcmp.S.orig +++ sysdeps/x86_64/memcmp.S -@@ -0,0 +1,443 @@ +@@ -1,358 +1,442 @@ +-/* memcmp with SSE2 +- Copyright (C) 2009 Free Software Foundation, Inc. +- Contributed by Intel Corporation. +- 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 +- +- .text +-ENTRY (memcmp) +- test %rdx, %rdx +- jz L(finz) +- cmpq $1, %rdx +- jle L(finr1b) +- subq %rdi, %rsi +- movq %rdx, %r10 +- cmpq $32, %r10 +- jge L(gt32) +- /* Handle small chunks and last block of less than 32 bytes. */ +-L(small): +- testq $1, %r10 +- jz L(s2b) +- movzbl (%rdi), %eax +- movzbl (%rdi, %rsi), %edx +- subq $1, %r10 +- je L(finz1) +- addq $1, %rdi +- subl %edx, %eax +- jnz L(exit) +-L(s2b): +- testq $2, %r10 +- jz L(s4b) +- movzwl (%rdi), %eax +- movzwl (%rdi, %rsi), %edx +- subq $2, %r10 +- je L(fin2_7) +- addq $2, %rdi +- cmpl %edx, %eax +- jnz L(fin2_7) +-L(s4b): +- testq $4, %r10 +- jz L(s8b) +- movl (%rdi), %eax +- movl (%rdi, %rsi), %edx +- subq $4, %r10 +- je L(fin2_7) +- addq $4, %rdi +- cmpl %edx, %eax +- jnz L(fin2_7) +-L(s8b): +- testq $8, %r10 +- jz L(s16b) +- movq (%rdi), %rax +- movq (%rdi, %rsi), %rdx +- subq $8, %r10 +- je L(fin2_7) +- addq $8, %rdi +- cmpq %rdx, %rax +- jnz L(fin2_7) +-L(s16b): +- movdqu (%rdi), %xmm1 +- movdqu (%rdi, %rsi), %xmm0 +- pcmpeqb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- xorl %eax, %eax +- subl $0xffff, %edx +- jz L(finz) +- bsfl %edx, %ecx +- leaq (%rdi, %rcx), %rcx +- movzbl (%rcx), %eax +- movzbl (%rsi, %rcx), %edx +- jmp L(finz1) +- +- .p2align 4,, 4 +-L(finr1b): +- movzbl (%rdi), %eax +- movzbl (%rsi), %edx +-L(finz1): +- subl %edx, %eax +-L(exit): +- ret +- +- .p2align 4,, 4 +-L(fin2_7): +- cmpq %rdx, %rax +- jz L(finz) +- movq %rax, %r11 +- subq %rdx, %r11 +- bsfq %r11, %rcx +- sarq $3, %rcx +- salq $3, %rcx +- sarq %cl, %rax +- movzbl %al, %eax +- sarq %cl, %rdx +- movzbl %dl, %edx +- subl %edx, %eax +- ret +- +- .p2align 4,, 4 +-L(finz): +- xorl %eax, %eax +- ret +- +- /* For blocks bigger than 32 bytes +- 1. Advance one of the addr pointer to be 16B aligned. +- 2. Treat the case of both addr pointers aligned to 16B +- separately to avoid movdqu. +- 3. Handle any blocks of greater than 64 consecutive bytes with +- unrolling to reduce branches. +- 4. At least one addr pointer is 16B aligned, use memory version +- of pcmbeqb. +- */ +- .p2align 4,, 4 +-L(gt32): +- movq %rdx, %r11 +- addq %rdi, %r11 +- movq %rdi, %r8 +- +- andq $15, %r8 +- jz L(16am) +- /* Both pointers may be misaligned. */ +- movdqu (%rdi), %xmm1 +- movdqu (%rdi, %rsi), %xmm0 +- pcmpeqb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- subl $0xffff, %edx +- jnz L(neq) +- neg %r8 +- leaq 16(%rdi, %r8), %rdi +-L(16am): +- /* Handle two 16B aligned pointers separately. */ +- testq $15, %rsi +- jz L(ATR) +- testq $16, %rdi +- jz L(A32) +- movdqu (%rdi, %rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +-L(A32): +- movq %r11, %r10 +- andq $-32, %r10 +- cmpq %r10, %rdi +- jge L(mt16) +- /* Pre-unroll to be ready for unrolled 64B loop. */ +- testq $32, %rdi +- jz L(A64) +- movdqu (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +- movdqu (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +-L(A64): +- movq %r11, %r10 +- andq $-64, %r10 +- cmpq %r10, %rdi +- jge L(mt32) +- +-L(A64main): +- movdqu (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +- movdqu (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +- movdqu (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +- movdqu (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +- cmpq %rdi, %r10 +- jne L(A64main) +- +-L(mt32): +- movq %r11, %r10 +- andq $-32, %r10 +- cmpq %r10, %rdi +- jge L(mt16) +- +-L(A32main): +- movdqu (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +- movdqu (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +- cmpq %rdi, %r10 +- jne L(A32main) +-L(mt16): +- subq %rdi, %r11 +- je L(finz) +- movq %r11, %r10 +- jmp L(small) +- +- .p2align 4,, 4 +-L(neq): +- bsfl %edx, %ecx +- movzbl (%rdi, %rcx), %eax +- addq %rdi, %rsi +- movzbl (%rsi,%rcx), %edx +- jmp L(finz1) +- +- .p2align 4,, 4 +-L(ATR): +- movq %r11, %r10 +- andq $-32, %r10 +- cmpq %r10, %rdi +- jge L(mt16) +- testq $16, %rdi +- jz L(ATR32) +- +- movdqa (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- cmpq %rdi, %r10 +- je L(mt16) +- +-L(ATR32): +- movq %r11, %r10 +- andq $-64, %r10 +- testq $32, %rdi +- jz L(ATR64) +- +- movdqa (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +- movdqa (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +-L(ATR64): +- cmpq %rdi, %r10 +- je L(mt32) +- +-L(ATR64main): +- movdqa (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +- movdqa (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +- movdqa (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +- movdqa (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- cmpq %rdi, %r10 +- jne L(ATR64main) +- +- movq %r11, %r10 +- andq $-32, %r10 +- cmpq %r10, %rdi +- jge L(mt16) +- +-L(ATR32res): +- movdqa (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +- movdqa (%rdi,%rsi), %xmm0 +- pcmpeqb (%rdi), %xmm0 +- pmovmskb %xmm0, %edx +- subl $0xffff, %edx +- jnz L(neq) +- addq $16, %rdi +- +- cmpq %r10, %rdi +- jne L(ATR32res) +- +- subq %rdi, %r11 +- je L(finz) +- movq %r11, %r10 +- jmp L(small) +- /* Align to 16byte to improve instruction fetch. */ +- .p2align 4,, 4 +-END(memcmp) +# $Header: /K8_Projects/Glibc/amd64memcmp.S 4 10/06/03 10:57 Emenezes $ + +# (c) 2002 Advanced Micro Devices, Inc. @@ -2087,40 +1979,21 @@ Index: sysdeps/x86_64/memcmp.S + ret + +END (memcmp) -+ -+#undef bcmp -+weak_alias (memcmp, bcmp) -+libc_hidden_builtin_def (memcmp) -Index: sysdeps/x86_64/strncmp.S -=================================================================== ---- /dev/null -+++ sysdeps/x86_64/strncmp.S -@@ -0,0 +1,15 @@ -+# $Header: /K8_Projects/Glibc/amd64strncpy.S 1 8/29/03 16:37 Emenezes $ -+ -+# (c) 2002 Advanced Micro Devices, Inc. -+# YOUR USE OF THIS CODE IS SUBJECT TO THE TERMS -+# AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC -+# LICENSE FOUND IN THE "README" FILE THAT IS -+# INCLUDED WITH THIS FILE -+ -+#define USE_AS_STRNCMP -+#define strcmp strncmp -+ -+#include "strcmp.S" -+ -+weak_alias (strncmp, __strncmp) -+libc_hidden_builtin_def (strncmp) + + #undef bcmp + weak_alias (memcmp, bcmp) Index: sysdeps/x86_64/strcmp.S =================================================================== --- sysdeps/x86_64/strcmp.S.orig +++ sysdeps/x86_64/strcmp.S -@@ -1,45 +1,487 @@ +@@ -1,2108 +1,490 @@ -/* Highly optimized version for x86-64. -- Copyright (C) 1999, 2000, 2002, 2003, 2005 Free Software Foundation, Inc. +- Copyright (C) 1999, 2000, 2002, 2003, 2005, 2009 +- Free Software Foundation, Inc. - This file is part of the GNU C Library. - Based on i686 version contributed by Ulrich Drepper - , 1999. +- Updated with SSE2 support contributed by Intel Corporation. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public @@ -2136,25 +2009,47 @@ Index: sysdeps/x86_64/strcmp.S - 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 --#include "asm-syntax.h" --#include "bp-sym.h" --#include "bp-asm.h" -+# $Header: /K8_Projects/Glibc/amd64strcmp.S 10 2/10/04 11:48 Emenezes $ -+ -+# (c) 2002 Advanced Micro Devices, Inc. -+# YOUR USE OF THIS CODE IS SUBJECT TO THE TERMS -+# AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC -+# LICENSE FOUND IN THE "README" FILE THAT IS -+# INCLUDED WITH THIS FILE -+ -+#include "sysdep.h" -+ -+#define LABEL(s) L##s - .text --ENTRY (BP_SYM (strcmp)) + #include + #include "asm-syntax.h" + #include "bp-sym.h" + #include "bp-asm.h" + +-#undef UPDATE_STRNCMP_COUNTER +- + #ifndef LABEL + #define LABEL(l) L(l) + #endif + +-#ifdef USE_AS_STRNCMP +-/* Since the counter, %r11, is unsigned, we branch to strcmp_exitz +- if the new counter > the old one or is 0. */ +-# define UPDATE_STRNCMP_COUNTER \ +- /* calculate left number to compare */ \ +- lea -16(%rcx, %r11), %r9; \ +- cmp %r9, %r11; \ +- jb LABEL(strcmp_exitz); \ +- test %r9, %r9; \ +- je LABEL(strcmp_exitz); \ +- mov %r9, %r11 +- +-#else +-# define UPDATE_STRNCMP_COUNTER ++#ifndef USE_AS_STRNCMP + # ifndef STRCMP + # define STRCMP strcmp + # endif + #endif +- +-#ifndef USE_SSSE3 + .text +-#else +- .section .text.ssse3,"ax",@progbits +-#endif + +-ENTRY (BP_SYM (STRCMP)) +-#ifdef NOT_IN_libc +-/* Simple version since we can't use SSE registers in ld.so. */ -L(oop): movb (%rdi), %al - cmpb (%rsi), %al - jne L(neq) @@ -2170,355 +2065,1902 @@ Index: sysdeps/x86_64/strcmp.S - movl $-1, %ecx - cmovbl %ecx, %eax - ret --END (BP_SYM (strcmp)) -+ -+ENTRY (strcmp) # (const char *, const char *) -+ +-END (BP_SYM (STRCMP)) +-#else /* NOT_IN_libc */ +-/* +- * This implementation uses SSE to compare up to 16 bytes at a time. +- */ +-#ifdef USE_AS_STRNCMP +- test %rdx, %rdx +- je LABEL(strcmp_exitz) +- cmp $1, %rdx +- je LABEL(Byte0) +- mov %rdx, %r11 +-#endif +- mov %esi, %ecx +- mov %edi, %eax +-/* Use 64bit AND here to avoid long NOP padding. */ +- and $0x3f, %rcx /* rsi alignment in cache line */ +- and $0x3f, %rax /* rdi alignment in cache line */ +- cmp $0x30, %ecx +- ja LABEL(crosscache) /* rsi: 16-byte load will cross cache line */ +- cmp $0x30, %eax +- ja LABEL(crosscache) /* rdi: 16-byte load will cross cache line */ +- movlpd (%rdi), %xmm1 +- movlpd (%rsi), %xmm2 +- movhpd 8(%rdi), %xmm1 +- movhpd 8(%rsi), %xmm2 +- pxor %xmm0, %xmm0 /* clear %xmm0 for null char checks */ +- pcmpeqb %xmm1, %xmm0 /* Any null chars? */ +- pcmpeqb %xmm2, %xmm1 /* compare first 16 bytes for equality */ +- psubb %xmm0, %xmm1 /* packed sub of comparison results*/ +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx /* if first 16 bytes are same, edx == 0xffff */ +- jnz LABEL(less16bytes) /* If not, find different value or null char */ +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) /* finish comparision */ +-#endif +- add $16, %rsi /* prepare to search next 16 bytes */ +- add $16, %rdi /* prepare to search next 16 bytes */ ++ENTRY (STRCMP) # (const char *, const char *) + +- /* +- * Determine source and destination string offsets from 16-byte alignment. +- * Use relative offset difference between the two to determine which case +- * below to use. +- */ +- .p2align 4 +-LABEL(crosscache): +- and $0xfffffffffffffff0, %rsi /* force %rsi is 16 byte aligned */ +- and $0xfffffffffffffff0, %rdi /* force %rdi is 16 byte aligned */ +- mov $0xffff, %edx /* for equivalent offset */ +- xor %r8d, %r8d +- and $0xf, %ecx /* offset of rsi */ +- and $0xf, %eax /* offset of rdi */ +- cmp %eax, %ecx +- je LABEL(ashr_0) /* rsi and rdi relative offset same */ +- ja LABEL(bigger) +- mov %edx, %r8d /* r8d is offset flag for exit tail */ +- xchg %ecx, %eax +- xchg %rsi, %rdi +-LABEL(bigger): +- lea 15(%rax), %r9 +- sub %rcx, %r9 +- lea LABEL(unaligned_table)(%rip), %r10 +- movslq (%r10, %r9,4), %r9 +- lea (%r10, %r9), %r10 +- jmp *%r10 /* jump to corresponding case */ +- +-/* +- * The following cases will be handled by ashr_0 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(0~15) n(0~15) 15(15+ n-n) ashr_0 +- */ +- .p2align 4 +-LABEL(ashr_0): +- +- movdqa (%rsi), %xmm1 +- pxor %xmm0, %xmm0 /* clear %xmm0 for null char check */ +- pcmpeqb %xmm1, %xmm0 /* Any null chars? */ +- pcmpeqb (%rdi), %xmm1 /* compare 16 bytes for equality */ +- psubb %xmm0, %xmm1 /* packed sub of comparison results*/ +- pmovmskb %xmm1, %r9d +- shr %cl, %edx /* adjust 0xffff for offset */ +- shr %cl, %r9d /* adjust for 16-byte offset */ +- sub %r9d, %edx +- /* +- * edx must be the same with r9d if in left byte (16-rcx) is equal to +- * the start from (16-rax) and no null char was seen. +- */ +- jne LABEL(less32bytes) /* mismatch or null char */ +- UPDATE_STRNCMP_COUNTER +- mov $16, %rcx +- mov $16, %r9 +- pxor %xmm0, %xmm0 /* clear xmm0, may have changed above */ +- +- /* +- * Now both strings are aligned at 16-byte boundary. Loop over strings +- * checking 32-bytes per iteration. +- */ +- .p2align 4 +-LABEL(loop_ashr_0): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) /* mismatch or null char seen */ + xor %ecx, %ecx -+ + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif +- add $16, %rcx +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif +- add $16, %rcx +- jmp LABEL(loop_ashr_0) +#ifdef USE_AS_STRNCMP // (const char *, const char *, size_t) + mov %r14, -8 (%rsp) + mov %rdx, %r14 -+ + +-/* +- * The following cases will be handled by ashr_1 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(15) n -15 0(15 +(n-15) - n) ashr_1 +- */ +- .p2align 4 +-LABEL(ashr_1): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 /* Any null chars? */ +- pslldq $15, %xmm2 /* shift first string to align with second */ +- pcmpeqb %xmm1, %xmm2 /* compare 16 bytes for equality */ +- psubb %xmm0, %xmm2 /* packed sub of comparison results*/ +- pmovmskb %xmm2, %r9d +- shr %cl, %edx /* adjust 0xffff for offset */ +- shr %cl, %r9d /* adjust for 16-byte offset */ +- sub %r9d, %edx +- jnz LABEL(less32bytes) /* mismatch or null char seen */ +- movdqa (%rdi), %xmm3 +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads*/ +- mov $1, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 1(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_1): +- add $16, %r10 +- jg LABEL(nibble_ashr_1) /* cross page boundary */ +- +-LABEL(gobble_ashr_1): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 /* store for next cycle */ +- +-#ifndef USE_SSSE3 +- psrldq $1, %xmm3 +- pslldq $15, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $1, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) +- +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) + test %rdx, %rdx + mov %edx, %eax -+ jz .LABEL(exitz) -+#endif -+ -+.LABEL(aligntry): ++ jz LABEL(exitz) + #endif +- add $16, %rcx +- movdqa %xmm4, %xmm3 + +- add $16, %r10 +- jg LABEL(nibble_ashr_1) /* cross page boundary */ ++LABEL(aligntry): + mov %rsi, %r8 # align by "source" + and $8 - 1, %r8 # between 0 and 8 characters compared -+ jz .LABEL(alignafter) -+ -+.LABEL(align): ++ jz LABEL(alignafter) + +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 /* store for next cycle */ +- +-#ifndef USE_SSSE3 +- psrldq $1, %xmm3 +- pslldq $15, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $1, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) ++LABEL(align): + sub $8, %r8 -+ + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif +- add $16, %rcx +- movdqa %xmm4, %xmm3 +- jmp LABEL(loop_ashr_1) +- +- /* +- * Nibble avoids loads across page boundary. This is to avoid a potential +- * access into unmapped memory. +- */ +- .p2align 4 +-LABEL(nibble_ashr_1): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char*/ +- pmovmskb %xmm0, %edx +- test $0xfffe, %edx +- jnz LABEL(ashr_1_exittail) /* find null char*/ + .p2align 4 + -+.LABEL(alignloop): ++LABEL(alignloop): + mov (%rsi, %rcx), %al + mov (%rdi, %rcx), %dl -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- cmp $14, %r11 +- jbe LABEL(ashr_1_exittail) + dec %r14 -+ jl .LABEL(exitafter) -+#endif -+ ++ jl LABEL(exitafter) + #endif + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 /* substract 4K from %r10 */ +- jmp LABEL(gobble_ashr_1) +- +- /* +- * Once find null char, determine if there is a string mismatch +- * before the null char. +- */ +- .p2align 4 +-LABEL(ashr_1_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $1, %xmm0 +- psrldq $1, %xmm3 +- jmp LABEL(aftertail) +- +-/* +- * The following cases will be handled by ashr_2 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(14~15) n -14 1(15 +(n-14) - n) ashr_2 +- */ +- .p2align 4 +-LABEL(ashr_2): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 +- pslldq $14, %xmm2 +- pcmpeqb %xmm1, %xmm2 +- psubb %xmm0, %xmm2 +- pmovmskb %xmm2, %r9d +- shr %cl, %edx +- shr %cl, %r9d +- sub %r9d, %edx +- jnz LABEL(less32bytes) +- movdqa (%rdi), %xmm3 +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads */ +- mov $2, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 2(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_2): +- add $16, %r10 +- jg LABEL(nibble_ashr_2) +- +-LABEL(gobble_ashr_2): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $2, %xmm3 +- pslldq $14, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $2, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + cmp %dl, %al # check if same character -+ jne .LABEL(exitafter) ++ jne LABEL(exitafter) + test %al, %al # check if character a NUL -+ jz .LABEL(exitafter) -+ ++ jz LABEL(exitafter) + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif + inc %ecx -+ + +- add $16, %rcx +- movdqa %xmm4, %xmm3 + inc %r8 -+ jnz .LABEL(alignloop) -+ ++ jnz LABEL(alignloop) + +- add $16, %r10 +- jg LABEL(nibble_ashr_2) /* cross page boundary */ +- +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $2, %xmm3 +- pslldq $14, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $2, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + .p2align 4 -+ -+.LABEL(alignafter): -+ + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif ++LABEL(alignafter): + +- add $16, %rcx +- movdqa %xmm4, %xmm3 +- jmp LABEL(loop_ashr_2) +- +- .p2align 4 +-LABEL(nibble_ashr_2): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char */ +- pmovmskb %xmm0, %edx +- test $0xfffc, %edx +- jnz LABEL(ashr_2_exittail) + mov %r15, -32 (%rsp) + mov %rbp, -24 (%rsp) + mov %rbx, -16 (%rsp) -+ -+.LABEL(pagealigntry): # page align by "destination" + +-#ifdef USE_AS_STRNCMP +- cmp $13, %r11 +- jbe LABEL(ashr_2_exittail) +-#endif ++LABEL(pagealigntry): # page align by "destination" + mov $4096, %r15d # page size is 4096 + lea (%rdi, %rcx), %ebp + and $4095, %ebp # page mask + sub %r15d, %ebp -+ -+.LABEL(64): # 64-byte + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 +- jmp LABEL(gobble_ashr_2) +- +- .p2align 4 +-LABEL(ashr_2_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $2, %xmm0 +- psrldq $2, %xmm3 +- jmp LABEL(aftertail) +- +-/* +- * The following cases will be handled by ashr_3 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(13~15) n -13 2(15 +(n-13) - n) ashr_3 +- */ +- .p2align 4 +-LABEL(ashr_3): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 +- pslldq $13, %xmm2 +- pcmpeqb %xmm1, %xmm2 +- psubb %xmm0, %xmm2 +- pmovmskb %xmm2, %r9d +- shr %cl, %edx +- shr %cl, %r9d +- sub %r9d, %edx +- jnz LABEL(less32bytes) +- movdqa (%rdi), %xmm3 +- +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads */ +- mov $3, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 3(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_3): +- add $16, %r10 +- jg LABEL(nibble_ashr_3) +- +-LABEL(gobble_ashr_3): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $3, %xmm3 +- pslldq $13, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $3, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) ++LABEL(64): # 64-byte + mov $0xfefefefefefefeff, %rbx # magic number -+ + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif + .p2align 4 -+ -+.LABEL(64loop): + +- add $16, %rcx +- movdqa %xmm4, %xmm3 ++LABEL(64loop): + add $64, %ebp # check if "destination" crosses a page unevenly -+ jle .LABEL(64gobble) -+ ++ jle LABEL(64gobble) + +- add $16, %r10 +- jg LABEL(nibble_ashr_3) /* cross page boundary */ +- +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $3, %xmm3 +- pslldq $13, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $3, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + sub %r15d, %ebp + lea 64 (%rcx), %r8 -+ + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif + .p2align 4 -+ -+.LABEL(64nibble): + +- add $16, %rcx +- movdqa %xmm4, %xmm3 +- jmp LABEL(loop_ashr_3) +- +- .p2align 4 +-LABEL(nibble_ashr_3): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char */ +- pmovmskb %xmm0, %edx +- test $0xfff8, %edx +- jnz LABEL(ashr_3_exittail) ++LABEL(64nibble): + mov (%rsi, %rcx), %al + mov (%rdi, %rcx), %dl -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- cmp $12, %r11 +- jbe LABEL(ashr_3_exittail) + dec %r14 + jl .exit -+#endif -+ + #endif + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 +- jmp LABEL(gobble_ashr_3) +- +- .p2align 4 +-LABEL(ashr_3_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $3, %xmm0 +- psrldq $3, %xmm3 +- jmp LABEL(aftertail) +- +-/* +- * The following cases will be handled by ashr_4 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(12~15) n -12 3(15 +(n-12) - n) ashr_4 +- */ +- .p2align 4 +-LABEL(ashr_4): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 +- pslldq $12, %xmm2 +- pcmpeqb %xmm1, %xmm2 +- psubb %xmm0, %xmm2 +- pmovmskb %xmm2, %r9d +- shr %cl, %edx +- shr %cl, %r9d +- sub %r9d, %edx +- jnz LABEL(less32bytes) +- movdqa (%rdi), %xmm3 +- +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads */ +- mov $4, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 4(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_4): +- add $16, %r10 +- jg LABEL(nibble_ashr_4) +- +-LABEL(gobble_ashr_4): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $4, %xmm3 +- pslldq $12, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $4, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + cmp %dl, %al # check if same character + jne .exit + test %al, %al # check if character a NUL + jz .exit -+ + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif + inc %ecx + + cmp %ecx, %r8d -+ ja .LABEL(64nibble) -+ ++ ja LABEL(64nibble) + +- add $16, %rcx +- movdqa %xmm4, %xmm3 + .p2align 4 -+ -+.LABEL(64gobble): + +- add $16, %r10 +- jg LABEL(nibble_ashr_4) /* cross page boundary */ +- +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $4, %xmm3 +- pslldq $12, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $4, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) ++LABEL(64gobble): + mov (%rsi, %rcx), %rax + mov (%rdi, %rcx), %rdx -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) + sub $8, %r14 -+ jl .LABEL(tail) -+#endif -+ ++ jl LABEL(tail) + #endif + +- add $16, %rcx +- movdqa %xmm4, %xmm3 +- jmp LABEL(loop_ashr_4) +- +- .p2align 4 +-LABEL(nibble_ashr_4): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char */ +- pmovmskb %xmm0, %edx +- test $0xfff0, %edx +- jnz LABEL(ashr_4_exittail) + mov %rbx, %r8 + add %rax, %r8 + sbb %r10, %r10 -+ + +-#ifdef USE_AS_STRNCMP +- cmp $11, %r11 +- jbe LABEL(ashr_4_exittail) +-#endif + mov %rbx, %r9 + add %rdx, %r9 + sbb %r11, %r11 -+ + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 +- jmp LABEL(gobble_ashr_4) +- +- .p2align 4 +-LABEL(ashr_4_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $4, %xmm0 +- psrldq $4, %xmm3 +- jmp LABEL(aftertail) +- +-/* +- * The following cases will be handled by ashr_5 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(11~15) n - 11 4(15 +(n-11) - n) ashr_5 +- */ +- .p2align 4 +-LABEL(ashr_5): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 +- pslldq $11, %xmm2 +- pcmpeqb %xmm1, %xmm2 +- psubb %xmm0, %xmm2 +- pmovmskb %xmm2, %r9d +- shr %cl, %edx +- shr %cl, %r9d +- sub %r9d, %edx +- jnz LABEL(less32bytes) +- movdqa (%rdi), %xmm3 +- +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads */ +- mov $5, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 5(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_5): +- add $16, %r10 +- jg LABEL(nibble_ashr_5) +- +-LABEL(gobble_ashr_5): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $5, %xmm3 +- pslldq $11, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $5, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + xor %rax, %r8 + or %rbx, %r8 + sub %r10, %r8 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif + xor %rdx, %r9 + or %rbx, %r9 + sub %r11, %r9 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +- add $16, %rcx +- movdqa %xmm4, %xmm3 + cmp %rdx, %rax -+ jne .LABEL(tail) -+ ++ jne LABEL(tail) + +- add $16, %r10 +- jg LABEL(nibble_ashr_5) /* cross page boundary */ +- +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $5, %xmm3 +- pslldq $11, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $5, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + mov 8 (%rsi, %rcx), %rax + mov 8 (%rdi, %rcx), %rdx + add $8, %ecx -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) + sub $8, %r14 -+ jl .LABEL(tail) -+#endif -+ ++ jl LABEL(tail) + #endif + +- add $16, %rcx +- movdqa %xmm4, %xmm3 +- jmp LABEL(loop_ashr_5) +- +- .p2align 4 +-LABEL(nibble_ashr_5): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char */ +- pmovmskb %xmm0, %edx +- test $0xffe0, %edx +- jnz LABEL(ashr_5_exittail) + mov %rbx, %r8 + add %rax, %r8 + sbb %r10, %r10 -+ + +-#ifdef USE_AS_STRNCMP +- cmp $10, %r11 +- jbe LABEL(ashr_5_exittail) +-#endif + mov %rbx, %r9 + add %rdx, %r9 + sbb %r11, %r11 -+ + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 +- jmp LABEL(gobble_ashr_5) +- +- .p2align 4 +-LABEL(ashr_5_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $5, %xmm0 +- psrldq $5, %xmm3 +- jmp LABEL(aftertail) +- +-/* +- * The following cases will be handled by ashr_6 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(10~15) n - 10 5(15 +(n-10) - n) ashr_6 +- */ +- .p2align 4 +-LABEL(ashr_6): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 +- pslldq $10, %xmm2 +- pcmpeqb %xmm1, %xmm2 +- psubb %xmm0, %xmm2 +- pmovmskb %xmm2, %r9d +- shr %cl, %edx +- shr %cl, %r9d +- sub %r9d, %edx +- jnz LABEL(less32bytes) +- movdqa (%rdi), %xmm3 +- +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads */ +- mov $6, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 6(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_6): +- add $16, %r10 +- jg LABEL(nibble_ashr_6) +- +-LABEL(gobble_ashr_6): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $6, %xmm3 +- pslldq $10, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $6, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + xor %rax, %r8 + or %rbx, %r8 + sub %r10, %r8 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif + xor %rdx, %r9 + or %rbx, %r9 + sub %r11, %r9 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +- add $16, %rcx +- movdqa %xmm4, %xmm3 + cmp %rdx, %rax -+ jne .LABEL(tail) -+ ++ jne LABEL(tail) + +- add $16, %r10 +- jg LABEL(nibble_ashr_6) /* cross page boundary */ +- +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $6, %xmm3 +- pslldq $10, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $6, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + mov 8 (%rsi, %rcx), %rax + mov 8 (%rdi, %rcx), %rdx + add $8, %ecx -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) + sub $8, %r14 -+ jl .LABEL(tail) -+#endif -+ ++ jl LABEL(tail) + #endif + +- add $16, %rcx +- movdqa %xmm4, %xmm3 +- jmp LABEL(loop_ashr_6) +- +- .p2align 4 +-LABEL(nibble_ashr_6): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char */ +- pmovmskb %xmm0, %edx +- test $0xffc0, %edx +- jnz LABEL(ashr_6_exittail) + mov %rbx, %r8 + add %rax, %r8 + sbb %r10, %r10 -+ + +-#ifdef USE_AS_STRNCMP +- cmp $9, %r11 +- jbe LABEL(ashr_6_exittail) +-#endif + mov %rbx, %r9 + add %rdx, %r9 + sbb %r11, %r11 -+ + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 +- jmp LABEL(gobble_ashr_6) +- +- .p2align 4 +-LABEL(ashr_6_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $6, %xmm0 +- psrldq $6, %xmm3 +- jmp LABEL(aftertail) +- +-/* +- * The following cases will be handled by ashr_7 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(9~15) n - 9 6(15 +(n - 9) - n) ashr_7 +- */ +- .p2align 4 +-LABEL(ashr_7): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 +- pslldq $9, %xmm2 +- pcmpeqb %xmm1, %xmm2 +- psubb %xmm0, %xmm2 +- pmovmskb %xmm2, %r9d +- shr %cl, %edx +- shr %cl, %r9d +- sub %r9d, %edx +- jnz LABEL(less32bytes) +- movdqa (%rdi), %xmm3 +- +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads */ +- mov $7, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 7(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_7): +- add $16, %r10 +- jg LABEL(nibble_ashr_7) +- +-LABEL(gobble_ashr_7): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $7, %xmm3 +- pslldq $9, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $7, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + xor %rax, %r8 + or %rbx, %r8 + sub %r10, %r8 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif + xor %rdx, %r9 + or %rbx, %r9 + sub %r11, %r9 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +- add $16, %rcx +- movdqa %xmm4, %xmm3 + cmp %rdx, %rax -+ jne .LABEL(tail) -+ ++ jne LABEL(tail) + +- add $16, %r10 +- jg LABEL(nibble_ashr_7) /* cross page boundary */ +- +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $7, %xmm3 +- pslldq $9, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $7, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + mov 8 (%rsi, %rcx), %rax + mov 8 (%rdi, %rcx), %rdx + add $8, %ecx -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) + sub $8, %r14 -+ jl .LABEL(tail) -+#endif -+ ++ jl LABEL(tail) + #endif + +- add $16, %rcx +- movdqa %xmm4, %xmm3 +- jmp LABEL(loop_ashr_7) +- +- .p2align 4 +-LABEL(nibble_ashr_7): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char */ +- pmovmskb %xmm0, %edx +- test $0xff80, %edx +- jnz LABEL(ashr_7_exittail) + mov %rbx, %r8 + add %rax, %r8 + sbb %r10, %r10 -+ + +-#ifdef USE_AS_STRNCMP +- cmp $8, %r11 +- jbe LABEL(ashr_7_exittail) +-#endif + mov %rbx, %r9 + add %rdx, %r9 + sbb %r11, %r11 -+ + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 +- jmp LABEL(gobble_ashr_7) +- +- .p2align 4 +-LABEL(ashr_7_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $7, %xmm0 +- psrldq $7, %xmm3 +- jmp LABEL(aftertail) +- +-/* +- * The following cases will be handled by ashr_8 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(8~15) n - 8 7(15 +(n - 8) - n) ashr_8 +- */ +- .p2align 4 +-LABEL(ashr_8): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 +- pslldq $8, %xmm2 +- pcmpeqb %xmm1, %xmm2 +- psubb %xmm0, %xmm2 +- pmovmskb %xmm2, %r9d +- shr %cl, %edx +- shr %cl, %r9d +- sub %r9d, %edx +- jnz LABEL(less32bytes) +- movdqa (%rdi), %xmm3 +- +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads */ +- mov $8, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 8(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_8): +- add $16, %r10 +- jg LABEL(nibble_ashr_8) +- +-LABEL(gobble_ashr_8): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $8, %xmm3 +- pslldq $8, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $8, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + xor %rax, %r8 + or %rbx, %r8 + sub %r10, %r8 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif + xor %rdx, %r9 + or %rbx, %r9 + sub %r11, %r9 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +- add $16, %rcx +- movdqa %xmm4, %xmm3 + cmp %rdx, %rax -+ jne .LABEL(tail) -+ ++ jne LABEL(tail) + +- add $16, %r10 +- jg LABEL(nibble_ashr_8) /* cross page boundary */ +- +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $8, %xmm3 +- pslldq $8, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $8, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + mov 8 (%rsi, %rcx), %rax + mov 8 (%rdi, %rcx), %rdx + add $8, %ecx -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) + sub $8, %r14 -+ jl .LABEL(tail) -+#endif -+ ++ jl LABEL(tail) + #endif + +- add $16, %rcx +- movdqa %xmm4, %xmm3 +- jmp LABEL(loop_ashr_8) +- +- .p2align 4 +-LABEL(nibble_ashr_8): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char */ +- pmovmskb %xmm0, %edx +- test $0xff00, %edx +- jnz LABEL(ashr_8_exittail) + mov %rbx, %r8 + add %rax, %r8 + sbb %r10, %r10 -+ + +-#ifdef USE_AS_STRNCMP +- cmp $7, %r11 +- jbe LABEL(ashr_8_exittail) +-#endif + mov %rbx, %r9 + add %rdx, %r9 + sbb %r11, %r11 -+ + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 +- jmp LABEL(gobble_ashr_8) +- +- .p2align 4 +-LABEL(ashr_8_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $8, %xmm0 +- psrldq $8, %xmm3 +- jmp LABEL(aftertail) +- +-/* +- * The following cases will be handled by ashr_9 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(7~15) n - 7 8(15 +(n - 7) - n) ashr_9 +- */ +- .p2align 4 +-LABEL(ashr_9): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 +- pslldq $7, %xmm2 +- pcmpeqb %xmm1, %xmm2 +- psubb %xmm0, %xmm2 +- pmovmskb %xmm2, %r9d +- shr %cl, %edx +- shr %cl, %r9d +- sub %r9d, %edx +- jnz LABEL(less32bytes) +- movdqa (%rdi), %xmm3 +- +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads */ +- mov $9, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 9(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_9): +- add $16, %r10 +- jg LABEL(nibble_ashr_9) +- +-LABEL(gobble_ashr_9): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $9, %xmm3 +- pslldq $7, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $9, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + xor %rax, %r8 + or %rbx, %r8 + sub %r10, %r8 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif + xor %rdx, %r9 + or %rbx, %r9 + sub %r11, %r9 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +- add $16, %rcx +- movdqa %xmm4, %xmm3 + cmp %rdx, %rax -+ jne .LABEL(tail) -+ ++ jne LABEL(tail) + +- add $16, %r10 +- jg LABEL(nibble_ashr_9) /* cross page boundary */ +- +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $9, %xmm3 +- pslldq $7, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $9, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + mov 8 (%rsi, %rcx), %rax + mov 8 (%rdi, %rcx), %rdx + add $8, %ecx -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) + sub $8, %r14 -+ jl .LABEL(tail) -+#endif -+ ++ jl LABEL(tail) + #endif + +- add $16, %rcx +- movdqa %xmm4, %xmm3 /* store for next cycle */ +- jmp LABEL(loop_ashr_9) +- +- .p2align 4 +-LABEL(nibble_ashr_9): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char */ +- pmovmskb %xmm0, %edx +- test $0xfe00, %edx +- jnz LABEL(ashr_9_exittail) + mov %rbx, %r8 + add %rax, %r8 + sbb %r10, %r10 -+ + +-#ifdef USE_AS_STRNCMP +- cmp $6, %r11 +- jbe LABEL(ashr_9_exittail) +-#endif + mov %rbx, %r9 + add %rdx, %r9 + sbb %r11, %r11 -+ + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 +- jmp LABEL(gobble_ashr_9) +- +- .p2align 4 +-LABEL(ashr_9_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $9, %xmm0 +- psrldq $9, %xmm3 +- jmp LABEL(aftertail) +- +-/* +- * The following cases will be handled by ashr_10 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(6~15) n - 6 9(15 +(n - 6) - n) ashr_10 +- */ +- .p2align 4 +-LABEL(ashr_10): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 +- pslldq $6, %xmm2 +- pcmpeqb %xmm1, %xmm2 +- psubb %xmm0, %xmm2 +- pmovmskb %xmm2, %r9d +- shr %cl, %edx +- shr %cl, %r9d +- sub %r9d, %edx +- jnz LABEL(less32bytes) +- movdqa (%rdi), %xmm3 +- +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads */ +- mov $10, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 10(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_10): +- add $16, %r10 +- jg LABEL(nibble_ashr_10) +- +-LABEL(gobble_ashr_10): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $10, %xmm3 +- pslldq $6, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $10, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + xor %rax, %r8 + or %rbx, %r8 + sub %r10, %r8 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif + xor %rdx, %r9 + or %rbx, %r9 + sub %r11, %r9 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +- add $16, %rcx +- movdqa %xmm4, %xmm3 + cmp %rdx, %rax -+ jne .LABEL(tail) -+ ++ jne LABEL(tail) + +- add $16, %r10 +- jg LABEL(nibble_ashr_10) /* cross page boundary */ +- +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $10, %xmm3 +- pslldq $6, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $10, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + mov 8 (%rsi, %rcx), %rax + mov 8 (%rdi, %rcx), %rdx + add $8, %ecx -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) + sub $8, %r14 -+ jl .LABEL(tail) -+#endif -+ ++ jl LABEL(tail) + #endif + +- add $16, %rcx +- movdqa %xmm4, %xmm3 +- jmp LABEL(loop_ashr_10) +- +- .p2align 4 +-LABEL(nibble_ashr_10): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char */ +- pmovmskb %xmm0, %edx +- test $0xfc00, %edx +- jnz LABEL(ashr_10_exittail) + mov %rbx, %r8 + add %rax, %r8 + sbb %r10, %r10 -+ + +-#ifdef USE_AS_STRNCMP +- cmp $5, %r11 +- jbe LABEL(ashr_10_exittail) +-#endif + mov %rbx, %r9 + add %rdx, %r9 + sbb %r11, %r11 -+ + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 +- jmp LABEL(gobble_ashr_10) +- +- .p2align 4 +-LABEL(ashr_10_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $10, %xmm0 +- psrldq $10, %xmm3 +- jmp LABEL(aftertail) +- +-/* +- * The following cases will be handled by ashr_11 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(5~15) n - 5 10(15 +(n - 5) - n) ashr_11 +- */ +- .p2align 4 +-LABEL(ashr_11): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 +- pslldq $5, %xmm2 +- pcmpeqb %xmm1, %xmm2 +- psubb %xmm0, %xmm2 +- pmovmskb %xmm2, %r9d +- shr %cl, %edx +- shr %cl, %r9d +- sub %r9d, %edx +- jnz LABEL(less32bytes) +- movdqa (%rdi), %xmm3 +- +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads */ +- mov $11, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 11(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_11): +- add $16, %r10 +- jg LABEL(nibble_ashr_11) +- +-LABEL(gobble_ashr_11): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $11, %xmm3 +- pslldq $5, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $11, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + xor %rax, %r8 + or %rbx, %r8 + sub %r10, %r8 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif + xor %rdx, %r9 + or %rbx, %r9 + sub %r11, %r9 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +- add $16, %rcx +- movdqa %xmm4, %xmm3 + cmp %rdx, %rax -+ jne .LABEL(tail) -+ ++ jne LABEL(tail) + +- add $16, %r10 +- jg LABEL(nibble_ashr_11) /* cross page boundary */ +- +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $11, %xmm3 +- pslldq $5, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $11, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + mov 8 (%rsi, %rcx), %rax + mov 8 (%rdi, %rcx), %rdx + add $8, %ecx -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) + sub $8, %r14 -+ jl .LABEL(tail) -+#endif -+ ++ jl LABEL(tail) + #endif + +- add $16, %rcx +- movdqa %xmm4, %xmm3 +- jmp LABEL(loop_ashr_11) +- +- .p2align 4 +-LABEL(nibble_ashr_11): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char */ +- pmovmskb %xmm0, %edx +- test $0xf800, %edx +- jnz LABEL(ashr_11_exittail) + mov %rbx, %r8 + add %rax, %r8 + sbb %r10, %r10 -+ + +-#ifdef USE_AS_STRNCMP +- cmp $4, %r11 +- jbe LABEL(ashr_11_exittail) +-#endif + mov %rbx, %r9 + add %rdx, %r9 + sbb %r11, %r11 -+ + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 +- jmp LABEL(gobble_ashr_11) +- +- .p2align 4 +-LABEL(ashr_11_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $11, %xmm0 +- psrldq $11, %xmm3 +- jmp LABEL(aftertail) +- +-/* +- * The following cases will be handled by ashr_12 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(4~15) n - 4 11(15 +(n - 4) - n) ashr_12 +- */ +- .p2align 4 +-LABEL(ashr_12): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 +- pslldq $4, %xmm2 +- pcmpeqb %xmm1, %xmm2 +- psubb %xmm0, %xmm2 +- pmovmskb %xmm2, %r9d +- shr %cl, %edx +- shr %cl, %r9d +- sub %r9d, %edx +- jnz LABEL(less32bytes) +- movdqa (%rdi), %xmm3 +- +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads */ +- mov $12, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 12(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_12): +- add $16, %r10 +- jg LABEL(nibble_ashr_12) +- +-LABEL(gobble_ashr_12): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $12, %xmm3 +- pslldq $4, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $12, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + xor %rax, %r8 + or %rbx, %r8 + sub %r10, %r8 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif + xor %rdx, %r9 + or %rbx, %r9 + sub %r11, %r9 -+ jnz .LABEL(tail) -+ ++ jnz LABEL(tail) + +- add $16, %rcx +- movdqa %xmm4, %xmm3 + cmp %rdx, %rax -+ jne .LABEL(tail) -+ ++ jne LABEL(tail) + +- add $16, %r10 +- jg LABEL(nibble_ashr_12) /* cross page boundary */ +- +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $12, %xmm3 +- pslldq $4, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $12, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + add $8, %ecx + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif ++ jmp LABEL(64loop) + -+ jmp .LABEL(64loop) -+ -+.LABEL(64after): -+ -+.LABEL(tailtry): ++LABEL(64after): + +- add $16, %rcx +- movdqa %xmm4, %xmm3 +- jmp LABEL(loop_ashr_12) +- +- .p2align 4 +-LABEL(nibble_ashr_12): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char */ +- pmovmskb %xmm0, %edx +- test $0xf000, %edx +- jnz LABEL(ashr_12_exittail) ++LABEL(tailtry): +# mov (%rsi, %rcx), %rax +# mov (%rdi, %rcx), %rdx +# add $8, %rcx -+ -+.LABEL(tail): # byte tail -+#ifdef USE_AS_STRNCMP + ++LABEL(tail): # byte tail + #ifdef USE_AS_STRNCMP +- cmp $3, %r11 +- jbe LABEL(ashr_12_exittail) + add $7, %r14 -+#endif -+ + #endif + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 +- jmp LABEL(gobble_ashr_12) +- +- .p2align 4 +-LABEL(ashr_12_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $12, %xmm0 +- psrldq $12, %xmm3 +- jmp LABEL(aftertail) +- +-/* +- * The following cases will be handled by ashr_13 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(3~15) n - 3 12(15 +(n - 3) - n) ashr_13 +- */ +- .p2align 4 +-LABEL(ashr_13): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 +- pslldq $3, %xmm2 +- pcmpeqb %xmm1, %xmm2 +- psubb %xmm0, %xmm2 +- pmovmskb %xmm2, %r9d +- shr %cl, %edx +- shr %cl, %r9d +- sub %r9d, %edx +- jnz LABEL(less32bytes) +- movdqa (%rdi), %xmm3 +- +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads */ +- mov $13, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 13(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_13): +- add $16, %r10 +- jg LABEL(nibble_ashr_13) +- +-LABEL(gobble_ashr_13): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $13, %xmm3 +- pslldq $3, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $13, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + cmp %dl, %al # check if same character + jne .exit + test %al, %al # check if character a NUL @@ -2526,12 +3968,62 @@ Index: sysdeps/x86_64/strcmp.S + + shr $8, %rax + shr $8, %rdx -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) + dec %r14 + jl .exit -+#endif -+ + #endif + +- add $16, %rcx +- movdqa %xmm4, %xmm3 ++ cmp %dl, %al ++ jne .exit ++ test %al, %al ++ jz .exit + +- add $16, %r10 +- jg LABEL(nibble_ashr_13) /* cross page boundary */ +- +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $13, %xmm3 +- pslldq $3, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $13, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) ++ shr $8, %rax ++ shr $8, %rdx + + #ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) ++ dec %r14 ++ jl .exit + #endif + +- add $16, %rcx +- movdqa %xmm4, %xmm3 +- jmp LABEL(loop_ashr_13) +- +- .p2align 4 +-LABEL(nibble_ashr_13): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char */ +- pmovmskb %xmm0, %edx +- test $0xe000, %edx +- jnz LABEL(ashr_13_exittail) + cmp %dl, %al + jne .exit + test %al, %al @@ -2539,12 +4031,84 @@ Index: sysdeps/x86_64/strcmp.S + + shr $8, %rax + shr $8, %rdx -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- cmp $2, %r11 +- jbe LABEL(ashr_13_exittail) + dec %r14 + jl .exit -+#endif -+ + #endif + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 +- jmp LABEL(gobble_ashr_13) +- +- .p2align 4 +-LABEL(ashr_13_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $13, %xmm0 +- psrldq $13, %xmm3 +- jmp LABEL(aftertail) +- +-/* +- * The following cases will be handled by ashr_14 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(2~15) n - 2 13(15 +(n - 2) - n) ashr_14 +- */ +- .p2align 4 +-LABEL(ashr_14): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 +- pslldq $2, %xmm2 +- pcmpeqb %xmm1, %xmm2 +- psubb %xmm0, %xmm2 +- pmovmskb %xmm2, %r9d +- shr %cl, %edx +- shr %cl, %r9d +- sub %r9d, %edx +- jnz LABEL(less32bytes) +- movdqa (%rdi), %xmm3 +- +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads */ +- mov $14, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 14(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_14): +- add $16, %r10 +- jg LABEL(nibble_ashr_14) +- +-LABEL(gobble_ashr_14): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $14, %xmm3 +- pslldq $2, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $14, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + cmp %dl, %al + jne .exit + test %al, %al @@ -2552,25 +4116,62 @@ Index: sysdeps/x86_64/strcmp.S + + shr $8, %rax + shr $8, %rdx -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) + dec %r14 + jl .exit -+#endif -+ + #endif + +- add $16, %rcx +- movdqa %xmm4, %xmm3 + cmp %dl, %al + jne .exit + test %al, %al + jz .exit -+ -+ shr $8, %rax -+ shr $8, %rdx -+ -+#ifdef USE_AS_STRNCMP + +- add $16, %r10 +- jg LABEL(nibble_ashr_14) /* cross page boundary */ +- +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $14, %xmm3 +- pslldq $2, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $14, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) ++ shr $8, %eax ++ shr $8, %edx + + #ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) + dec %r14 + jl .exit -+#endif -+ + #endif + +- add $16, %rcx +- movdqa %xmm4, %xmm3 +- jmp LABEL(loop_ashr_14) +- +- .p2align 4 +-LABEL(nibble_ashr_14): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char */ +- pmovmskb %xmm0, %edx +- test $0xc000, %edx +- jnz LABEL(ashr_14_exittail) + cmp %dl, %al + jne .exit + test %al, %al @@ -2578,12 +4179,86 @@ Index: sysdeps/x86_64/strcmp.S + + shr $8, %eax + shr $8, %edx -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- cmp $1, %r11 +- jbe LABEL(ashr_14_exittail) + dec %r14 + jl .exit -+#endif -+ + #endif + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 +- jmp LABEL(gobble_ashr_14) +- +- .p2align 4 +-LABEL(ashr_14_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $14, %xmm0 +- psrldq $14, %xmm3 +- jmp LABEL(aftertail) +- +-/* +- * The following cases will be handled by ashr_15 +- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case +- * n(1~15) n - 1 14(15 +(n - 1) - n) ashr_15 +- */ +- .p2align 4 +-LABEL(ashr_15): +- pxor %xmm0, %xmm0 +- movdqa (%rdi), %xmm2 +- movdqa (%rsi), %xmm1 +- pcmpeqb %xmm1, %xmm0 +- pslldq $1, %xmm2 +- pcmpeqb %xmm1, %xmm2 +- psubb %xmm0, %xmm2 +- pmovmskb %xmm2, %r9d +- shr %cl, %edx +- shr %cl, %r9d +- sub %r9d, %edx +- jnz LABEL(less32bytes) +- +- movdqa (%rdi), %xmm3 +- +- UPDATE_STRNCMP_COUNTER +- +- pxor %xmm0, %xmm0 +- mov $16, %rcx /* index for loads */ +- mov $15, %r9d /* byte position left over from less32bytes case */ +- /* +- * Setup %r10 value allows us to detect crossing a page boundary. +- * When %r10 goes positive we have crossed a page boundary and +- * need to do a nibble. +- */ +- lea 15(%rdi), %r10 +- and $0xfff, %r10 /* offset into 4K page */ +- +- sub $0x1000, %r10 /* subtract 4K pagesize */ +- +- .p2align 4 +-LABEL(loop_ashr_15): +- add $16, %r10 +- jg LABEL(nibble_ashr_15) +- +-LABEL(gobble_ashr_15): +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $15, %xmm3 +- pslldq $1, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $15, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + cmp %dl, %al + jne .exit + test %al, %al @@ -2591,60 +4266,159 @@ Index: sysdeps/x86_64/strcmp.S + + shr $8, %eax + shr $8, %edx -+ -+#ifdef USE_AS_STRNCMP + + #ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) + dec %r14 + jl .exit -+#endif -+ -+ cmp %dl, %al -+ jne .exit -+ test %al, %al -+ jz .exit -+ -+ shr $8, %eax -+ shr $8, %edx -+ -+#ifdef USE_AS_STRNCMP -+ dec %r14 -+ jl .exit -+#endif -+ + #endif + +- add $16, %rcx +- movdqa %xmm4, %xmm3 + cmp %dl, %al + jne .exit +# test %al, %al +# jz .exit -+ + +- add $16, %r10 +- jg LABEL(nibble_ashr_15) /* cross page boundary */ +- +- movdqa (%rsi, %rcx), %xmm1 +- movdqa (%rdi, %rcx), %xmm2 +- movdqa %xmm2, %xmm4 +- +-#ifndef USE_SSSE3 +- psrldq $15, %xmm3 +- pslldq $1, %xmm2 +- por %xmm3, %xmm2 /* merge into one 16byte value */ +-#else +- palignr $15, %xmm3, %xmm2 /* merge into one 16byte value */ +-#endif +- +- pcmpeqb %xmm1, %xmm0 +- pcmpeqb %xmm2, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- sub $0xffff, %edx +- jnz LABEL(exit) + .p2align 4,, 15 -+ -+.LABEL(tailafter): -+ + +-#ifdef USE_AS_STRNCMP +- sub $16, %r11 +- jbe LABEL(strcmp_exitz) +-#endif ++LABEL(tailafter): + +- add $16, %rcx +- movdqa %xmm4, %xmm3 +- jmp LABEL(loop_ashr_15) +- +- .p2align 4 +-LABEL(nibble_ashr_15): +- pcmpeqb %xmm3, %xmm0 /* check nibble for null char */ +- pmovmskb %xmm0, %edx +- test $0x8000, %edx +- jnz LABEL(ashr_15_exittail) +.exit: + mov -32 (%rsp), %r15 + mov -24 (%rsp), %rbp + mov -16 (%rsp), %rbx -+ + + .p2align 4,, 3 + -+.LABEL(exitafter): -+#ifdef USE_AS_STRNCMP ++LABEL(exitafter): + #ifdef USE_AS_STRNCMP +- test %r11, %r11 +- je LABEL(ashr_15_exittail) + test %r14, %r14 + cmovl %edx, %eax -+#endif -+ + #endif + +- pxor %xmm0, %xmm0 +- sub $0x1000, %r10 +- jmp LABEL(gobble_ashr_15) +- +- .p2align 4 +-LABEL(ashr_15_exittail): +- movdqa (%rsi, %rcx), %xmm1 +- psrldq $15, %xmm3 +- psrldq $15, %xmm0 +- +- .p2align 4 +-LABEL(aftertail): +- pcmpeqb %xmm3, %xmm1 +- psubb %xmm0, %xmm1 +- pmovmskb %xmm1, %edx +- not %edx +- +- .p2align 4 +-LABEL(exit): +- lea -16(%r9, %rcx), %rax /* locate the exact offset for rdi */ +-LABEL(less32bytes): +- lea (%rdi, %rax), %rdi /* locate the exact address for first operand(rdi) */ +- lea (%rsi, %rcx), %rsi /* locate the exact address for second operand(rsi) */ +- test %r8d, %r8d +- jz LABEL(ret) +- xchg %rsi, %rdi /* recover original order according to flag(%r8d) */ +- +- .p2align 4 +-LABEL(ret): +-LABEL(less16bytes): +- bsf %rdx, %rdx /* find and store bit index in %rdx */ + movzx %al, %eax + movzx %dl, %edx + sub %eax, %edx + xchg %edx, %eax -+ -+#ifdef USE_AS_STRNCMP -+.LABEL(exitz): + + #ifdef USE_AS_STRNCMP +- sub %rdx, %r11 +- jbe LABEL(strcmp_exitz) ++LABEL(exitz): + mov -8 (%rsp), %r14 -+#endif + #endif +- movzbl (%rsi, %rdx), %ecx +- movzbl (%rdi, %rdx), %eax +- +- sub %ecx, %eax +- ret + ret -+ + +-LABEL(strcmp_exitz): +- xor %eax, %eax +- ret +- +- .p2align 4 +-LABEL(Byte0): +- movzx (%rsi), %ecx +- movzx (%rdi), %eax +- +- sub %ecx, %eax +- ret +-END (BP_SYM (STRCMP)) +- +- .section .rodata,"a",@progbits +- .p2align 3 +-LABEL(unaligned_table): +- .int LABEL(ashr_1) - LABEL(unaligned_table) +- .int LABEL(ashr_2) - LABEL(unaligned_table) +- .int LABEL(ashr_3) - LABEL(unaligned_table) +- .int LABEL(ashr_4) - LABEL(unaligned_table) +- .int LABEL(ashr_5) - LABEL(unaligned_table) +- .int LABEL(ashr_6) - LABEL(unaligned_table) +- .int LABEL(ashr_7) - LABEL(unaligned_table) +- .int LABEL(ashr_8) - LABEL(unaligned_table) +- .int LABEL(ashr_9) - LABEL(unaligned_table) +- .int LABEL(ashr_10) - LABEL(unaligned_table) +- .int LABEL(ashr_11) - LABEL(unaligned_table) +- .int LABEL(ashr_12) - LABEL(unaligned_table) +- .int LABEL(ashr_13) - LABEL(unaligned_table) +- .int LABEL(ashr_14) - LABEL(unaligned_table) +- .int LABEL(ashr_15) - LABEL(unaligned_table) +- .int LABEL(ashr_0) - LABEL(unaligned_table) +-#endif /* NOT_IN_libc */ +END (strcmp) - libc_hidden_builtin_def (strcmp) + libc_hidden_builtin_def (STRCMP) Index: sysdeps/x86_64/memcpy.S =================================================================== --- sysdeps/x86_64/memcpy.S.orig diff --git a/glibc-2.3.90-ld.so-madvise.diff b/glibc-2.3.90-ld.so-madvise.diff index 44ed621..fd01e86 100644 --- a/glibc-2.3.90-ld.so-madvise.diff +++ b/glibc-2.3.90-ld.so-madvise.diff @@ -2,7 +2,7 @@ Index: elf/dl-load.c =================================================================== --- elf/dl-load.c.orig +++ elf/dl-load.c -@@ -1204,6 +1204,9 @@ cannot allocate TLS data structures for +@@ -1207,6 +1207,9 @@ cannot allocate TLS data structures for goto call_lose_errno; } @@ -37,7 +37,7 @@ Index: elf/rtld.c =================================================================== --- elf/rtld.c.orig +++ elf/rtld.c -@@ -153,6 +153,7 @@ struct rtld_global_ro _rtld_global_ro at +@@ -158,6 +158,7 @@ struct rtld_global_ro _rtld_global_ro at ._dl_lazy = 1, ._dl_fpu_control = _FPU_DEFAULT, ._dl_pointer_guard = 1, @@ -45,7 +45,7 @@ Index: elf/rtld.c /* Function pointers. */ ._dl_debug_printf = _dl_debug_printf, -@@ -2607,6 +2608,14 @@ process_envvars (enum mode *modep) +@@ -2612,6 +2613,14 @@ process_envvars (enum mode *modep) break; case 9: @@ -64,7 +64,7 @@ Index: sysdeps/generic/ldsodefs.h =================================================================== --- sysdeps/generic/ldsodefs.h.orig +++ sysdeps/generic/ldsodefs.h -@@ -561,6 +561,9 @@ struct rtld_global_ro +@@ -580,6 +580,9 @@ struct rtld_global_ro /* Do we do lazy relocations? */ EXTERN int _dl_lazy; diff --git a/glibc-2.3.90-noversion.diff b/glibc-2.3.90-noversion.diff index ae8b861..b3a6c9f 100644 --- a/glibc-2.3.90-noversion.diff +++ b/glibc-2.3.90-noversion.diff @@ -2,7 +2,7 @@ Index: elf/rtld.c =================================================================== --- elf/rtld.c.orig +++ elf/rtld.c -@@ -1756,6 +1756,53 @@ ERROR: ld.so: object '%s' cannot be load +@@ -1761,6 +1761,53 @@ ERROR: ld.so: object '%s' cannot be load } } diff --git a/glibc-2.3.locales.diff.bz2 b/glibc-2.3.locales.diff.bz2 index 0b1e480..925c0f4 100644 --- a/glibc-2.3.locales.diff.bz2 +++ b/glibc-2.3.locales.diff.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:308f75f9daa64b97485a53420215656b001cc25a9337c34887d2c279efe32bc9 -size 328632 +oid sha256:a623420e540731e6b0dca8ce2212fdfe048fa8b38c03eb210a8cf168b63d874e +size 328634 diff --git a/glibc-2.4.90-no_NO.diff b/glibc-2.4.90-no_NO.diff index b38803f..24aaa14 100644 --- a/glibc-2.4.90-no_NO.diff +++ b/glibc-2.4.90-no_NO.diff @@ -89,7 +89,7 @@ Index: localedata/SUPPORTED =================================================================== --- localedata/SUPPORTED.orig +++ localedata/SUPPORTED -@@ -303,6 +303,8 @@ nl_NL/ISO-8859-1 \ +@@ -305,6 +305,8 @@ nl_NL/ISO-8859-1 \ nl_NL@euro/ISO-8859-15 \ nn_NO.UTF-8/UTF-8 \ nn_NO/ISO-8859-1 \ diff --git a/glibc-2.4.90-nscd.diff b/glibc-2.4.90-nscd.diff index 3c5fa26..f66d910 100644 --- a/glibc-2.4.90-nscd.diff +++ b/glibc-2.4.90-nscd.diff @@ -40,7 +40,7 @@ Index: nscd/cache.c + /* now == 0 means just check for changed files */ + if (now == (time_t)0) -+ return; ++ return 0; + /* We run through the table and find values which are not valid anymore. diff --git a/glibc-2.6-configure.diff b/glibc-2.6-configure.diff index a0b405b..b49cc36 100644 --- a/glibc-2.6-configure.diff +++ b/glibc-2.6-configure.diff @@ -2,7 +2,7 @@ Index: configure.in =================================================================== --- configure.in.orig +++ configure.in -@@ -1360,7 +1360,7 @@ EOF +@@ -1395,7 +1395,7 @@ EOF fi fi fi @@ -11,7 +11,7 @@ Index: configure.in ]) if test $libc_cv_visibility_attribute != yes; then AC_MSG_ERROR(compiler support for visibility attribute is required) -@@ -1376,7 +1376,7 @@ EOF +@@ -1411,7 +1411,7 @@ EOF int bar (int x) { return x; } EOF libc_cv_broken_visibility_attribute=yes @@ -24,7 +24,7 @@ Index: configure =================================================================== --- configure.orig +++ configure -@@ -6221,7 +6221,7 @@ EOF +@@ -6272,7 +6272,7 @@ EOF fi fi fi @@ -33,7 +33,7 @@ Index: configure fi { $as_echo "$as_me:$LINENO: result: $libc_cv_visibility_attribute" >&5 -@@ -6245,7 +6245,7 @@ else +@@ -6296,7 +6296,7 @@ else int bar (int x) { return x; } EOF libc_cv_broken_visibility_attribute=yes diff --git a/glibc-compiled-binaries.diff b/glibc-compiled-binaries.diff index 17072c8..ccb826f 100644 --- a/glibc-compiled-binaries.diff +++ b/glibc-compiled-binaries.diff @@ -11,7 +11,7 @@ Index: config.make.in =================================================================== --- config.make.in.orig +++ config.make.in -@@ -96,6 +96,7 @@ add-ons = @add_ons@ +@@ -99,6 +99,7 @@ add-ons = @add_ons@ add-on-subdirs = @add_on_subdirs@ sysdeps-add-ons = @sysdeps_add_ons@ cross-compiling = @cross_compiling@ @@ -31,7 +31,7 @@ Index: configure subdirs= MFLAGS= MAKEFLAGS= -@@ -741,6 +742,7 @@ CXXFLAGS +@@ -742,6 +743,7 @@ CXXFLAGS CXX CPP cross_compiling @@ -39,7 +39,7 @@ Index: configure BUILD_CC OBJEXT ac_ct_CC -@@ -1291,6 +1293,13 @@ do +@@ -1294,6 +1296,13 @@ do { (exit 1); exit 1; }; } done @@ -53,7 +53,7 @@ Index: configure # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. -@@ -1306,6 +1315,7 @@ if test "x$host_alias" != x; then +@@ -1309,6 +1318,7 @@ if test "x$host_alias" != x; then If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -61,7 +61,7 @@ Index: configure fi fi -@@ -1498,6 +1508,9 @@ Optional Features: +@@ -1501,6 +1511,9 @@ Optional Features: enable experimental malloc features --enable-nss-crypt enable libcrypt to use nss @@ -75,7 +75,7 @@ Index: configure.in =================================================================== --- configure.in.orig +++ configure.in -@@ -13,6 +13,7 @@ if test $host != $build; then +@@ -16,6 +16,7 @@ if test $host != $build; then AC_CHECK_PROGS(BUILD_CC, gcc cc) fi AC_SUBST(cross_compiling) diff --git a/glibc-ia64-memchr.diff b/glibc-ia64-memchr.diff new file mode 100644 index 0000000..c137892 --- /dev/null +++ b/glibc-ia64-memchr.diff @@ -0,0 +1,39 @@ +On Mon, Nov 09, 2009 at 11:57:06AM -0800, H.J. Lu wrote: +> When data is shorter than software pipeline, recovery may fail. This +> patch avoids it by using a simple loop on data shorter than software +> pipeline. +> + +Here is an updated patch. This one properly handles the shorter read +on speculative load. + + +H.J. +--- +2009-11-09 H.J. Lu + + PR libc/10162 + * sysdeps/ia64/memchr.S: Properly recover from shorter read. + +diff --git a/sysdeps/ia64/memchr.S b/sysdeps/ia64/memchr.S +index cd062b2..cdd71ca 100644 +--- a/sysdeps/ia64/memchr.S ++++ b/sysdeps/ia64/memchr.S +@@ -126,7 +126,16 @@ ENTRY(__memchr) + br.ret.sptk.many b0 + + .recovery: +- adds ret0 = -((MEMLAT + 1) * 8), ret0;; ++#if MEMLAT != 6 ++# error "MEMLAT must be 6!" ++#endif ++(p[MEMLAT-6]) add ret0 = -8, ret0;; ++(p[MEMLAT-5]) add ret0 = -8, ret0;; ++(p[MEMLAT-4]) add ret0 = -8, ret0;; ++(p[MEMLAT-3]) add ret0 = -8, ret0;; ++(p[MEMLAT-2]) add ret0 = -8, ret0;; ++(p[MEMLAT-1]) add ret0 = -8, ret0;; ++(p[MEMLAT]) add ret0 = -8, ret0;; + (p[MEMLAT+1]) add ret0 = -8, ret0;; + (p[MEMLAT+2]) add ret0 = -8, ret0;; + .l4: diff --git a/glibc-nameserver-localhost.diff b/glibc-nameserver-localhost.diff new file mode 100644 index 0000000..7e464c8 --- /dev/null +++ b/glibc-nameserver-localhost.diff @@ -0,0 +1,29 @@ +2009-11-20 Petr Baudis + + [BZ #10851] + * resolv/res_init.c (__res_vinit): Initialize nscount again to + one so that the default localhost nameserver record is used. + +diff --git a/resolv/res_init.c b/resolv/res_init.c +index 40dbe7d..99ef8cf 100644 +--- a/resolv/res_init.c ++++ b/resolv/res_init.c +@@ -183,7 +183,7 @@ __res_vinit(res_state statp, int preinit) { + #endif + statp->nsaddr.sin_family = AF_INET; + statp->nsaddr.sin_port = htons(NAMESERVER_PORT); +- statp->nscount = 0; ++ statp->nscount = 1; + statp->ndots = 1; + statp->pfcode = 0; + statp->_vcsock = -1; +@@ -420,7 +420,8 @@ __res_vinit(res_state statp, int preinit) { + continue; + } + } +- statp->nscount = nservall; ++ if (nservall > 0) ++ statp->nscount = nservall; + #ifdef _LIBC + if (nservall - nserv > 0) { + statp->_u._ext.nscount6 = nservall - nserv; diff --git a/glibc-nis-splitgroups.diff b/glibc-nis-splitgroups.diff index 2a2f286..34fd42b 100644 --- a/glibc-nis-splitgroups.diff +++ b/glibc-nis-splitgroups.diff @@ -87,7 +87,7 @@ Index: nis/nss_compat/compat-initgroups.c static service_user *ni; /* Type of the lookup function. */ static enum nss_status (*nss_initgroups_dyn) (const char *, gid_t, -@@ -103,7 +106,10 @@ init_nss_interface (void) +@@ -107,7 +110,10 @@ init_nss_interface (void) if (ni == NULL && __nss_database_lookup ("group_compat", NULL, "nis", &ni) >= 0) { @@ -98,4 +98,4 @@ Index: nis/nss_compat/compat-initgroups.c + nss_initgroups_dyn = __nss_lookup_function (ni, "initgroups_dyn"); nss_getgrnam_r = __nss_lookup_function (ni, "getgrnam_r"); nss_getgrgid_r = __nss_lookup_function (ni, "getgrgid_r"); - nss_getgrent_r = __nss_lookup_function (ni, "getgrent_r"); + nss_setgrent = __nss_lookup_function (ni, "setgrent"); diff --git a/glibc-nptl-2.4-nofixsyscallnr.diff b/glibc-nptl-2.4-nofixsyscallnr.diff index 7a44a4a..55dc959 100644 --- a/glibc-nptl-2.4-nofixsyscallnr.diff +++ b/glibc-nptl-2.4-nofixsyscallnr.diff @@ -2,7 +2,7 @@ Index: nptl/pthreadP.h =================================================================== --- nptl/pthreadP.h.orig +++ nptl/pthreadP.h -@@ -575,15 +575,4 @@ extern void __wait_lookup_done (void) at +@@ -577,15 +577,4 @@ extern void __wait_lookup_done (void) at # define PTHREAD_STATIC_FN_REQUIRE(name) __asm (".globl " #name); #endif diff --git a/glibc-nscd-assert.diff b/glibc-nscd-assert.diff deleted file mode 100644 index 2c35900..0000000 --- a/glibc-nscd-assert.diff +++ /dev/null @@ -1,141 +0,0 @@ -2009-08-18 Anders Johansson - - * nscd/aicache.c: Fix mixing up dataset and dataset->resp - offsets and record sizes in assert()s and response sending. - * nscd/grpcache.c: Likewise. - * nscd/hstcache.c: Likewise. - * nscd/initgrcache.c: Likewise. - * nscd/pwdcache.c: Likewise. - -Index: nscd/aicache.c -=================================================================== ---- nscd/aicache.c.orig -+++ nscd/aicache.c -@@ -453,13 +453,13 @@ addhstaiX (struct database_dyn *db, int - { - assert (db->wr_fd != -1); - assert ((char *) &dataset->resp > (char *) db->data); -- assert ((char *) &dataset->resp - (char *) db->head + total -+ assert ((char *) dataset - (char *) db->head + total - <= (sizeof (struct database_pers_head) - + db->head->module * sizeof (ref_t) - + db->head->data_size)); - ssize_t written; - written = sendfileall (fd, db->wr_fd, (char *) &dataset->resp -- - (char *) db->head, total); -+ - (char *) db->head, dataset->head.recsize); - # ifndef __ASSUME_SENDFILE - if (written == -1 && errno == ENOSYS) - goto use_write; -@@ -470,7 +470,7 @@ addhstaiX (struct database_dyn *db, int - use_write: - # endif - #endif -- writeall (fd, &dataset->resp, total); -+ writeall (fd, &dataset->resp, dataset->head.recsize); - } - - goto out; -Index: nscd/grpcache.c -=================================================================== ---- nscd/grpcache.c.orig -+++ nscd/grpcache.c -@@ -299,14 +299,14 @@ cache_addgr (struct database_dyn *db, in - { - assert (db->wr_fd != -1); - assert ((char *) &dataset->resp > (char *) db->data); -- assert ((char *) &dataset->resp - (char *) db->head -+ assert ((char *) dataset - (char *) db->head - + total - <= (sizeof (struct database_pers_head) - + db->head->module * sizeof (ref_t) - + db->head->data_size)); - written = sendfileall (fd, db->wr_fd, - (char *) &dataset->resp -- - (char *) db->head, total); -+ - (char *) db->head, dataset->head.recsize); - # ifndef __ASSUME_SENDFILE - if (written == -1 && errno == ENOSYS) - goto use_write; -@@ -317,7 +317,7 @@ cache_addgr (struct database_dyn *db, in - use_write: - # endif - #endif -- written = writeall (fd, &dataset->resp, total); -+ written = writeall (fd, &dataset->resp, dataset->head.recsize); - } - - /* Add the record to the database. But only if it has not been -Index: nscd/hstcache.c -=================================================================== ---- nscd/hstcache.c.orig -+++ nscd/hstcache.c -@@ -341,7 +341,7 @@ cache_addhst (struct database_dyn *db, i - { - assert (db->wr_fd != -1); - assert ((char *) &dataset->resp > (char *) db->data); -- assert ((char *) &dataset->resp - (char *) db->head -+ assert ((char *) dataset - (char *) db->head - + total - <= (sizeof (struct database_pers_head) - + db->head->module * sizeof (ref_t) -Index: nscd/initgrcache.c -=================================================================== ---- nscd/initgrcache.c.orig -+++ nscd/initgrcache.c -@@ -354,14 +354,14 @@ addinitgroupsX (struct database_dyn *db, - { - assert (db->wr_fd != -1); - assert ((char *) &dataset->resp > (char *) db->data); -- assert ((char *) &dataset->resp - (char *) db->head -+ assert ((char *) dataset - (char *) db->head - + total - <= (sizeof (struct database_pers_head) - + db->head->module * sizeof (ref_t) - + db->head->data_size)); - written = sendfileall (fd, db->wr_fd, - (char *) &dataset->resp -- - (char *) db->head, total); -+ - (char *) db->head, dataset->head.recsize); - # ifndef __ASSUME_SENDFILE - if (written == -1 && errno == ENOSYS) - goto use_write; -@@ -372,7 +372,7 @@ addinitgroupsX (struct database_dyn *db, - use_write: - # endif - #endif -- written = writeall (fd, &dataset->resp, total); -+ written = writeall (fd, &dataset->resp, dataset->head.recsize); - } - - -Index: nscd/pwdcache.c -=================================================================== ---- nscd/pwdcache.c.orig -+++ nscd/pwdcache.c -@@ -294,14 +294,14 @@ cache_addpw (struct database_dyn *db, in - { - assert (db->wr_fd != -1); - assert ((char *) &dataset->resp > (char *) db->data); -- assert ((char *) &dataset->resp - (char *) db->head -+ assert ((char *) dataset - (char *) db->head - + total - <= (sizeof (struct database_pers_head) - + db->head->module * sizeof (ref_t) - + db->head->data_size)); - written = sendfileall (fd, db->wr_fd, - (char *) &dataset->resp -- - (char *) db->head, total); -+ - (char *) db->head, dataset->head.recsize ); - # ifndef __ASSUME_SENDFILE - if (written == -1 && errno == ENOSYS) - goto use_write; -@@ -312,7 +312,7 @@ cache_addpw (struct database_dyn *db, in - use_write: - # endif - #endif -- written = writeall (fd, &dataset->resp, total); -+ written = writeall (fd, &dataset->resp, dataset->head.recsize); - } - - diff --git a/glibc-nscd-prune-ret.diff b/glibc-nscd-prune-ret.diff deleted file mode 100644 index 6e183ba..0000000 --- a/glibc-nscd-prune-ret.diff +++ /dev/null @@ -1,13 +0,0 @@ -Index: nscd/cache.c -=================================================================== ---- nscd/cache.c.orig -+++ nscd/cache.c -@@ -290,7 +290,7 @@ prune_cache (struct database_dyn *table, - - /* now == 0 means just check for changed files */ - if (now == (time_t)0) -- return; -+ return 0; - - /* We run through the table and find values which are not valid anymore. - diff --git a/glibc-uio-cell.diff b/glibc-uio-cell.diff new file mode 100644 index 0000000..6bbbfe3 --- /dev/null +++ b/glibc-uio-cell.diff @@ -0,0 +1,26 @@ +2009-11-06 Petr Baudis + + * include/sys/uio.h: Change __vector to __iovec to avoid clash + with altivec. + +diff --git a/include/sys/uio.h b/include/sys/uio.h +index 8c2b016..bfaec59 100644 +--- a/include/sys/uio.h ++++ b/include/sys/uio.h +@@ -2,12 +2,12 @@ + #include + + /* Now define the internal interfaces. */ +-extern ssize_t __readv (int __fd, __const struct iovec *__vector, ++extern ssize_t __readv (int __fd, __const struct iovec *__iovec, + int __count); +-extern ssize_t __libc_readv (int __fd, __const struct iovec *__vector, ++extern ssize_t __libc_readv (int __fd, __const struct iovec *__iovec, + int __count); +-extern ssize_t __writev (int __fd, __const struct iovec *__vector, ++extern ssize_t __writev (int __fd, __const struct iovec *__iovec, + int __count); +-extern ssize_t __libc_writev (int __fd, __const struct iovec *__vector, ++extern ssize_t __libc_writev (int __fd, __const struct iovec *__iovec, + int __count); + #endif diff --git a/glibc-utmp-timeout-raise.diff b/glibc-utmp-timeout-raise.diff deleted file mode 100644 index 24f90fb..0000000 --- a/glibc-utmp-timeout-raise.diff +++ /dev/null @@ -1,18 +0,0 @@ -On extremely loaded systems, the default timeout may not be enough and some -entries may not appear in the utmp log. With 30s login delay, the system -should still stay usable for repair in case the utmp locking somehow breaks -down. - -Index: login/utmp_file.c -=================================================================== ---- login/utmp_file.c.orig -+++ login/utmp_file.c -@@ -45,7 +45,7 @@ static struct utmp last_entry; - - /* Locking timeout. */ - #ifndef TIMEOUT --# define TIMEOUT 1 -+# define TIMEOUT 30 - #endif - - /* Do-nothing handler for locking timeout. */ diff --git a/glibc.changes b/glibc.changes index 084a9e8..eb3a7c7 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,117 @@ +------------------------------------------------------------------- +Mon Dec 14 23:49:33 CET 2009 - jengelh@medozas.de + +- add baselibs.conf as a source + +------------------------------------------------------------------- +Fri Dec 11 13:13:01 CET 2009 - jengelh@medozas.de + +- libnldbl_nonshared is only built for sparc32 + +------------------------------------------------------------------- +Tue Dec 8 20:50:26 CET 2009 - jengelh@medozas.de + +- package libnldbl_nonshared for SPARC + +------------------------------------------------------------------- +Fri Nov 20 01:55:16 CET 2009 - pbaudis@suse.cz + +- Upgrade to latest release/2.11/master - glibc-2.11-1bc1954c7357: + - This snapshot is slated to become 2.11.1 if all goes well + - Mix of fixes for various recently found out issues +- Retired patches: + glibc-ifunc-dlsym-fixup.diff +- [IA64] Fix memchr() on mmap(MAP_SHARED) boundary [fix lighttpd crashes] +- Again use 127.0.0.1 as default nameserver in case of empty + /etc/resolv.conf [bnc#473308] + +------------------------------------------------------------------- +Thu Nov 19 13:15:41 CET 2009 - pbaudis@suse.cz + +- Add 623 and 664 to /etc/bindresvport.blacklist to fix problems with + port conflict on some IPMI network cards [bnc#513961] +- Allow external additions to /usr/share/locale/locale.alias and + /usr/lib/gconv/gconv-modules, required for the SAP-locales package. +- Add delimiter in front of external additions to locale/gconv lists +- Remove AMD-provided strlen(), upstream is faster. + +- Keep .symtab and .strtab for all glibc-related .so libraries [FATE#307090] + [bnc#545721] +- [ppc,ppc64] Enable optimized builds for power7; no separate power4, power5 + builds are generated anymore, instead default glibc is built for power4 + at least, tuned for power5 execution [FATE#307021] +- Large clean-up of the specfile + +------------------------------------------------------------------- +Fri Nov 13 22:47:47 CET 2009 - pbaudis@suse.cz + +- Upgrade to Git HEAD as of 20091105 - glibc-2.11-13f6812ffb5b: + * New interfaces: execvpe, pthread_sigqueue, mkstemps, mkstemps64, mkostemps, + mkostemps64 + Implemented by Ulrich Drepper. + + * Checking version of longjmp added that fails if an uninitialized stack + frame would be created. Implemented by Ulrich Drepper. + + * STT_GNU_IFUNC is now supported in static executables. + Implemented by H.J. Lu. + + * STT_GNU_IFUNC implemented for PPC by Alan Modra. + + * New optimized string functions for x86-64: strstr, strcasestr, memcmp, + strcspn, strpbrk, strspn, strcpy, stpcpy, strncpy, strcmp (SSE2, SSE4.2), + strncmp (SSE2, SSE4.2), strchr (SSE4.2), strrchr (SSE4.2). + Contributed by H.J. Lu. + + strlen, rawmemchr, strcmp (SSSE3), strncmp (SSSE3). + Implemented by Ulrich Drepper. + + * New optimized string functions for x86: strlen, strcspn, strspn, strpbrk, + strstr, strcasestr. + Contributed by H.J. Lu. + + * Support for fma instruction in AVX on x86-64. + Implemented by H.J. Lu and Ulrich Drepper. + + * AVX support in x86-64 auditing support in ld.so. + Implemented by H.J. Lu. + + * STB_GNU_UNIQUE support added. + Implemented by Ulrich Drepper. + + * Implement second fallback mode for optimized DNS lookup for even more + broken environments. If two requests from the same port are not + handled correctly close the socket and open a new one before sending + the second request. The 'single-request-reopen' option in /etc/resolv.conf + can be used to select this mode right away, instead of rediscovering the + necessity is every process again. + Implemented by Ulrich Drepper. + + * New resolver flag RES_USE_DNSSEC to enable use of verified lookup. + Implemented by Adam Tkac. + + * Optimized iconv conversions for S390x. + Implemented by Andreas Krebbel. + + * Using condvars with PI mutexes is now more efficient due to kernel + support for requeueing to PI futexes. NPTL support added for x86-64. + Implemented by Ulrich Drepper. + + * New locales: ps_AF, my_MM +- Retired patches: + glibc-utmp-timeout-raise.diff + glibc-nscd-assert.diff + glibc-2.10-mcheck-free-race.diff + glibc-nscd-prune-ret.diff +- Made ifunc compile on IA64 using patch by H.J.Lu +- Fixed compilation on PPC Cell +- Lowered utmp locking timeout from 30s to 10s to be compatible + with upstream +- Allow external additions to /usr/share/locale/locale.alias and + /usr/lib/gconv/gconv-modules, required for the SAP-locales package. +- Remove AMD-provided strlen(), upstream is faster. +- ARM is currently non-functional + ------------------------------------------------------------------- Fri Nov 13 20:18:27 CET 2009 - pbaudis@suse.cz diff --git a/glibc.spec b/glibc.spec index f0094ed..7e7ae16 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,7 +1,7 @@ # -# spec file for package glibc (Version 2.10.1) +# spec file for package glibc (Version 2.11) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,35 +27,20 @@ BuildRequires: libselinux-devel %define disable_assert 0 %define enable_stackguard_randomization 1 %ifarch ppc ppc64 -%define optimize_power 1 + %define optimize_power 1 + %define powerpc_optimize_base power4 + %define powerpc_optimize_tune power5 + %define powerpc_optimize_cpu_power6 1 + %define powerpc_optimize_cpu_power7 1 + %define powerpc_optimize_cpu_cell 1 %else -%define optimize_power 0 -%endif -%define powerpc_optimize_base_cpu_power4 0 -%if %{optimize_power} -%define powerpc_optimize_cpu_power4 1 -%ifarch ppc64 -%define powerpc_optimize_base_cpu_power4 1 -%define powerpc_optimize_cpu_power4 0 -%endif -%ifarch ppc -%define powerpc_optimize_cpu_power5 1 -%else -%define powerpc_optimize_cpu_power5 0 -%endif -%define powerpc_optimize_cpu_power5_compile 0 -%define powerpc_optimize_cpu_power6 1 -%define powerpc_optimize_cpu_power7 0 -%define powerpc_optimize_cpu_cell 1 -%else -%define powerpc_optimize_cpu_power4 0 -%define powerpc_optimize_cpu_power5 0 -%define powerpc_optimize_cpu_power6 0 -%define powerpc_optimize_cpu_power7 0 -%define powerpc_optimize_cpu_cell 0 -# optimize_power -%endif -License: BSD 3-clause (or similar) ; GPL v2 or later ; LGPL v2.1 or later + %define optimize_power 0 + %define powerpc_optimize_base 0 + %define powerpc_optimize_cpu_power6 0 + %define powerpc_optimize_cpu_power7 0 + %define powerpc_optimize_cpu_cell 0 +%endif # ppc, ppc64 +License: BSD3c(or similar) ; GPLv2+ ; LGPLv2.1+ Summary: Standard Shared Libraries (from the GNU C Library) Group: System/Libraries Obsoletes: ngpt <= 2.2.2 ngpt-devel <= 2.2.2 @@ -69,15 +54,13 @@ Obsoletes: glibc-32bit %endif Provides: rtld(GNU_HASH) AutoReqProv: on -Version: 2.10.1 -Release: 10 +Version: 2.11 +Release: 1 Url: http://www.gnu.org/software/libc/libc.html PreReq: filesystem BuildRoot: %{_tmppath}/%{name}-%{version}-build -# The glibc source comes from http://repo.or.cz/w/glibc/pb-stable.git -# glibc-2.10-branch. -Source: glibc-%{version}-44dbdf3777.tar.bz2 -Source2: glibc-ports-%{version}-2b2b217196.tar.bz2 +Source: glibc-%{version}-1bc1954c7357.tar.bz2 +Source2: glibc-ports-2.10.1-2b2b217196.tar.bz2 Source3: noversion.tar.bz2 Source4: manpages.tar.bz2 Source5: usr.sbin.nscd @@ -88,8 +71,9 @@ Source11: ctype_b.c Source12: glibc_post_upgrade.c Source14: powerpc-cpu.tar.bz2 Source15: glibc.rpmlintrc +Source16: baselibs.conf %if %_target_cpu == "i686" -# We need to avoid to have only the srv rpm from i686 on the media, +# We need to avoid to have only the src rpm from i686 on the media, # since it does not work on other architectures. NoSource: 0 %endif @@ -129,7 +113,6 @@ Patch33: getaddrinfo-ipv6-sanity.diff Patch35: ppc-atomic.diff Patch36: glibc-2.8-clone.diff Patch37: glibc-nss-deepbind.diff -Patch38: glibc-nscd-prune-ret.diff Patch39: glibc-compiled-binaries.diff Patch40: glibc-selinux.diff Patch41: glibc-check-native-missing-include.diff @@ -137,11 +120,11 @@ Patch42: glibc-no-unwind-tables.diff Patch43: glibc-2.10-nscd-nostack.diff Patch44: glibc-cpusetsize.diff Patch45: glibc-nis-splitgroups.diff -Patch46: glibc-2.10-mcheck-free-race.diff -Patch47: glibc-2.10.99-ia64-include.diff -Patch48: glibc-utmp-timeout-raise.diff -Patch49: glibc-nscd-assert.diff -Patch50: libm-x86-64-exceptions.diff +Patch46: glibc-2.10.99-ia64-include.diff +Patch47: libm-x86-64-exceptions.diff +Patch48: glibc-uio-cell.diff +Patch49: glibc-ia64-memchr.diff +Patch50: glibc-nameserver-localhost.diff Patch500: ARM_glibc-2.10.1-local-eabi-wchar.diff Patch501: ARM_glibc-2.10.1-local-hwcap-updates.diff Patch502: ARM_glibc-2.10.1-local-lowlevellock.diff @@ -156,7 +139,7 @@ without these libraries. %package info -License: GPL v2 or later +License: GPLv2+ Summary: Info Files for the GNU C Library Group: Documentation/Other PreReq: %{install_info_prereq} @@ -170,7 +153,7 @@ complete and is partially out of date. %package html -License: GPL v2 or later ; LGPL v2.1 or later +License: GPLv2+ ; LGPLv2.1+ Summary: HTML Documentation for the GNU C Library Group: Documentation/HTML AutoReqProv: on @@ -183,7 +166,7 @@ partially out of date. %package i18ndata -License: LGPL v2.1 or later +License: LGPLv2.1+ Summary: Database Sources for 'locale' Group: System/Libraries AutoReqProv: on @@ -197,7 +180,7 @@ created. %package locale -License: GPL v2 or later ; LGPL v2.1 or later +License: GPLv2+ ; LGPLv2.1+ Summary: Locale Data for Localized Programs Group: System/Libraries Requires: glibc = %{version} @@ -216,7 +199,7 @@ Locale data for the internationalisation features of the GNU C library. %package -n nscd -License: LGPL v2.1 or later +License: LGPLv2.1+ Summary: Name Service Caching Daemon Group: System/Daemons Provides: glibc:/usr/sbin/nscd aaa_base:/etc/init.d/nscd @@ -229,7 +212,7 @@ performance with NIS, NIS+, and LDAP. %package profile -License: LGPL v2.1 or later +License: LGPLv2.1+ Summary: Libc Profiling and Debugging Versions Group: Development/Libraries/C and C++ Requires: glibc = %{version} @@ -249,7 +232,7 @@ necessary for profiling and debugging. %package devel -License: BSD 3-clause (or similar) ; GPL v2 or later ; LGPL v2.1 or later +License: BSD3c(or similar) ; GPLv2+ ; LGPLv2.1+ Summary: Include Files and Libraries Mandatory for Development Group: Development/Libraries/C and C++ Obsoletes: epoll = 1.0 @@ -272,7 +255,7 @@ library. %package obsolete -License: BSD 3-clause (or similar) ; GPL v2 or later ; LGPL v2.1 or later +License: BSD3c(or similar) ; GPLv2+ ; LGPLv2.1+ Summary: Obsolete Shared Libraries from the GNU C Library Group: System/Libraries Requires: glibc = %{version} @@ -293,6 +276,8 @@ versions of your software. %prep %ifarch %arm armv5tel armv7l # add glibc-ports for arm +# this is CURRENTLY BROKEN; ARM-interested contributors need to provide +# new tested glibc-ports source %setup -n glibc-%{version} -q -a 2 -a 3 -a 4 -a 14 %else # any other leave out ports @@ -336,7 +321,6 @@ rm sysdeps/x86_64/fpu/s_sincos.S %patch35 %patch36 %patch37 -%patch38 %patch39 %patch40 %patch41 @@ -346,9 +330,9 @@ rm sysdeps/x86_64/fpu/s_sincos.S %patch45 %patch46 %patch47 -%patch48 -%patch49 -%patch50 +%patch48 -p1 +%patch49 -p1 +%patch50 -p1 %ifarch %arm armv5tel armv7l %patch500 %patch501 @@ -374,12 +358,17 @@ rm sysdeps/x86_64/fpu/s_sincos.S # rm -fv sysdeps/powerpc/powerpc32/power4/hp-timing.c sysdeps/powerpc/powerpc32/power4/hp-timing.h find . -name configure | xargs touch +####################################################################### +### +### BUILD +### +####################################################################### %build if [ -x /bin/uname.bin ]; then - /bin/uname.bin -a + /bin/uname.bin -a else - uname -a + uname -a fi uptime || : ulimit -a @@ -400,312 +389,242 @@ PARALLEL="%{?jobs:-j%jobs}" #now overwrite for some architectures # %ifarch sparc64 -BuildFlags="-O2 -mcpu=ultrasparc -mvis -fcall-used-g6" -BuildCC="gcc -m64" -BuildCCplus="$BuildCCplus -m64" + BuildFlags="-O2 -mcpu=ultrasparc -mvis -fcall-used-g6" + BuildCC="gcc -m64" + BuildCCplus="$BuildCCplus -m64" %endif %ifarch sparc -BuildFlags="$BuildFlags -fcall-used-g6" -BuildCC="gcc -m32" -BuildCCplus="$BuildCCplus -m32" + BuildFlags="$BuildFlags -fcall-used-g6" + BuildCC="gcc -m32" + BuildCCplus="$BuildCCplus -m32" %endif %ifarch sparcv9 -BuildFlags="$BuildFlags -mcpu=ultrasparc -fcall-used-g6" -BuildCC="gcc -m32" -BuildCCplus="$BuildCCplus -m32" + BuildFlags="$BuildFlags -mcpu=ultrasparc -fcall-used-g6" + BuildCC="gcc -m32" + BuildCCplus="$BuildCCplus -m32" %endif %ifarch alphaev6 -BuildFlags="-mcpu=ev6" + BuildFlags="-mcpu=ev6" %endif %ifarch ppc ppc64 -BuildFlags="$(echo $BuildFlags | sed 's#-mminimal-toc##')" + BuildFlags="$(echo $BuildFlags | sed 's#-mminimal-toc##')" %endif %ifarch ppc64 -BuildCC="$BuildCC -m64" -BuildCCplus="$BuildCCplus -m64" + BuildCC="$BuildCC -m64" + BuildCCplus="$BuildCCplus -m64" %endif %ifarch hppa -BuildFlags="$BuildFlags -mpa-risc-1-1 -fstrict-aliasing" + BuildFlags="$BuildFlags -mpa-risc-1-1 -fstrict-aliasing" %endif %ifarch %ix86 x86_64 -BuildFlags="$BuildFlags -mno-tls-direct-seg-refs" + BuildFlags="$BuildFlags -mno-tls-direct-seg-refs" %endif # Add flags for all plattforms except AXP %ifnarch alpha -BuildFlags="$BuildFlags -g" + BuildFlags="$BuildFlags -g" %endif %if %{disable_assert} -BuildFlags="$BuildFlags -DNDEBUG=1" + BuildFlags="$BuildFlags -DNDEBUG=1" %endif %ifarch %ix86 -add_ons=$add_ons,noversion + add_ons=$add_ons,noversion %endif %ifarch %arm armv5tel armv7l -add_ons=$add_ons,ports -BuildFlags="-march=armv5te -O2 -Wall" -# fails to build otherwise - need to recheck and fix -%define enable_stackguard_randomization 0 + add_ons=$add_ons,ports + BuildFlags="-march=armv5te -O2 -Wall" + # fails to build otherwise - need to recheck and fix + %define enable_stackguard_randomization 0 %endif configure_and_build_glibc() { - local cflags="$1" - local addons="$2" - shift 2 + local dirname="$1"; shift + local cflags="$1"; shift + local addons="$1"; shift + mkdir "cc-$dirname" + cd "cc-$dirname" CFLAGS="$cflags" CC="$BuildCC" CXX="$BuildCCplus" ../configure \ - --prefix=%{_prefix} \ - --libexecdir=%{_libdir} --infodir=%{_infodir} \ - --enable-add-ons=nptl$addons --without-cvs --enable-profile \ - "$@" \ + --prefix=%{_prefix} \ + --libexecdir=%{_libdir} --infodir=%{_infodir} \ + --enable-add-ons=nptl$addons --without-cvs --enable-profile \ + "$@" \ %if %{enable_stackguard_randomization} - --enable-stackguard-randomization \ + --enable-stackguard-randomization \ %endif %ifarch %arm armv5tel armv7l - --build=%{_target_cpu}-suse-linux-gnueabi \ + --build=%{_target_cpu}-suse-linux-gnueabi \ %else - --build=%{_target_cpu}-suse-linux \ + --build=%{_target_cpu}-suse-linux \ %endif - --with-tls --with-__thread --enable-kernel=2.6.4 -make $PARALLEL + --with-tls --with-__thread --enable-kernel=2.6.4 + make $PARALLEL + cd .. } -# -# Build nptl -# -mkdir cc-nptl -cd cc-nptl -configure_and_build_glibc "$BuildFlags" \ -%if %{powerpc_optimize_base_cpu_power4} -"$add_ons,powerpc-cpu" --with-cpu=power4 +%if !%{optimize_power} + # + # Build base glibc + # + configure_and_build_glibc base "$BuildFlags" "$add_ons" %else -"$add_ons" -%endif -cd .. -%if %{optimize_power} -# -# Build POWER optimized -# -for pcpu in \ -%if %{powerpc_optimize_cpu_power4} -power4 \ -%endif -%if %{powerpc_optimize_cpu_power5} -%if %{powerpc_optimize_cpu_power5_compile} -power5 \ -%endif -%endif -%if %{powerpc_optimize_cpu_power6} -power6 \ -%endif -%if %{powerpc_optimize_cpu_power7} -power7 \ -%endif -; do -mkdir cc-$pcpu -cd cc-$pcpu -configure_and_build_glibc "$BuildFlags -mcpu=$pcpu" "$add_ons,powerpc-cpu" --with-cpu=$pcpu --disable-runbinaries -cd .. -done -%if %{powerpc_optimize_cpu_cell} -mkdir cc-ppc-cell-be -cd cc-ppc-cell-be -configure_and_build_glibc "$BuildFlags -mcpu=cell" "$add_ons" --disable-runbinaries -cd .. -%endif -# optimize_power -%endif + # + # Build POWER-optimized glibc + # + # First, base build: + pBuildFlags="$BuildFlags -mcpu=%{powerpc_optimize_base} -mtune=%{powerpc_optimize_tune}" + configure_and_build_glibc base "$pBuildFlags" "$add_ons,powerpc-cpu" --with-cpu=%{powerpc_optimize_base} + # Then other power variants: + for pcpu in \ + %if %{powerpc_optimize_cpu_power6} + power6 \ + %endif + %if %{powerpc_optimize_cpu_power7} + power7 \ + %endif + ; do + configure_and_build_glibc $pcpu "$BuildFlags -mcpu=$pcpu" "$add_ons,powerpc-cpu" \ + --with-cpu=$pcpu --disable-runbinaries + done + # Eventually, special Cell variant: + %if %{powerpc_optimize_cpu_cell} + configure_and_build_glibc ppc-cell-be "$BuildFlags -mcpu=cell" "$add_ons" --disable-runbinaries + %endif +%endif # optimize_power # # Build html documentation # -make -C cc-nptl html +make -C cc-base html # # Build glibc_post_upgrade binary # $BuildCC -static -Os -g $RPM_SOURCE_DIR/glibc_post_upgrade.c -o glibc_post_upgrade \ - -Lcc-nptl -Bcc-nptl/csu \ + -Lcc-base -Bcc-base/csu \ '-DREMOVE_TLS_DIRS' \ %ifarch ppc ppc64 -%if !%{powerpc_optimize_cpu_power4} - '-DREMOVE_PPC_OPTIMIZE_POWER4' \ -%endif -%if !%{powerpc_optimize_cpu_power5} - '-DREMOVE_PPC_OPTIMIZE_POWER5' \ -%endif -%if !%{powerpc_optimize_cpu_power6} + %if !%{powerpc_optimize_cpu_power6} '-DREMOVE_PPC_OPTIMIZE_POWER6' \ -%endif -%if !%{powerpc_optimize_cpu_power7} + %endif + %if !%{powerpc_optimize_cpu_power7} '-DREMOVE_PPC_OPTIMIZE_POWER7' \ -%endif -%if !%{powerpc_optimize_cpu_cell} + %endif + %if !%{powerpc_optimize_cpu_cell} '-DREMOVE_PPC_OPTIMIZE_CELL' \ -%endif + %endif %endif '-DLIBDIR="/%{_lib}"' '-DGCONV_MODULES_DIR="%{_prefix}/%{_lib}/gconv"' +####################################################################### +### +### CHECK +### +####################################################################### %check %if %{run_testsuite} -# Increase timeout -export TIMEOUTFACTOR=16 -%ifarch alpha %ix86 ppc ppc64 ia64 s390 s390x x86_64 -# ix86: tst-cputimer? fails -# ia64: tst-timer4 fails -# ppc64: tst-pselect, ftwtest fails -# s390,s390x: tst-timer* fails - make -C cc-nptl -k check || echo make check failed -%else - make -C cc-nptl check + # Increase timeout + export TIMEOUTFACTOR=16 + %ifarch alpha %ix86 ppc ppc64 ia64 s390 s390x x86_64 + # ix86: tst-cputimer? fails + # ia64: tst-timer4 fails + # ppc64: tst-pselect, ftwtest fails + # s390,s390x: tst-timer* fails + make -C cc-base -k check || echo make check failed + %else + make -C cc-base check + %endif %endif -%endif -make -C cc-nptl check-abi || echo check-abi failed +make -C cc-base check-abi || echo check-abi failed +####################################################################### +### +### INSTALL +### +####################################################################### %install # We don't want to strip the .symtab from our libraries in find-debuginfo.sh, -# at least not from libpthread.so.* because it is used by libthread_db to find +# certainly not from libpthread.so.* because it is used by libthread_db to find # some non-exported symbols in order to detect if threading support # should be enabled. These symbols are _not_ exported, and we can't easily # export them retroactively without changing the ABI. So we have to # continue to "export" them via .symtab, instead of .dynsym :-( -export STRIP_KEEP_SYMTAB=libpthread* +# But we also want to keep .symtab and .strtab of other libraries since some +# debugging tools currently require these sections directly inside the main +# files - specifically valgrind and PurifyPlus. +export STRIP_KEEP_SYMTAB=*.so* # Make sure we will create the gconv-modules.cache mkdir -p $RPM_BUILD_ROOT%{_libdir}/gconv touch $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache +# Install base glibc # Do not install in parallel, timezone Makefile will fail -make install_root=$RPM_BUILD_ROOT install -C cc-nptl +make install_root=$RPM_BUILD_ROOT install -C cc-base +# Install power-optimized glibc %if %{optimize_power} -# run ldconfig to create the library symlinks -# do not use the new ldconfig from the build directory because -# it may contain instructions not suitable for the cpu on the builhost -my_ldconfig=/sbin/ldconfig -# -for pcpu in \ -%if %{powerpc_optimize_cpu_power4} -power4 \ -%endif -%if %{powerpc_optimize_cpu_power5} -%if %{powerpc_optimize_cpu_power5_compile} -power5 \ -%endif -%endif -%if %{powerpc_optimize_cpu_power6} -power6 \ -%endif -%if %{powerpc_optimize_cpu_power7} -power7 \ -%endif -%if %{powerpc_optimize_cpu_cell} -ppc-cell-be \ -%endif -; do - make install_root=${RPM_BUILD_ROOT}/$pcpu install -C cc-$pcpu - mkdir -p $RPM_BUILD_ROOT/%{_lib}/$pcpu - for i in libc-%{version} libm-%{version} libpthread-%{version} libthread_db-1.0 librt-%{version} - do - mv $RPM_BUILD_ROOT/$pcpu/%{_lib}/$i.so $RPM_BUILD_ROOT/%{_lib}/$pcpu + # run ldconfig to create the library symlinks + # do not use the new ldconfig from the build directory because + # it may contain instructions not suitable for the cpu on the builhost + my_ldconfig=/sbin/ldconfig + for pcpu in \ + %if %{powerpc_optimize_cpu_power6} + power6 \ + %endif + %if %{powerpc_optimize_cpu_power7} + power7 \ + %endif + %if %{powerpc_optimize_cpu_cell} + ppc-cell-be \ + %endif + ; do + make install_root=${RPM_BUILD_ROOT}/$pcpu install -C cc-$pcpu + mkdir -p $RPM_BUILD_ROOT/%{_lib}/$pcpu + for i in libc-%{version} libm-%{version} libpthread-%{version} libthread_db-1.0 librt-%{version}; do + mv $RPM_BUILD_ROOT/$pcpu/%{_lib}/$i.so $RPM_BUILD_ROOT/%{_lib}/$pcpu + done + $my_ldconfig -n $RPM_BUILD_ROOT/%{_lib}/$pcpu/ + rm -rf $RPM_BUILD_ROOT/$pcpu done - $my_ldconfig -n $RPM_BUILD_ROOT/%{_lib}/$pcpu/ - rm -rf $RPM_BUILD_ROOT/$pcpu -done -%if %{powerpc_optimize_cpu_power4} -# ppc970 is compatible with power4, unless compiled with altivec support -# doing a symlink doesnt work, ldconfig follows them and accepts only the first real dir -if test -d $RPM_BUILD_ROOT/%{_lib}/power4 -then - mkdir -p $RPM_BUILD_ROOT/%{_lib}/ppc970 - for i in $RPM_BUILD_ROOT/%{_lib}/power4/*.so ; do - b=`basename $i` - ln -vs ../power4/$b \ - $RPM_BUILD_ROOT/%{_lib}/ppc970/$b - done - $my_ldconfig -n $RPM_BUILD_ROOT/%{_lib}/ppc970/ -fi -%endif -%if %{powerpc_optimize_cpu_power5} -# power5+ is compatible with power5 (adds only a few floating point instructions) -# doing a symlink doesnt work, ldconfig follows them and accepts only the first real dir -# symlink to power4 directory, which is built only on ppc32 -%if %{powerpc_optimize_cpu_power5_compile} -if test -d $RPM_BUILD_ROOT/%{_lib}/power5 -then - mkdir -p $RPM_BUILD_ROOT/%{_lib}/power5+ - for i in $RPM_BUILD_ROOT/%{_lib}/power5/*.so ; do - b=`basename $i` - ln -vs ../power5/$b \ - $RPM_BUILD_ROOT/%{_lib}/power5+/$b - done - $my_ldconfig -n $RPM_BUILD_ROOT/%{_lib}/power5+/ -fi -%else -if test -d $RPM_BUILD_ROOT/%{_lib}/power4 -then - mkdir -p $RPM_BUILD_ROOT/%{_lib}/power5 - mkdir -p $RPM_BUILD_ROOT/%{_lib}/power5+ - for i in $RPM_BUILD_ROOT/%{_lib}/power4/*.so ; do - b=`basename $i` - ln -vs ../power4/$b \ - $RPM_BUILD_ROOT/%{_lib}/power5/$b - ln -vs ../power4/$b \ - $RPM_BUILD_ROOT/%{_lib}/power5+/$b - done - $my_ldconfig -n $RPM_BUILD_ROOT/%{_lib}/power5/ - $my_ldconfig -n $RPM_BUILD_ROOT/%{_lib}/power5+/ -fi -%endif -%endif -%if %{powerpc_optimize_cpu_power6} -# power6 is compatible with power6x -# doing a symlink doesnt work, ldconfig follows them and accepts only the first real dir -if test -d $RPM_BUILD_ROOT/%{_lib}/power6 -then - mkdir -p $RPM_BUILD_ROOT/%{_lib}/power6x - for i in $RPM_BUILD_ROOT/%{_lib}/power6/*.so ; do - b=`basename $i` - ln -vs ../power6/$b \ - $RPM_BUILD_ROOT/%{_lib}/power6x/$b - done - $my_ldconfig -n $RPM_BUILD_ROOT/%{_lib}/power6x/ -fi -%endif -# optimize_power -%endif + %if %{powerpc_optimize_cpu_power6} + # power6 is compatible with power6x + # doing a symlink doesnt work, ldconfig follows them and accepts only the first real dir + if test -d $RPM_BUILD_ROOT/%{_lib}/power6; then + mkdir -p $RPM_BUILD_ROOT/%{_lib}/power6x + for i in $RPM_BUILD_ROOT/%{_lib}/power6/*.so; do + b=`basename $i` + ln -vs ../power6/$b $RPM_BUILD_ROOT/%{_lib}/power6x/$b + done + $my_ldconfig -n $RPM_BUILD_ROOT/%{_lib}/power6x/ + fi + %endif +%endif # optimize_power +# Install locales %if %{build_locales} -# Do not install locales in parallel! -cd cc-nptl -make install_root=$RPM_BUILD_ROOT install-locales -C ../localedata objdir=`pwd` -cd .. + # Do not install locales in parallel! + cd cc-base + make install_root=$RPM_BUILD_ROOT install-locales -C ../localedata objdir=`pwd` + cd .. %endif -#create file list for glibc-locale package +# Create file list for glibc-locale package %{find_lang} libc -cd manpages; make install_root=$RPM_BUILD_ROOT install; cd .. +# Prepare obsolete/, used only on some architectures: export RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_lib}/obsolete -# # NPTL is not usable outside of glibc, so include # the generic one (RH#162634) -# cp -av bits/stdio-lock.h $RPM_BUILD_ROOT%{_prefix}/include/bits/stdio-lock.h %ifarch s390x -# -# s390x is different ... -# -mkdir $RPM_BUILD_ROOT/lib -ln -sf ../%{_lib}/ld-%{version}.so $RPM_BUILD_ROOT/lib/ld64.so.1 + # s390x is different ... + mkdir $RPM_BUILD_ROOT/lib + ln -sf ../%{_lib}/ld-%{version}.so $RPM_BUILD_ROOT/lib/ld64.so.1 %endif -# -# Install glibc_post_upgrade tool -# +# Miscelanna: install -m 0700 glibc_post_upgrade $RPM_BUILD_ROOT%{_sbindir} -# -# Install the mapv4v6* header files -# +install -m 644 $RPM_SOURCE_DIR/bindresvport.blacklist $RPM_BUILD_ROOT/etc +install -m 644 $RPM_SOURCE_DIR/nsswitch.conf $RPM_BUILD_ROOT/etc +install -m 644 posix/gai.conf $RPM_BUILD_ROOT/etc +mkdir -p $RPM_BUILD_ROOT/etc/default +install -m 644 nis/nss $RPM_BUILD_ROOT/etc/default/ mkdir -p $RPM_BUILD_ROOT/usr/include/resolv install -m 0644 resolv/mapv4v6addr.h $RPM_BUILD_ROOT/usr/include/resolv/ install -m 0644 resolv/mapv4v6hostent.h $RPM_BUILD_ROOT/usr/include/resolv/ -# -# glibc documentation in HTML -# mkdir -p $RPM_BUILD_ROOT/usr/share/doc/glibc cp -p manual/libc/*.html $RPM_BUILD_ROOT/usr/share/doc/glibc -# -# Install nscd tools -# +cd manpages; make install_root=$RPM_BUILD_ROOT install; cd .. +# nscd tools: cp nscd/nscd.conf $RPM_BUILD_ROOT/etc mkdir -p $RPM_BUILD_ROOT/etc/apparmor.d cp $RPM_SOURCE_DIR/usr.sbin.nscd $RPM_BUILD_ROOT/etc/apparmor.d @@ -715,8 +634,6 @@ ln -sf /etc/init.d/nscd $RPM_BUILD_ROOT/usr/sbin/rcnscd mkdir -p $RPM_BUILD_ROOT/var/run/nscd touch $RPM_BUILD_ROOT/var/run/nscd/{passwd,group,hosts} touch $RPM_BUILD_ROOT/var/run/nscd/{socket,nscd.pid} -# Install bindresvport.blacklist -install -m 644 $RPM_SOURCE_DIR/bindresvport.blacklist $RPM_BUILD_ROOT/etc # # Create ld.so.conf # @@ -753,44 +670,31 @@ include /etc/ld.so.conf.d/*.conf EOF # Add ldconfig cache directory for directory ownership mkdir -p $RPM_BUILD_ROOT/var/cache/ldconfig -# -# install nsswitch.conf -# -install -m 644 $RPM_SOURCE_DIR/nsswitch.conf $RPM_BUILD_ROOT/etc -# -# install /etc/default/nss -# -mkdir -p $RPM_BUILD_ROOT/etc/default -install -m 644 nis/nss $RPM_BUILD_ROOT/etc/default/ -# -# install /etc/gai.conf -# -install -m 644 posix/gai.conf $RPM_BUILD_ROOT/etc -%ifarch %ix86 -# -# Remove static library and .so symlink, not needed -rm -f $RPM_BUILD_ROOT%{_libdir}/libNoVersion* -# Move to lib/obsolete -mkdir -p $RPM_BUILD_ROOT/%{_lib}/obsolete/noversion -mv -v $RPM_BUILD_ROOT/%{_lib}/libNoVersion* $RPM_BUILD_ROOT/%{_lib}/obsolete/noversion/ -%endif -# -# Don't look at it! We don't wish a /bin/sh requires -chmod 644 $RPM_BUILD_ROOT/usr/bin/ldd -# -# Remove not needed files from BuildRoot -# Also, we now take timezone stuff from a separate package -# create empty cache file +# Empty the ld.so.cache: rm -f $RPM_BUILD_ROOT/etc/ld.so.cache touch $RPM_BUILD_ROOT/etc/ld.so.cache +# libNoVersion belongs only to glibc-obsolete: +%ifarch %ix86 + rm -f $RPM_BUILD_ROOT%{_libdir}/libNoVersion* + mkdir -p $RPM_BUILD_ROOT/%{_lib}/obsolete/noversion + mv -v $RPM_BUILD_ROOT/%{_lib}/libNoVersion* $RPM_BUILD_ROOT/%{_lib}/obsolete/noversion/ +%endif +# Don't look at ldd! We don't wish a /bin/sh requires +chmod 644 $RPM_BUILD_ROOT/usr/bin/ldd +# Remove timezone data, now coming in standalone package: for i in sbin/sln usr/bin/tzselect usr/sbin/zic usr/sbin/zdump etc/localtime; do rm -f $RPM_BUILD_ROOT/$i done rm -rf $RPM_BUILD_ROOT/usr/share/zoneinfo -# remove the buildflags tracking section and the build-id +# Remove the buildflags tracking section and the build-id for o in $RPM_BUILD_ROOT/%{_libdir}/crt[1in].o $RPM_BUILD_ROOT/%{_libdir}/lib*_nonshared.a; do - objcopy -R ".comment.SUSE.OPTs" -R ".note.gnu.build-id" $o + objcopy -R ".comment.SUSE.OPTs" -R ".note.gnu.build-id" $o done +####################################################################### +### +### ... +### +####################################################################### %clean rm -rf $RPM_BUILD_ROOT @@ -799,6 +703,13 @@ rm -rf $RPM_BUILD_ROOT %postun -p /sbin/ldconfig +%post locale +for l in /usr/share/locale/locale.alias %{_libdir}/gconv/gconv-modules; do + [ -d "$l.d" ] || continue + echo "###X# The following is autogenerated from extra files in the .d directory:" >>"$l" + cat "$l.d"/* >>"$l" +done + %post info %install_info --info-dir=%{_infodir} %{_infodir}/libc.info.gz @@ -815,9 +726,12 @@ rm -rf $RPM_BUILD_ROOT %restart_on_update nscd %insserv_cleanup exit 0 -# +####################################################################### +### +### FILES +### +####################################################################### # glibc -# %files %defattr(-,root,root) @@ -836,28 +750,28 @@ exit 0 %doc %{_mandir}/man8/rpcinfo.8.gz /%{_lib}/ld-%{version}.so %ifarch ppc s390 mips hppa -/%{_lib}/ld.so.1 + /%{_lib}/ld.so.1 %else -%ifarch ia64 -/%{_lib}/ld-linux-ia64.so.2 -%else -%ifarch s390x ppc64 -/%{_lib}/ld64.so.1 -%ifarch s390x -/lib/ld64.so.1 -%endif -%else -%ifarch x86_64 -/%{_lib}/ld-linux-x86-64.so.2 -%else -%ifarch %arm armv5tel armv7l -/%{_lib}/ld-linux.so.3 -%else -/%{_lib}/ld-linux.so.2 -%endif -%endif -%endif -%endif + %ifarch ia64 + /%{_lib}/ld-linux-ia64.so.2 + %else + %ifarch s390x ppc64 + /%{_lib}/ld64.so.1 + %ifarch s390x + /lib/ld64.so.1 + %endif + %else + %ifarch x86_64 + /%{_lib}/ld-linux-x86-64.so.2 + %else + %ifarch %arm armv5tel armv7l + /%{_lib}/ld-linux.so.3 + %else + /%{_lib}/ld-linux.so.2 + %endif + %endif + %endif + %endif %endif /%{_lib}/libBrokenLocale-%{version}.so /%{_lib}/libBrokenLocale.so.1 @@ -901,38 +815,29 @@ exit 0 /%{_lib}/libutil-%{version}.so /%{_lib}/libutil.so.1 %if %{optimize_power} -%define optimized_libs() \ -%dir %attr(0755,root,root) /%{_lib}/%1\ -/%{_lib}/%1/libc-%{version}.so\ -/%{_lib}/%1/libc.so.6*\ -/%{_lib}/%1/libm-%{version}.so\ -/%{_lib}/%1/libm.so.6*\ -/%{_lib}/%1/libpthread-%{version}.so\ -/%{_lib}/%1/libpthread.so.0\ -/%{_lib}/%1/librt-%{version}.so\ -/%{_lib}/%1/librt.so.1\ -/%{_lib}/%1/libthread_db-1.0.so\ -/%{_lib}/%1/libthread_db.so.1 -%if %{powerpc_optimize_cpu_power4} -%{optimized_libs power4} -%{optimized_libs ppc970} -%endif -%if %{powerpc_optimize_cpu_power5} -%{optimized_libs power5} -%{optimized_libs power5+} -%endif -%if %{powerpc_optimize_cpu_power6} -%{optimized_libs power6} -%{optimized_libs power6x} -%endif -%if %{powerpc_optimize_cpu_power7} -%{optimized_libs power7} -%endif -%if %{powerpc_optimize_cpu_cell} -%{optimized_libs ppc-cell-be} -%endif -# optimize_power -%endif + %define optimized_libs() \ + %dir %attr(0755,root,root) /%{_lib}/%1\ + /%{_lib}/%1/libc-%{version}.so\ + /%{_lib}/%1/libc.so.6*\ + /%{_lib}/%1/libm-%{version}.so\ + /%{_lib}/%1/libm.so.6*\ + /%{_lib}/%1/libpthread-%{version}.so\ + /%{_lib}/%1/libpthread.so.0\ + /%{_lib}/%1/librt-%{version}.so\ + /%{_lib}/%1/librt.so.1\ + /%{_lib}/%1/libthread_db-1.0.so\ + /%{_lib}/%1/libthread_db.so.1 + %if %{powerpc_optimize_cpu_power6} + %{optimized_libs power6} + %{optimized_libs power6x} + %endif + %if %{powerpc_optimize_cpu_power7} + %{optimized_libs power7} + %endif + %if %{powerpc_optimize_cpu_cell} + %{optimized_libs ppc-cell-be} + %endif +%endif # optimize_power %dir %attr(0700,root,root) /var/cache/ldconfig /sbin/ldconfig /usr/bin/gencat @@ -941,7 +846,7 @@ exit 0 /usr/bin/iconv %attr(755,root,root) /usr/bin/ldd %ifarch %ix86 sparc sparcv9 -/usr/bin/lddlibc4 + /usr/bin/lddlibc4 %endif /usr/bin/locale /usr/bin/localedef @@ -956,19 +861,16 @@ exit 0 %defattr (755,root,root,755) %dir /%{_lib}/obsolete/ %ifarch %ix86 -%dir /%{_lib}/obsolete/noversion -/%{_lib}/obsolete/noversion/libNoVersion-%{version}.so -/%{_lib}/obsolete/noversion/libNoVersion.so.1 + %dir /%{_lib}/obsolete/noversion + /%{_lib}/obsolete/noversion/libNoVersion-%{version}.so + /%{_lib}/obsolete/noversion/libNoVersion.so.1 %endif -# -# locale subpackage -# %files locale -f libc.lang %defattr(-,root,root) /usr/share/locale/locale.alias %if %{build_locales} -/usr/lib/locale + /usr/lib/locale %endif %{_libdir}/gconv @@ -997,8 +899,9 @@ exit 0 %{_libdir}/libdl.a %{_libdir}/libg.a %{_libdir}/libieee.a -%ifarch ppc ppc64 s390 s390x -%{_libdir}/libnldbl_nonshared.a +%ifarch ppc ppc64 s390 s390x sparc sparcv8 sparcv9 sparcv9v +# This is not built on sparc64. + %{_libdir}/libnldbl_nonshared.a %endif %{_libdir}/libm.a %{_libdir}/libmcheck.a @@ -1009,32 +912,20 @@ exit 0 %{_libdir}/librpcsvc.a %{_libdir}/librt.a %{_libdir}/libutil.a -# -# glibc-info -# %files info %defattr(-,root,root) %doc %{_infodir}/libc.info.gz %doc %{_infodir}/libc.info-?.gz %doc %{_infodir}/libc.info-??.gz -# -# glibc-html -# %files html %defattr(-,root,root) %doc %{_prefix}/share/doc/glibc -# -# glibc-i18ndata -# %files i18ndata %defattr(-,root,root) %{_prefix}/share/i18n -# -# nscd -# %files -n nscd %defattr(-,root,root) @@ -1050,9 +941,6 @@ exit 0 %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts -# -# glibc-profile -# %files profile %defattr(-,root,root) diff --git a/glibc_post_upgrade.c b/glibc_post_upgrade.c index f7dd6c5..a479c79 100644 --- a/glibc_post_upgrade.c +++ b/glibc_post_upgrade.c @@ -43,14 +43,6 @@ main (void) "/lib/i686/", #endif #ifdef __powerpc64__ -#ifdef REMOVE_PPC_OPTIMIZE_POWER4 - "/lib64/power4/", - "/lib64/ppc970/", -#endif -#ifdef REMOVE_PPC_OPTIMIZE_POWER5 - "/lib64/power5/", - "/lib64/power5+/", -#endif #ifdef REMOVE_PPC_OPTIMIZE_POWER6 "/lib64/power6/", "/lib64/power6x/", @@ -63,14 +55,6 @@ main (void) #endif #endif /* __powerpc64__ */ #ifdef __powerpc__ -#ifdef REMOVE_PPC_OPTIMIZE_POWER4 - "/lib/power4/", - "/lib/ppc970/", -#endif -#ifdef REMOVE_PPC_OPTIMIZE_POWER5 - "/lib/power5/", - "/lib/power5+/", -#endif #ifdef REMOVE_PPC_OPTIMIZE_POWER6 "/lib/power6/", "/lib/power6x/", diff --git a/libm-x86-64.diff.bz2 b/libm-x86-64.diff.bz2 index 4eb2049..670bdcb 100644 --- a/libm-x86-64.diff.bz2 +++ b/libm-x86-64.diff.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:349cdc0d042ccd828d6906a0e2498bdacfa89e2a3df0e706fc429756caa39895 -size 76349 +oid sha256:a64d26aaeef0d9ee062260b5540910b138a6e0df89033dd4fe4b39d905574b19 +size 76334