diff options
author | Florian Weimer <fweimer@redhat.com> | 2017-06-23 17:23:44 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2017-06-23 17:24:40 +0200 |
commit | 3ec7c02cc3e922b9364dc8cfd1d4546671b91003 (patch) | |
tree | 283d54448fe89359272093156316884e61992c9a /ChangeLog | |
parent | 7fa1d9462baabc5a1058efc13a48444af4678acf (diff) | |
download | glibc-3ec7c02cc3e922b9364dc8cfd1d4546671b91003.tar.gz glibc-3ec7c02cc3e922b9364dc8cfd1d4546671b91003.tar.xz glibc-3ec7c02cc3e922b9364dc8cfd1d4546671b91003.zip |
x86-64: memcmp-avx2-movbe.S needs saturating subtraction [BZ #21662]
This code: L(between_2_3): /* Load as big endian with overlapping loads and bswap to avoid branches. */ movzwl -2(%rdi, %rdx), %eax movzwl -2(%rsi, %rdx), %ecx shll $16, %eax shll $16, %ecx movzwl (%rdi), %edi movzwl (%rsi), %esi orl %edi, %eax orl %esi, %ecx bswap %eax bswap %ecx subl %ecx, %eax ret needs a saturating subtract because the full register is used. With this commit, only the lower 24 bits of the register are used, so a regular subtraction suffices. The test case change adds coverage for these kinds of bugs.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 4f1ef82c51..12f1e3bce6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-06-23 Florian Weimer <fweimer@redhat.com> + + [BZ #21662] + * sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S (between_2_3): + Use only 24 bits of the register before the subtraction. + * string/test-memcmp.c (check1): Check with different lengths. + 2017-06-23 Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com> * sysdeps/ieee754/float128/Makefile (CFLAGS-strfromf128.c): Add |