r4622 - in glibc-package/branches/eglibc-2.13/debian: . patches patches/amd64
Author: aurel32
Date: 2011-05-01 14:41:00 +0000 (Sun, 01 May 2011)
New Revision: 4622
Added:
glibc-package/branches/eglibc-2.13/debian/patches/amd64/cvs-memset.diff
Modified:
glibc-package/branches/eglibc-2.13/debian/changelog
glibc-package/branches/eglibc-2.13/debian/patches/series
Log:
* Add patches/amd64/cvs-memset.diff to fix memset() on amd64 for
misaligned blocks larger than 144 Bytes.
Modified: glibc-package/branches/eglibc-2.13/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.13/debian/changelog 2011-05-01 14:34:30 UTC (rev 4621)
+++ glibc-package/branches/eglibc-2.13/debian/changelog 2011-05-01 14:41:00 UTC (rev 4622)
@@ -153,6 +153,8 @@
with FORTIFY.
* Add patches/amd64/cvs-getcontext.diff to fix getcontext() on amd64.
* Add patches/any/cvs-fopen.diff to fix fopen() with 7 bytes string.
+ * Add patches/amd64/cvs-memset.diff to fix memset() on amd64 for
+ misaligned blocks larger than 144 Bytes.
[ Samuel Thibault ]
* Add patches/any/cvs-glro_dl_debug_mask.diff to fix build without
Added: glibc-package/branches/eglibc-2.13/debian/patches/amd64/cvs-memset.diff
===================================================================
--- glibc-package/branches/eglibc-2.13/debian/patches/amd64/cvs-memset.diff (rev 0)
+++ glibc-package/branches/eglibc-2.13/debian/patches/amd64/cvs-memset.diff 2011-05-01 14:41:00 UTC (rev 4622)
@@ -0,0 +1,198 @@
+2011-03-02 Harsha Jagasia <harsha.jagasia@amd.com>
+ Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/x86_64/memset.S: After aligning destination, code
+ branches to different locations depending on the value of
+ misalignment, when multiarch is enabled. Fix this.
+
+diff --git a/sysdeps/x86_64/memset.S b/sysdeps/x86_64/memset.S
+index f6eb71f..d43c7f6 100644
+--- a/sysdeps/x86_64/memset.S
++++ b/sysdeps/x86_64/memset.S
+@@ -23,7 +23,7 @@
+ #define __STOS_LOWER_BOUNDARY $8192
+ #define __STOS_UPPER_BOUNDARY $65536
+
+- .text
++ .text
+ #if !defined NOT_IN_libc && !defined USE_MULTIARCH
+ ENTRY(__bzero)
+ mov %rsi,%rdx /* Adjust parameter. */
+@@ -417,7 +417,7 @@ L(P4Q0): mov %edx,-0x4(%rdi)
+ retq
+
+ .balign 16
+-#if defined(USE_EXTRA_TABLE)
++#ifdef USE_EXTRA_TABLE
+ L(P5QI): mov %rdx,-0x95(%rdi)
+ #endif
+ L(P5QH): mov %rdx,-0x8d(%rdi)
+@@ -596,6 +596,8 @@ L(A6Q0): mov %dx,-0x6(%rdi)
+ jmp L(aligned_now)
+
+ L(SSE_pre):
++#else
++L(aligned_now):
+ #endif
+ #if !defined USE_MULTIARCH || defined USE_SSE2
+ # fill RegXMM0 with the pattern
+@@ -606,16 +608,16 @@ L(SSE_pre):
+ jge L(byte32sse2_pre)
+
+ add %r8,%rdi
+-#ifndef PIC
++# ifndef PIC
+ lea L(SSExDx)(%rip),%r9
+ jmpq *(%r9,%r8,8)
+-#else
++# else
+ lea L(SSE0Q0)(%rip),%r9
+ lea L(SSExDx)(%rip),%rcx
+ movswq (%rcx,%r8,2),%rcx
+ lea (%rcx,%r9,1),%r9
+ jmpq *%r9
+-#endif
++# endif
+
+ L(SSE0QB): movdqa %xmm0,-0xb0(%rdi)
+ L(SSE0QA): movdqa %xmm0,-0xa0(%rdi)
+@@ -881,16 +883,16 @@ L(byte32sse2):
+ lea 0x80(%rdi),%rdi
+ jge L(byte32sse2)
+ add %r8,%rdi
+-#ifndef PIC
++# ifndef PIC
+ lea L(SSExDx)(%rip),%r11
+ jmpq *(%r11,%r8,8)
+-#else
++# else
+ lea L(SSE0Q0)(%rip),%r11
+ lea L(SSExDx)(%rip),%rcx
+ movswq (%rcx,%r8,2),%rcx
+ lea (%rcx,%r11,1),%r11
+ jmpq *%r11
+-#endif
++# endif
+
+ .balign 16
+ L(sse2_nt_move_pre):
+@@ -916,20 +918,20 @@ L(sse2_nt_move):
+ jge L(sse2_nt_move)
+ sfence
+ add %r8,%rdi
+-#ifndef PIC
++# ifndef PIC
+ lea L(SSExDx)(%rip),%r11
+ jmpq *(%r11,%r8,8)
+-#else
++# else
+ lea L(SSE0Q0)(%rip),%r11
+ lea L(SSExDx)(%rip),%rcx
+ movswq (%rcx,%r8,2),%rcx
+ lea (%rcx,%r11,1),%r11
+ jmpq *%r11
+-#endif
++# endif
+
+ .pushsection .rodata
+ .balign 16
+-#ifndef PIC
++# ifndef PIC
+ L(SSExDx):
+ .quad L(SSE0Q0), L(SSE1Q0), L(SSE2Q0), L(SSE3Q0)
+ .quad L(SSE4Q0), L(SSE5Q0), L(SSE6Q0), L(SSE7Q0)
+@@ -979,7 +981,7 @@ L(SSExDx):
+ .quad L(SSE4QB), L(SSE5QB), L(SSE6QB), L(SSE7QB)
+ .quad L(SSE8QB), L(SSE9QB), L(SSE10QB), L(SSE11QB)
+ .quad L(SSE12QB), L(SSE13QB), L(SSE14QB), L(SSE15QB)
+-#else
++# else
+ L(SSExDx):
+ .short L(SSE0Q0) -L(SSE0Q0)
+ .short L(SSE1Q0) -L(SSE0Q0)
+@@ -1196,14 +1198,14 @@ L(SSExDx):
+ .short L(SSE13QB)-L(SSE0Q0)
+ .short L(SSE14QB)-L(SSE0Q0)
+ .short L(SSE15QB)-L(SSE0Q0)
+-#endif
++# endif
+ .popsection
+ #endif /* !defined USE_MULTIARCH || defined USE_SSE2 */
+
+ .balign 16
++#ifndef USE_MULTIARCH
+ L(aligned_now):
+
+-#ifndef USE_MULTIARCH
+ cmpl $0x1,__x86_64_preferred_memory_instruction(%rip)
+ jg L(SSE_pre)
+ #endif /* USE_MULTIARCH */
+@@ -1246,17 +1248,17 @@ L(8byte_move_loop):
+
+ L(8byte_move_skip):
+ andl $127,%r8d
+- lea (%rdi,%r8,1),%rdi
++ lea (%rdi,%r8,1),%rdi
+
+ #ifndef PIC
+- lea L(setPxQx)(%rip),%r11
+- jmpq *(%r11,%r8,8) # old scheme remained for nonPIC
++ lea L(setPxQx)(%rip),%r11
++ jmpq *(%r11,%r8,8) # old scheme remained for nonPIC
+ #else
+- lea L(Got0)(%rip),%r11
++ lea L(Got0)(%rip),%r11
+ lea L(setPxQx)(%rip),%rcx
+ movswq (%rcx,%r8,2),%rcx
+- lea (%rcx,%r11,1),%r11
+- jmpq *%r11
++ lea (%rcx,%r11,1),%r11
++ jmpq *%r11
+ #endif
+
+ .balign 16
+@@ -1290,16 +1292,16 @@ L(8byte_stos_skip):
+ ja L(8byte_nt_move)
+
+ andl $7,%r8d
+- lea (%rdi,%r8,1),%rdi
++ lea (%rdi,%r8,1),%rdi
+ #ifndef PIC
+- lea L(setPxQx)(%rip),%r11
+- jmpq *(%r11,%r8,8) # old scheme remained for nonPIC
++ lea L(setPxQx)(%rip),%r11
++ jmpq *(%r11,%r8,8) # old scheme remained for nonPIC
+ #else
+- lea L(Got0)(%rip),%r11
++ lea L(Got0)(%rip),%r11
+ lea L(setPxQx)(%rip),%rcx
+ movswq (%rcx,%r8,2),%rcx
+ lea (%rcx,%r11,1),%r11
+- jmpq *%r11
++ jmpq *%r11
+ #endif
+
+ .balign 16
+@@ -1338,16 +1340,16 @@ L(8byte_nt_move_loop):
+ L(8byte_nt_move_skip):
+ andl $127,%r8d
+
+- lea (%rdi,%r8,1),%rdi
++ lea (%rdi,%r8,1),%rdi
+ #ifndef PIC
+- lea L(setPxQx)(%rip),%r11
+- jmpq *(%r11,%r8,8) # old scheme remained for nonPIC
++ lea L(setPxQx)(%rip),%r11
++ jmpq *(%r11,%r8,8) # old scheme remained for nonPIC
+ #else
+- lea L(Got0)(%rip),%r11
++ lea L(Got0)(%rip),%r11
+ lea L(setPxQx)(%rip),%rcx
+ movswq (%rcx,%r8,2),%rcx
+- lea (%rcx,%r11,1),%r11
+- jmpq *%r11
++ lea (%rcx,%r11,1),%r11
++ jmpq *%r11
+ #endif
+
+ END (memset)
Modified: glibc-package/branches/eglibc-2.13/debian/patches/series
===================================================================
--- glibc-package/branches/eglibc-2.13/debian/patches/series 2011-05-01 14:34:30 UTC (rev 4621)
+++ glibc-package/branches/eglibc-2.13/debian/patches/series 2011-05-01 14:41:00 UTC (rev 4622)
@@ -63,6 +63,7 @@
amd64/submitted-tst-audit6-avx.diff
amd64/submitted-rwlock-stack-imbalance.diff
amd64/cvs-getcontext.diff
+amd64/cvs-memset.diff
arm/local-atomic.diff
arm/local-eabi-wchar.diff
Reply to: