From 0417d4e3e9d3ce77602e1fc8b63da1fc9b5fbc54 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 7 Apr 2005 05:46:46 +0000 Subject: [PATCH] Eliminate an unneeded instruction that is a vestige of mechanical translation from i386. --- lib/libc/amd64/string/bzero.S | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/libc/amd64/string/bzero.S b/lib/libc/amd64/string/bzero.S index 2f4ced3c0423..d9d2a451a0d7 100644 --- a/lib/libc/amd64/string/bzero.S +++ b/lib/libc/amd64/string/bzero.S @@ -12,8 +12,6 @@ __FBSDID("$FreeBSD$"); #endif ENTRY(bzero) - movq %rsi,%rdx - cld /* set fill direction forward */ xorq %rax,%rax /* set fill data to 0 */ @@ -22,23 +20,23 @@ ENTRY(bzero) * of aligning to word boundries, etc. So we jump to a plain * unaligned set. */ - cmpq $16,%rdx + cmpq $16,%rsi jb L1 movq %rdi,%rcx /* compute misalignment */ negq %rcx andq $7,%rcx - subq %rcx,%rdx + subq %rcx,%rsi rep /* zero until word aligned */ stosb - movq %rdx,%rcx /* zero by words */ + movq %rsi,%rcx /* zero by words */ shrq $3,%rcx - andq $7,%rdx + andq $7,%rsi rep stosq -L1: movq %rdx,%rcx /* zero remainder by bytes */ +L1: movq %rsi,%rcx /* zero remainder by bytes */ rep stosb