]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[riscv] Speed up memmove() when copying in forwards direction
authorMichael Brown <mcb30@ipxe.org>
Wed, 21 May 2025 15:12:56 +0000 (16:12 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 21 May 2025 15:12:56 +0000 (16:12 +0100)
commita53456334512f8de2e5d744abbc0a0cddd0eb962
tree75a8971ca06d4b8fc95a5f8c244495c337319281
parent20d2c0f78702c1e9d295c7abb7ac3a054fe17bd0
[riscv] Speed up memmove() when copying in forwards direction

Use the word-at-a-time variable-length memcpy() implementation when
performing an overlapping copy in the forwards direction, since this
is guaranteed to be safe and likely to be substantially faster than
the existing bytewise copy.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/riscv/core/riscv_string.c
src/arch/riscv/include/bits/string.h