* libc/machine/sh/strcpy.S (strcpy): make sure r0 has right value

at first loop exit point.
This commit is contained in:
Joern Rennecke 2002-05-16 17:29:15 +00:00
parent d7a2f413bc
commit 6935231fde
2 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,8 @@
Thu May 16 16:12:00 2002 J"orn Rennecke <joern.rennecke@superh.com>
Thu May 16 17:24:57 2002 J"orn Rennecke <joern.rennecke@superh.com>
* libc/machine/sh/strcpy.S (strcpy): Replace LITTLE_ENDIAN with
__LITTLE_ENDIAN__.
__LITTLE_ENDIAN__. make sure r0 has right value at first loop
exit point.
2002-05-15 Thomas Fitzsimmons <fitzsim@redhat.com>

View File

@ -14,7 +14,7 @@ ENTRY(strcpy)
ldlo.q r3,0,r4
ptabs r18,tr4
shlli r3,3,r7
add r2,r63,r0
addi r2, 8, r0
mcmpeq.b r4,r63,r6
SHHI r6,r7,r6
bnei/u r6,0,tr1 // shortstring
@ -38,6 +38,7 @@ ENTRY(strcpy)
beqi/l r6, 0, tr0 // loop
add r5, r63, r4
addi r0, 8, r0
blink tr1, r63 // shortstring
no_lddst:
stlo.q r2, 0, r4
@ -46,13 +47,14 @@ no_lddst:
beqi/l r6, 0, tr0 // loop
add r5, r63, r4
addi r0, 8, r0
shortstring:
#ifndef __LITTLE_ENDIAN__
pta/l shortstring2,tr1
byterev r4,r4
#endif
shortstring2:
st.b r0,0,r4
st.b r0,-8,r4
andi r4,0xff,r5
shlri r4,8,r4
addi r0,1,r0
@ -74,6 +76,7 @@ loop:
beqi/l r6, 0, tr0 // loop
add r5, r63, r4
addi r0, 8, r0
blink tr1, r63 // shortstring
#else /* ! __SHMEDIA__, i.e. SH 1..4 / SHcompact */