OSDN Git Service

sh: fix endianess and optimise the SH4 memcpy
authorGiuseppe Cavallaro <peppe.cavallaro@st.com>
Mon, 14 Dec 2009 15:45:49 +0000 (16:45 +0100)
committerCarmelo Amoroso <carmelo.amoroso@st.com>
Mon, 14 Dec 2009 16:03:34 +0000 (17:03 +0100)
commit8cd420c223f1a39c01835189669928ea8df9d221
tree9698aabfd30235d568e823ecab91811688f1df94
parent6732cb1ae137d7af17eb911004ba904badba1b85
sh: fix endianess and optimise the SH4 memcpy

This patch fixes the big-endian code and adds a new optimization
only for little endian mode.
This optimization is based on prefetching and 64bit data transfer via FPU.
Tests shows that

----------------------------------------
 Memory bandwidth    |        Gain
                     | sh4-300 | sh4-200
----------------------------------------
 512 bytes to 16KiB  | ~20%    | ~25%
 from 32KiB to 16MiB | ~190%   | ~5%
----------------------------------------

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
libc/string/sh/sh4/memcpy.S