aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86/include
diff options
context:
space:
mode:
authorNoah Goldstein <goldstein.w.n@gmail.com>2024-08-14 14:37:31 +0800
committerH.J. Lu <hjl.tools@gmail.com>2024-08-15 08:19:15 -0700
commitf446d90fe6605ac473aaa6cd17a1800e72dcc1a2 (patch)
treea381ddf487e56995f35208f093ddacd49256da73 /sysdeps/x86/include
parentb93dddfaf440aa12f45d7c356f6ffe9f27d35577 (diff)
downloadglibc-f446d90fe6605ac473aaa6cd17a1800e72dcc1a2.tar.xz
glibc-f446d90fe6605ac473aaa6cd17a1800e72dcc1a2.zip
x86: Add `Avoid_STOSB` tunable to allow NT memset without ERMS
The goal of this flag is to allow targets which don't prefer/have ERMS to still access the non-temporal memset implementation. There are 4 cases for tuning memset: 1) `Avoid_STOSB && Avoid_Non_Temporal_Memset` - Memset with temporal stores 2) `Avoid_STOSB && !Avoid_Non_Temporal_Memset` - Memset with temporal/non-temporal stores. Non-temporal path goes through `rep stosb` path. We accomplish this by setting `x86_rep_stosb_threshold` to `x86_memset_non_temporal_threshold`. 3) `!Avoid_STOSB && Avoid_Non_Temporal_Memset` - Memset with temporal stores/`rep stosb` 3) `!Avoid_STOSB && !Avoid_Non_Temporal_Memset` - Memset with temporal stores/`rep stosb`/non-temporal stores. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'sysdeps/x86/include')
-rw-r--r--sysdeps/x86/include/cpu-features-preferred_feature_index_1.def1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/x86/include/cpu-features-preferred_feature_index_1.def b/sysdeps/x86/include/cpu-features-preferred_feature_index_1.def
index 61bbbc2e89..2a58000147 100644
--- a/sysdeps/x86/include/cpu-features-preferred_feature_index_1.def
+++ b/sysdeps/x86/include/cpu-features-preferred_feature_index_1.def
@@ -34,3 +34,4 @@ BIT (MathVec_Prefer_No_AVX512)
BIT (Prefer_FSRM)
BIT (Avoid_Short_Distance_REP_MOVSB)
BIT (Avoid_Non_Temporal_Memset)
+BIT (Avoid_STOSB)