From 90a823ed9261212bea6160593fb2c7472be30db4 Mon Sep 17 00:00:00 2001 From: alc <alc@FreeBSD.org> Date: Thu, 7 Apr 2005 05:46:46 +0000 Subject: 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(-) (limited to 'lib/libc/amd64/string') diff --git a/lib/libc/amd64/string/bzero.S b/lib/libc/amd64/string/bzero.S index 2f4ced3..d9d2a45 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 -- cgit v1.1