Use 8/4/1 bytes loads/stores for copyin/copyout/kcopy
authorjca <jca@openbsd.org>
Fri, 23 Jul 2021 15:31:14 +0000 (15:31 +0000)
committerjca <jca@openbsd.org>
Fri, 23 Jul 2021 15:31:14 +0000 (15:31 +0000)
commitcba69464013a4a6b7abb589944eb7f3f4f227eed
tree1f6102183e623cc6f233f9f01d96038a4845ba67
parent63c7100638e46dd1b2608894fa16cbb8c09e017a
Use 8/4/1 bytes loads/stores for copyin/copyout/kcopy

Only use multiple bytes operations on properly aligned addresses, as
I have observed a 40x penalty for unaligned 8 bytes operations compared
to equivalent 1-byte loops on this Sifive Unmatched.  The speed gain is
small but significant.

Input & ok kettenis@
sys/arch/riscv64/riscv64/copy.S