This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.14-531-g5583a08
- From: schwab at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 16 Nov 2011 10:50:01 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.14-531-g5583a08
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 5583a0862cf94f71cbcde91c4043a20af65facca (commit)
from d62a8200e1523a19c722eab97f54e34079fc3d0e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5583a0862cf94f71cbcde91c4043a20af65facca
commit 5583a0862cf94f71cbcde91c4043a20af65facca
Author: Andreas Schwab <schwab@redhat.com>
Date: Wed Nov 16 09:36:15 2011 +0100
Fix SSSE3/SSE4.2 strcasecmp[_l]/strncasecmp[_l] for non-PIC and -mno-tls-direct-seg-refs
diff --git a/ChangeLog b/ChangeLog
index c469e10..fced7f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2011-11-16 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/i386/i686/multiarch/strcmp-ssse3.S
+ [USE_AS_STRCASECMP_L]: Fix argument offsets for non-PIC.
+ [USE_AS_STRNCASECMP_L]: Likewise.
+ (__strcasecmp_ssse3, __strncasecmp_ssse3): Handle
+ NO_TLS_DIRECT_SEG_REFS.
+ * sysdeps/i386/i686/multiarch/strcmp-sse4.S [USE_AS_STRCASECMP_L]:
+ Fix argument offsets for non-PIC.
+ [USE_AS_STRNCASECMP_L]: Likewise.
+ (__strcasecmp_sse4_2, __strncasecmp_sse4_2): Handle
+ NO_TLS_DIRECT_SEG_REFS.
+
2011-11-15 Ulrich Drepper <drepper@gmail.com>
* locale/loadarchive.c (_nl_load_locale_from_archive): Open files to
diff --git a/sysdeps/i386/i686/multiarch/strcmp-sse4.S b/sysdeps/i386/i686/multiarch/strcmp-sse4.S
index 1df63e3..c9e0317 100644
--- a/sysdeps/i386/i686/multiarch/strcmp-sse4.S
+++ b/sysdeps/i386/i686/multiarch/strcmp-sse4.S
@@ -48,7 +48,11 @@
# ifndef STRCMP
# define STRCMP __strcasecmp_l_sse4_2
# endif
-# define STR1 12
+# ifdef PIC
+# define STR1 12
+# else
+# define STR1 8
+# endif
# define STR2 STR1+4
# define LOCALE 12 /* Loaded before the adjustement. */
# ifdef PIC
@@ -63,7 +67,11 @@
# ifndef STRCMP
# define STRCMP __strncasecmp_l_sse4_2
# endif
-# define STR1 16
+# ifdef PIC
+# define STR1 16
+# else
+# define STR1 12
+# endif
# define STR2 STR1+4
# define CNT STR2+4
# define LOCALE 16 /* Loaded before the adjustement. */
@@ -95,10 +103,20 @@ ENTRY (__strcasecmp_sse4_2)
call __i686.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
movl __libc_tsd_LOCALE@GOTNTPOFF(%ebx), %eax
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ addl %gs:0, %eax
+ movl (%eax), %eax
+# else
+ movl %gs:(%eax), %eax
+# endif
# else
- movl __libc_tsd_LOCALE@NTPOFF, %eax
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ movl %gs:0, %eax
+ movl __libc_tsd_LOCALE@NTPOFF(%eax), %eax
+# else
+ movl %gs:__libc_tsd_LOCALE@NTPOFF, %eax
+# endif
# endif
- movl %gs:(%eax), %eax
# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
movl LOCALE_T___LOCALES+LC_CTYPE*4(%eax), %eax
# else
@@ -117,10 +135,20 @@ ENTRY (__strncasecmp_sse4_2)
call __i686.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
movl __libc_tsd_LOCALE@GOTNTPOFF(%ebx), %eax
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ addl %gs:0, %eax
+ movl (%eax), %eax
+# else
+ movl %gs:(%eax), %eax
+# endif
# else
- movl __libc_tsd_LOCALE@NTPOFF, %eax
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ movl %gs:0, %eax
+ movl __libc_tsd_LOCALE@NTPOFF(%eax), %eax
+# else
+ movl %gs:__libc_tsd_LOCALE@NTPOFF, %eax
+# endif
# endif
- movl %gs:(%eax), %eax
# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
movl LOCALE_T___LOCALES+LC_CTYPE*4(%eax), %eax
# else
diff --git a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
index 137596d..cbba465 100644
--- a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
+++ b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
@@ -56,7 +56,11 @@
# ifndef STRCMP
# define STRCMP __strcasecmp_l_ssse3
# endif
-# define STR1 8
+# ifdef PIC
+# define STR1 8
+# else
+# define STR1 4
+# endif
# define STR2 STR1+4
# define LOCALE 12 /* Loaded before the adjustement. */
# ifdef PIC
@@ -72,7 +76,11 @@
# ifndef STRCMP
# define STRCMP __strncasecmp_l_ssse3
# endif
-# define STR1 12
+# ifdef PIC
+# define STR1 12
+# else
+# define STR1 8
+# endif
# define STR2 STR1+4
# define CNT STR2+4
# define LOCALE 16 /* Loaded before the adjustement. */
@@ -112,10 +120,20 @@ ENTRY (__strcasecmp_ssse3)
call __i686.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
movl __libc_tsd_LOCALE@GOTNTPOFF(%ebx), %eax
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ addl %gs:0, %eax
+ movl (%eax), %eax
+# else
+ movl %gs:(%eax), %eax
+# endif
# else
- movl __libc_tsd_LOCALE@NTPOFF, %eax
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ movl %gs:0, %eax
+ movl __libc_tsd_LOCALE@NTPOFF(%eax), %eax
+# else
+ movl %gs:__libc_tsd_LOCALE@NTPOFF, %eax
+# endif
# endif
- movl %gs:(%eax), %eax
# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
movl LOCALE_T___LOCALES+LC_CTYPE*4(%eax), %eax
# else
@@ -134,10 +152,20 @@ ENTRY (__strncasecmp_ssse3)
call __i686.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
movl __libc_tsd_LOCALE@GOTNTPOFF(%ebx), %eax
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ addl %gs:0, %eax
+ movl (%eax), %eax
+# else
+ movl %gs:(%eax), %eax
+# endif
# else
- movl __libc_tsd_LOCALE@NTPOFF, %eax
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ movl %gs:0, %eax
+ movl __libc_tsd_LOCALE@NTPOFF(%eax), %eax
+# else
+ movl %gs:__libc_tsd_LOCALE@NTPOFF, %eax
+# endif
# endif
- movl %gs:(%eax), %eax
# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
movl LOCALE_T___LOCALES+LC_CTYPE*4(%eax), %eax
# else
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 13 +++++++++
sysdeps/i386/i686/multiarch/strcmp-sse4.S | 40 +++++++++++++++++++++++----
sysdeps/i386/i686/multiarch/strcmp-ssse3.S | 40 +++++++++++++++++++++++----
3 files changed, 81 insertions(+), 12 deletions(-)
hooks/post-receive
--
GNU C Library master sources