Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <jimw@sifive.com>2019-05-23 03:36:57 +0300
committerJim Wilson <jimw@sifive.com>2019-05-23 03:36:57 +0300
commit5c86f0da5f07791c01477380a0635c6d38a9b33b (patch)
treee19bd2ae6ec9b39a431e40be9c90f28f71f8f892 /newlib/libc/machine/riscv/memmove-stub.c
parenta9a0d219a417a8079b878ce967f72997789e328a (diff)
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.
Diffstat (limited to 'newlib/libc/machine/riscv/memmove-stub.c')
-rw-r--r--newlib/libc/machine/riscv/memmove-stub.c14
1 files changed, 14 insertions, 0 deletions
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