summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/support.S14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S
index 633f7b1..7fcb4b9 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
OpenPOWER on IntegriCloud