HomeFreeBSD

libc/string/bcopy.c: Use intptr_t as the copy type

Description

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

(cherry picked from commit 0b4ad01d91a3b24cea00d54d25beed0f487c0183)

Details

Provenance
arichardsonAuthored on Apr 19 2021, 11:15 PM
Reviewer
kib
Differential Revision
D29535: libc/string/bcopy.c: Use intptr_t as the copy type
Parents
rGf66ada750493: bsd.compiler.mk: detect Apple Clang for cross-builds
Branches
Unknown
Tags
Unknown