summaryrefslogtreecommitdiff
path: root/libc/string/generic/memcopy.h
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-09-09 16:55:27 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-09-09 16:55:27 +0000
commite4f55f33f69fce85099dd5936cc74856aa1b453d (patch)
treef35d6680197aa43098c99291e909150bf52f409a /libc/string/generic/memcopy.h
parenta79016198c859a3388584ac7782d760f349e2d67 (diff)
Add optimized memcpy implementation for sh4 (from Stuart Menefy @STMicroelectronics).
This implementation is based on 'backward copying'. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/string/generic/memcopy.h')
-rw-r--r--libc/string/generic/memcopy.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libc/string/generic/memcopy.h b/libc/string/generic/memcopy.h
index df1ba9a97..fab4da764 100644
--- a/libc/string/generic/memcopy.h
+++ b/libc/string/generic/memcopy.h
@@ -107,6 +107,7 @@ typedef unsigned char byte;
} \
} while (0)
+#ifdef __ARCH_HAS_BWD_MEMCPY__
/* Copy *up to* NBYTES bytes from SRC_BP to DST_BP, with
the assumption that DST_BP is aligned on an OPSIZ multiple. If
not all bytes could be easily copied, store remaining number of bytes
@@ -125,6 +126,8 @@ typedef unsigned char byte;
(nbytes_left) = (nbytes) % OPSIZ; \
} while (0)
+#endif
+
/* Copy *up to* NBYTES_TO_COPY bytes from SRC_END_PTR to DST_END_PTR,
beginning at the words (of type op_t) right before the pointers and
continuing towards smaller addresses. May take advantage of that