about summary refs log tree commit diff
path: root/sysdeps/x86_64/Makefile
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-07-08 16:13:17 -0400
committerH.J. Lu <hjl.tools@gmail.com>2022-02-01 13:08:21 -0800
commit55194992ea4e72b2d55e2842d8520a3679ee2367 (patch)
tree99bf18275603d2d0976a902a586451ceb60c0ed6 /sysdeps/x86_64/Makefile
parentb306774ef470e9029384e300d1a7e8367ceb8522 (diff)
downloadglibc-55194992ea4e72b2d55e2842d8520a3679ee2367.tar.gz
glibc-55194992ea4e72b2d55e2842d8520a3679ee2367.tar.xz
glibc-55194992ea4e72b2d55e2842d8520a3679ee2367.zip
x86-64: Test strlen and wcslen with 0 in the RSI register [BZ #28064]
commit 6f573a27b6c8b4236445810a44660612323f5a73
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date:   Wed Jun 23 01:19:34 2021 -0400

    x86-64: Add wcslen optimize for sse4.1

added wcsnlen-sse4.1 to the wcslen ifunc implementation list.  Since the
random value in the the RSI register is larger than the wide-character
string length in the existing wcslen test, it didn't trigger the wcslen
test failure.  Add a test to force 0 into the RSI register before calling
wcslen.

(cherry picked from commit a6e7c3745d73ff876b4ba6991fb00768a938aef5)
Diffstat (limited to 'sysdeps/x86_64/Makefile')
-rw-r--r--sysdeps/x86_64/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
index 9f1562f1b2..0b6c2accb9 100644
--- a/sysdeps/x86_64/Makefile
+++ b/sysdeps/x86_64/Makefile
@@ -20,6 +20,8 @@ endif
 ifeq ($(subdir),string)
 sysdep_routines += cacheinfo strcasecmp_l-nonascii strncase_l-nonascii
 gen-as-const-headers += locale-defines.sym
+tests += \
+  tst-rsi-strlen
 endif
 
 ifeq ($(subdir),elf)
@@ -150,6 +152,11 @@ ifeq ($(subdir),csu)
 gen-as-const-headers += tlsdesc.sym rtld-offsets.sym
 endif
 
+ifeq ($(subdir),wcsmbs)
+tests += \
+  tst-rsi-wcslen
+endif
+
 $(objpfx)x86_64/tst-x86_64mod-1.os: $(objpfx)tst-x86_64mod-1.os
 	$(make-target-directory)
 	rm -f $@