diff options
Diffstat (limited to 'sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S')
-rw-r--r-- | sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S index 1404131bb7..e2ede45e9f 100644 --- a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S +++ b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S @@ -156,6 +156,9 @@ END (__mempcpy_chk_erms) /* Only used to measure performance of REP MOVSB. */ ENTRY (__mempcpy_erms) movq %rdi, %rax + /* Skip zero length. */ + testq %rdx, %rdx + jz 2f addq %rdx, %rax jmp L(start_movsb) END (__mempcpy_erms) @@ -167,6 +170,9 @@ END (__memmove_chk_erms) ENTRY (__memmove_erms) movq %rdi, %rax + /* Skip zero length. */ + testq %rdx, %rdx + jz 2f L(start_movsb): movq %rdx, %rcx cmpq %rsi, %rdi |