From 5c86f0da5f07791c01477380a0635c6d38a9b33b Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Wed, 22 May 2019 17:36:57 -0700 Subject: RISC-V: Add size optimized memcpy, memmove, memset and strcmp. This patch adds implementations of memcpy, memmove, memset and strcmp optimized for size. The changes have been tested in riscv/riscv-gnu-toolchain by riscv-dejagnu with riscv-sim.exp/riscv-sim-nano.exp. --- newlib/libc/machine/riscv/memmove-stub.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 newlib/libc/machine/riscv/memmove-stub.c (limited to 'newlib/libc/machine/riscv/memmove-stub.c') diff --git a/newlib/libc/machine/riscv/memmove-stub.c b/newlib/libc/machine/riscv/memmove-stub.c new file mode 100644 index 000000000..d882e46c1 --- /dev/null +++ b/newlib/libc/machine/riscv/memmove-stub.c @@ -0,0 +1,14 @@ +/* Copyright (c) 2019 SiFive Inc. All rights reserved. + + This copyrighted material is made available to anyone wishing to use, + modify, copy, or redistribute it subject to the terms and conditions + of the FreeBSD License. This program is distributed in the hope that + it will be useful, but WITHOUT ANY WARRANTY expressed or implied, + including the implied warranties of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. A copy of this license is available at + http://www.opensource.org/licenses. +*/ + +#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__) +#include "../../string/memmove.c" +#endif -- cgit v1.2.3