x86_64: Use %xmmN with vpxor to clear a vector register

Since "vpxor %xmmN, %xmmN, %xmmN" clears the whole vector register, use
%xmmN, instead of %ymmN, with vpxor to clear a vector register.
This commit is contained in:
H.J. Lu 2020-06-11 12:41:18 -07:00
parent b7c9bb183b
commit a35a59036e
2 changed files with 3 additions and 3 deletions

View File

@ -91,8 +91,8 @@ ENTRY (STRCMP)
# endif
movl %edi, %eax
xorl %edx, %edx
/* Make %ymm7 all zeros in this function. */
vpxor %ymm7, %ymm7, %ymm7
/* Make %xmm7 (%ymm7) all zeros in this function. */
vpxor %xmm7, %xmm7, %xmm7
orl %esi, %eax
andl $(PAGE_SIZE - 1), %eax
cmpl $(PAGE_SIZE - (VEC_SIZE * 4)), %eax

View File

@ -44,7 +44,7 @@ ENTRY (STRRCHR)
movl %edi, %ecx
/* Broadcast CHAR to YMM4. */
VPBROADCAST %xmm4, %ymm4
vpxor %ymm0, %ymm0, %ymm0
vpxor %xmm0, %xmm0, %xmm0
/* Check if we may cross page boundary with one vector load. */
andl $(2 * VEC_SIZE - 1), %ecx