summaryrefslogtreecommitdiff
path: root/libc/string/sh/sh4
diff options
context:
space:
mode:
authorGiuseppe Cavallaro <peppe.cavallaro@st.com>2009-07-13 17:45:09 +0200
committerCarmelo Amoroso <carmelo.amoroso@st.com>2009-07-14 07:56:25 +0200
commit9952af00f1cc08a5605d6c57578d09a89adb64f4 (patch)
tree25c4d84d65e5291cfc7dc384da99d2de267d55ad /libc/string/sh/sh4
parentc06402cccc4c6278d762900e6a205394638d9c22 (diff)
sh: Fix up optimized SH-4 memcpy on big endian.
Signed-off-by: Hideo Saito <saito@densan.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> See Linux Kernel commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e08b954c9a140f2062649faec72514eb505f18c3 Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/string/sh/sh4')
-rw-r--r--libc/string/sh/sh4/memcpy.S24
1 files changed, 12 insertions, 12 deletions
diff --git a/libc/string/sh/sh4/memcpy.S b/libc/string/sh/sh4/memcpy.S
index 2d918293e..0954bce85 100644
--- a/libc/string/sh/sh4/memcpy.S
+++ b/libc/string/sh/sh4/memcpy.S
@@ -127,10 +127,10 @@
mov.l r3,@-r0 ! 30 LS
#else
-3: mov r1,r3 ! OPQR
+3: mov r7,r3 ! OPQR
shlr8 r3 ! xOPQ
- mov.l @(r0,r5),r1 ! KLMN
- mov r1,r6
+ mov.l @(r0,r5),r7 ! KLMN
+ mov r7,r6
shll16 r6
shll8 r6 ! Nxxx
or r6,r3 ! NOPQ
@@ -733,30 +733,30 @@ memcpy:
mov.l @(0x04,r5), r11 ! 18 LS (latency=2)
xtrct r9, r8 ! 48 EX
- mov.w @(0x02,r5), r12 ! 18 LS (latency=2)
+ mov.l @(0x00,r5), r12 ! 18 LS (latency=2)
xtrct r10, r9 ! 48 EX
movca.l r0,@r1 ! 40 LS (latency=3-7)
add #-0x1c, r1 ! 50 EX
- mov.l r3, @(0x1c,r1) ! 33 LS
+ mov.l r3, @(0x18,r1) ! 33 LS
xtrct r11, r10 ! 48 EX
- mov.l r6, @(0x18,r1) ! 33 LS
+ mov.l r6, @(0x14,r1) ! 33 LS
xtrct r12, r11 ! 48 EX
- mov.l r7, @(0x14,r1) ! 33 LS
+ mov.l r7, @(0x10,r1) ! 33 LS
- mov.l r8, @(0x10,r1) ! 33 LS
- add #-0x3e, r5 ! 50 EX
+ mov.l r8, @(0x0c,r1) ! 33 LS
+ add #-0x1e, r5 ! 50 EX
- mov.l r9, @(0x0c,r1) ! 33 LS
+ mov.l r9, @(0x08,r1) ! 33 LS
cmp/eq r2,r1 ! 54 MT
- mov.l r10, @(0x08,r1) ! 33 LS
+ mov.l r10, @(0x04,r1) ! 33 LS
bf/s 2b ! 109 BR
- mov.l r11, @(0x04,r1) ! 33 LS
+ mov.l r11, @(0x00,r1) ! 33 LS
#endif
mov.l @r15+, r12