]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86: Add bounds `x86_non_temporal_threshold`
authorNoah Goldstein <goldstein.w.n@gmail.com>
Wed, 15 Jun 2022 17:41:29 +0000 (10:41 -0700)
committerSunil K Pandey <skpgkp2@gmail.com>
Tue, 19 Jul 2022 05:13:57 +0000 (22:13 -0700)
commit2416fd15b9364c7e0cb62071fc48102618514f89
tree356bb9ec271ddf82d6624fdad47f869a2d15e059
parentcfa13a8205092cd4216e65eddc19742be379aaea
x86: Add bounds `x86_non_temporal_threshold`

The lower-bound (16448) and upper-bound (SIZE_MAX / 16) are assumed
by memmove-vec-unaligned-erms.

The lower-bound is needed because memmove-vec-unaligned-erms unrolls
the loop aggressively in the L(large_memset_4x) case.

The upper-bound is needed because memmove-vec-unaligned-erms
right-shifts the value of `x86_non_temporal_threshold` by
LOG_4X_MEMCPY_THRESH (4) which without a bound may overflow.

The lack of lower-bound can be a correctness issue. The lack of
upper-bound cannot.

(cherry picked from commit b446822b6ae4e8149902a78cdd4a886634ad6321)
manual/tunables.texi
sysdeps/x86/dl-cacheinfo.h