aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86/Makefile
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-02-23 06:33:10 -0800
committerH.J. Lu <hjl.tools@gmail.com>2021-03-29 07:40:17 -0700
commit4bd660be40967cd69072f69ebc2ad32bfcc1f206 (patch)
treebf4ff45b0d0f7f1b71025030bc554c12b1e24f21 /sysdeps/x86/Makefile
parent7ebba91361badf7531d4e75050627a88d424872f (diff)
downloadglibc-4bd660be40967cd69072f69ebc2ad32bfcc1f206.tar.xz
glibc-4bd660be40967cd69072f69ebc2ad32bfcc1f206.zip
x86: Add string/memory function tests in RTM region
At function exit, AVX optimized string/memory functions have VZEROUPPER which triggers RTM abort. When such functions are called inside a transactionally executing RTM region, RTM abort causes severe performance degradation. Add tests to verify that string/memory functions won't cause RTM abort in RTM region.
Diffstat (limited to 'sysdeps/x86/Makefile')
-rw-r--r--sysdeps/x86/Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile
index 8186e45fec..aa016f7b5a 100644
--- a/sysdeps/x86/Makefile
+++ b/sysdeps/x86/Makefile
@@ -80,6 +80,29 @@ endif
ifeq ($(subdir),string)
sysdep_routines += cacheinfo
+
+tests += \
+ tst-memchr-rtm \
+ tst-memcmp-rtm \
+ tst-memmove-rtm \
+ tst-memrchr-rtm \
+ tst-memset-rtm \
+ tst-strchr-rtm \
+ tst-strcpy-rtm \
+ tst-strlen-rtm \
+ tst-strncmp-rtm \
+ tst-strrchr-rtm
+
+CFLAGS-tst-memchr-rtm.c += -mrtm
+CFLAGS-tst-memcmp-rtm.c += -mrtm
+CFLAGS-tst-memmove-rtm.c += -mrtm
+CFLAGS-tst-memrchr-rtm.c += -mrtm
+CFLAGS-tst-memset-rtm.c += -mrtm
+CFLAGS-tst-strchr-rtm.c += -mrtm
+CFLAGS-tst-strcpy-rtm.c += -mrtm
+CFLAGS-tst-strlen-rtm.c += -mrtm
+CFLAGS-tst-strncmp-rtm.c += -mrtm
+CFLAGS-tst-strrchr-rtm.c += -mrtm
endif
ifneq ($(enable-cet),no)