diff options
author | 2017-05-12 19:25:19 +0000 | |
---|---|---|
committer | 2017-05-12 19:25:19 +0000 | |
commit | b221ce63fe7adfbde39fabe44637ca7ef2c808a9 (patch) | |
tree | f331262b4beb76f655bb0ff755d1eb098d955de1 | |
parent | Export delay statistics instead of bucket information (diff) | |
download | wireguard-openbsd-b221ce63fe7adfbde39fabe44637ca7ef2c808a9.tar.xz wireguard-openbsd-b221ce63fe7adfbde39fabe44637ca7ef2c808a9.zip |
Make copyin(9) and copyout(9) atomic for naturally aligned 32-bit words.
ok mpi@, visa@
-rw-r--r-- | sys/arch/amd64/amd64/copy.S | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/copy.S b/sys/arch/amd64/amd64/copy.S index ba71b7fa2be..0637717a020 100644 --- a/sys/arch/amd64/amd64/copy.S +++ b/sys/arch/amd64/amd64/copy.S @@ -1,4 +1,4 @@ -/* $OpenBSD: copy.S,v 1.7 2015/04/25 21:31:24 guenther Exp $ */ +/* $OpenBSD: copy.S,v 1.8 2017/05/12 19:25:19 kettenis Exp $ */ /* $NetBSD: copy.S,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */ /* @@ -138,7 +138,12 @@ ENTRY(copyout) rep movsq movb %al,%cl - andb $7,%cl + shrb $2,%cl + andb $1,%cl + rep + movsl + movb %al,%cl + andb $3,%cl rep movsb SMAP_CLAC @@ -168,7 +173,12 @@ ENTRY(copyin) rep movsq movb %al,%cl - andb $7,%cl + shrb $2,%cl + andb $1,%cl + rep + movsl + movb %al,%cl + andb $3,%cl rep movsb |