diff options
Diffstat (limited to 'sysdeps/x86_64/memchr.S')
-rw-r--r-- | sysdeps/x86_64/memchr.S | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sysdeps/x86_64/memchr.S b/sysdeps/x86_64/memchr.S index 132eacba8f..b8c30a6fe4 100644 --- a/sysdeps/x86_64/memchr.S +++ b/sysdeps/x86_64/memchr.S @@ -24,9 +24,12 @@ ENTRY(memchr) movd %rsi, %xmm1 mov %rdi, %rcx - +#ifdef __ILP32__ + /* Clear the upper 32 bits. */ + movl %edx, %edx +#endif punpcklbw %xmm1, %xmm1 - test %rdx, %rdx + test %RDX_LP, %RDX_LP jz L(return_null) punpcklbw %xmm1, %xmm1 |