aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2018-05-31 09:56:02 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2018-05-31 09:56:02 +0000
commit64415b8b229f42d68126c0fcd1a22dd4dc138aed (patch)
treebc9ef9f09067d7367e4dc8036f22a75760a41481
parent5fd1ea0810fa7811886c51740e0758f2dd36d940 (diff)
Notes
-rw-r--r--sys/amd64/amd64/support.S26
1 files changed, 6 insertions, 20 deletions
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S
index d3e1c5319811..3bdaac548cc6 100644
--- a/sys/amd64/amd64/support.S
+++ b/sys/amd64/amd64/support.S
@@ -281,26 +281,12 @@ END(memset)
*/
ENTRY(pagecopy)
PUSH_FRAME_POINTER
- movq $-PAGE_SIZE,%rax
- movq %rax,%rdx
- subq %rax,%rdi
- subq %rax,%rsi
-1:
- prefetchnta (%rdi,%rax)
- addq $64,%rax
- jne 1b
-2:
- movq (%rdi,%rdx),%rax
- movnti %rax,(%rsi,%rdx)
- movq 8(%rdi,%rdx),%rax
- movnti %rax,8(%rsi,%rdx)
- movq 16(%rdi,%rdx),%rax
- movnti %rax,16(%rsi,%rdx)
- movq 24(%rdi,%rdx),%rax
- movnti %rax,24(%rsi,%rdx)
- addq $32,%rdx
- jne 2b
- sfence
+ movq $PAGE_SIZE/8,%rcx
+ movq %rdi,%r9
+ movq %rsi,%rdi
+ movq %r9,%rsi
+ rep
+ movsq
POP_FRAME_POINTER
ret
END(pagecopy)