sh: Add new optimisation to the SH4 memcpy
commit5c9ef58ec4bcb2def9e30f0b156f9cfcb1d0d163
authorAustin Foxley <austinf@cetoncorp.com>
Sun, 22 Nov 2009 20:17:38 +0000 (22 12:17 -0800)
committerAustin Foxley <austinf@cetoncorp.com>
Sun, 22 Nov 2009 20:17:38 +0000 (22 12:17 -0800)
treef8f889678b653d5275c285a037b9b43f27a91192
parentf757db2d319ccc5f7034165046fb2bb58901afb1
sh: Add new optimisation to the SH4 memcpy

This optimization is based on prefetching and 64bit data transfer via FPU
(only for the little endianess)

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: Austin Foxley <austinf@cetoncorp.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
libc/string/Makefile.in
libc/string/sh/memchr.S [new file with mode: 0644]
libc/string/sh/sh4/memcpy.S
libc/string/sh/sh4/memmove.c [new file with mode: 0644]
libc/string/sh/sh4/memset.S [new file with mode: 0644]
libc/string/sh/sh4/strcpy.S [new file with mode: 0644]
libc/string/sh/sh4/strncpy.S [new file with mode: 0644]
libc/string/sh/strlen.S [new file with mode: 0644]