sh: update the memcpy adding a new loop with aggressive prefetching
commita27dd6924e7964d92b49f4d5ebe2e68cfb2742dd
authorSalvatore Cro <salvatore.cro@st.com>
Thu, 9 Sep 2010 14:10:21 +0000 (9 16:10 +0200)
committerCarmelo Amoroso <carmelo.amoroso@st.com>
Wed, 15 Sep 2010 10:51:04 +0000 (15 12:51 +0200)
tree627befce36a43bffdb02bacca575a2c01256fd7a
parent599c74a4d7e9bbe68b946d65aef2725821ea3fe9
sh: update the memcpy adding a new loop with aggressive prefetching

After exploring different prefetch distance-degree combinations
in this new update of the memcpy function, a new loop has been added
for moving many cache lines with an aggressive prefetching schema.
Prefetch has been removed when move few cache line aligned blocks.
As final result, this memcpy gives us the same performances for small
sizes (we already had!) and better numbers for big copies.
In case of SH4-300 CPU Series, benchmarks show a gain of ~20% for sizes
from 4KiB to 256KiB.
In case of the SH4-200, there is a gain of ~40% for sizes bigger than
32KiB.

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