]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libc/string/bcopy.c: Use intptr_t as the copy type
authorAlex Richardson <arichardson@FreeBSD.org>
Mon, 19 Apr 2021 23:15:57 +0000 (00:15 +0100)
committerAlex Richardson <arichardson@FreeBSD.org>
Tue, 20 Apr 2021 00:46:42 +0000 (01:46 +0100)
commit0b4ad01d91a3b24cea00d54d25beed0f487c0183
tree6185b9d4121b0d37f4fa8ac4a6ca426f4bbe693b
parentbbd421cdf6d8c6102e6fd3979c5bec21ace3c2e3
libc/string/bcopy.c: Use intptr_t as the copy type

While most 64-bit architectures have an assembly implementation of this
file RISC-V does not. As we now copy 8 bytes instead of 4 it should speed
up RISC-V. Using intptr_t instead of int also allows using this file for
CHERI pure-capability code since trying to copy pointers using integer
loads/stores will invalidate pointers.

Reviewed By: kib
Obtained from: CheriBSD (partially)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29535
lib/libc/string/bcopy.c