diff options
author | Alan Cox <alc@FreeBSD.org> | 2004-04-03 05:33:10 +0000 |
---|---|---|
committer | Alan Cox <alc@FreeBSD.org> | 2004-04-03 05:33:10 +0000 |
commit | 2cdafcbbe0ec40481d8a5abb4b2f3eb1072db03a (patch) | |
tree | b85da0d6e282198f3ec1f6eac7168d3848c9fc64 /sys/amd64/amd64/support.S | |
parent | 55d2c71b88f36cb8d088ac2f725633fb679522d5 (diff) | |
download | src-2cdafcbbe0ec40481d8a5abb4b2f3eb1072db03a.tar.gz src-2cdafcbbe0ec40481d8a5abb4b2f3eb1072db03a.zip |
Microoptimize pagezero() based upon something that I learned writing the
optimized pagecopy(). This also has the virtual of making these two
functions more similar in style.
Notes
Notes:
svn path=/head/; revision=127786
Diffstat (limited to 'sys/amd64/amd64/support.S')
-rw-r--r-- | sys/amd64/amd64/support.S | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index 633f7b1c0529..7fcb4b9d07fb 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -76,15 +76,15 @@ ENTRY(bzero) /* Address: %rdi */ ENTRY(pagezero) - lea 4096(%rdi),%rsi + movq $-PAGE_SIZE,%rdx + subq %rdx,%rdi xorq %rax,%rax 1: - movnti %rax,(%rdi) - movnti %rax,8(%rdi) - movnti %rax,16(%rdi) - movnti %rax,24(%rdi) - addq $32,%rdi - cmpq %rsi,%rdi + movnti %rax,(%rdi,%rdx) + movnti %rax,8(%rdi,%rdx) + movnti %rax,16(%rdi,%rdx) + movnti %rax,24(%rdi,%rdx) + addq $32,%rdx jne 1b sfence retq |