aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-02-08 10:08:40 -0300
committerAndreas K. Hüttel <dilfridge@gentoo.org>2024-04-07 00:25:06 +0200
commit67070385c9b826211f806f2eba6ed56dca8ac51a (patch)
tree9c18a04e22366fd930a2fb5f08f5f341f8356000
parentx86: Do not prefer ERMS for memset on Zen3+ (diff)
downloadglibc-67070385c9b826211f806f2eba6ed56dca8ac51a.tar.gz
glibc-67070385c9b826211f806f2eba6ed56dca8ac51a.tar.bz2
glibc-67070385c9b826211f806f2eba6ed56dca8ac51a.zip
x86: Expand the comment on when REP STOSB is used on memset
Reviewed-by: H.J. Lu <hjl.tools@gmail.com> (cherry picked from commit 491e55beab7457ed310a4a47496f4a333c5d1032) (cherry picked from commit 5d070d12b3a52bc44dd1b71743abc4b6243862ae)
-rw-r--r--sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
index 9984c3ca0f..97839a2248 100644
--- a/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
+++ b/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
@@ -21,7 +21,9 @@
2. If size is less than VEC, use integer register stores.
3. If size is from VEC_SIZE to 2 * VEC_SIZE, use 2 VEC stores.
4. If size is from 2 * VEC_SIZE to 4 * VEC_SIZE, use 4 VEC stores.
- 5. If size is more to 4 * VEC_SIZE, align to 4 * VEC_SIZE with
+ 5. On machines ERMS feature, if size is greater or equal than
+ __x86_rep_stosb_threshold then REP STOSB will be used.
+ 6. If size is more to 4 * VEC_SIZE, align to 4 * VEC_SIZE with
4 VEC stores and store 4 * VEC at a time until done. */
#include <sysdep.h>