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
committerNoah Goldstein <goldstein.w.n@gmail.com>2021-07-08 18:55:40 -0400
commita6e7c3745d73ff876b4ba6991fb00768a938aef5 (patch)
treef0525e9d7fc3a497c20d8abe6e2751dfc8708463 /sysdeps/x86_64/Makefile
parent115d242456de158e698ffb0f9a5fee3118e9e825 (diff)
downloadglibc-a6e7c3745d73ff876b4ba6991fb00768a938aef5.tar.gz
glibc-a6e7c3745d73ff876b4ba6991fb00768a938aef5.tar.xz
glibc-a6e7c3745d73ff876b4ba6991fb00768a938aef5.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.
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 06a444b6af..3fc03f4a19 100644
--- a/sysdeps/x86_64/Makefile
+++ b/sysdeps/x86_64/Makefile
@@ -20,6 +20,8 @@ endif
 ifeq ($(subdir),string)
 sysdep_routines += strcasecmp_l-nonascii strncase_l-nonascii
 gen-as-const-headers += locale-defines.sym
+tests += \
+  tst-rsi-strlen
 endif
 
 ifeq ($(subdir),elf)
@@ -191,6 +193,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 $@