* libc/machine/sh/memset.S (memset, __SHMEDIA__ code):
Also handle as single quad word when destination ends at last byte of first quad word. Fix byte selection in single quad code.
This commit is contained in:
parent
0dc9d4d7ed
commit
96bff22c5d
@ -1,3 +1,9 @@
|
|||||||
|
Wed May 8 17:47:35 2002 J"orn Rennecke <joern.rennecke@superh.com>
|
||||||
|
|
||||||
|
* libc/machine/sh/memset.S (memset, __SHMEDIA__ code):
|
||||||
|
Also handle as single quad word when destination ends at last
|
||||||
|
byte of first quad word. Fix byte selection in single quad code.
|
||||||
|
|
||||||
2002-05-07 Thomas Fitzsimmons <fitzsim@redhat.com>
|
2002-05-07 Thomas Fitzsimmons <fitzsim@redhat.com>
|
||||||
|
|
||||||
* libc/include/sys/stdio.h: New file.
|
* libc/include/sys/stdio.h: New file.
|
||||||
@ -685,14 +691,14 @@ Tue Mar 26 17:17:10 2002 J"orn Rennecke <joern.rennecke@superh.com>
|
|||||||
|
|
||||||
Wed Mar 6 10:24:26 2002 J"orn Rennecke <joern.rennecke@superh.com>
|
Wed Mar 6 10:24:26 2002 J"orn Rennecke <joern.rennecke@superh.com>
|
||||||
|
|
||||||
* Makefile.am (lib_a_SOURCES, SH64 case): Add memcpy.S, memset.S
|
* libc/machine/sh/Makefile.am (lib_a_SOURCES, SH64 case):
|
||||||
and strcpy.S.
|
Add memcpy.S, memset.S and strcpy.S.
|
||||||
* Makefile.in: Regenerate.
|
* libc/machine/sh/Makefile.in: Regenerate.
|
||||||
* asm.h (_ENTRY): Set SH5 alignment to 8 bytes.
|
* libc/machine/sh/asm.h (_ENTRY): Set SH5 alignment to 8 bytes.
|
||||||
(SHHI, SHLO): Define.
|
(SHHI, SHLO): Define.
|
||||||
* memcpy.S: Add code for SH5.
|
* libc/machine/sh/memset.S: Add code for SH5.
|
||||||
* memset.S: Likewise.
|
* libc/machine/sh/memset.S: Likewise.
|
||||||
* strcpy.S: Likewise.
|
* libc/machine/sh/strcpy.S: Likewise.
|
||||||
|
|
||||||
2002-02-27 Jeff Johnston <jjohnstn@redhat.com>
|
2002-02-27 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
|
@ -12,33 +12,35 @@
|
|||||||
ENTRY(memset)
|
ENTRY(memset)
|
||||||
#if __SHMEDIA__
|
#if __SHMEDIA__
|
||||||
pta/l multiquad, tr0
|
pta/l multiquad, tr0
|
||||||
|
andi r2, 7, r22
|
||||||
ptabs r18, tr2
|
ptabs r18, tr2
|
||||||
mshflo.b r3,r3,r3
|
mshflo.b r3,r3,r3
|
||||||
mperm.w r3, r63, r3
|
|
||||||
|
|
||||||
andi r2, 7, r22
|
|
||||||
add r4, r22, r23
|
add r4, r22, r23
|
||||||
shlri r23, 3, r24
|
mperm.w r3, r63, r3 // Fill pattern now in every byte of r3
|
||||||
bnei/u r24, 0, tr0
|
|
||||||
|
movi 8, r9
|
||||||
|
bgtu/u r23, r9, tr0
|
||||||
|
|
||||||
ldlo.q r2, 0, r7
|
ldlo.q r2, 0, r7
|
||||||
shlli r4, 3, r4
|
shlli r4, 2, r4
|
||||||
movi -1, r8
|
movi -1, r8
|
||||||
SHHI r8, r4, r8
|
SHHI r8, r4, r8
|
||||||
mcmv r7, r8, r22
|
SHHI r8, r4, r8
|
||||||
stlo.q r2, 0, r22
|
mcmv r7, r8, r3
|
||||||
|
stlo.q r2, 0, r3
|
||||||
blink tr2, r63
|
blink tr2, r63
|
||||||
|
|
||||||
multiquad:
|
multiquad:
|
||||||
pta/l lastquad, tr0
|
pta/l lastquad, tr0
|
||||||
stlo.q r2, 0, r3
|
stlo.q r2, 0, r3
|
||||||
|
shlri r23, 3, r24
|
||||||
add r2, r4, r5
|
add r2, r4, r5
|
||||||
beqi/u r24, 1, tr0 // lastquad
|
beqi/u r24, 1, tr0 // lastquad
|
||||||
pta/l loop, tr1
|
pta/l loop, tr1
|
||||||
sub r2, r22, r25
|
sub r2, r22, r25
|
||||||
andi r5, -8, r20 // calculate end address and
|
andi r5, -8, r20 // calculate end address and
|
||||||
addi r20, -7*8, r8 // loop end address; This might overflow, so we need
|
addi r20, -7*8, r8 // loop end address; This might overflow, so we need
|
||||||
movi 8, r9 // to use a different test before we start the loop
|
// to use a different test before we start the loop
|
||||||
bge/u r24, r9, tr1 // loop
|
bge/u r24, r9, tr1 // loop
|
||||||
st.q r25, 8, r3
|
st.q r25, 8, r3
|
||||||
st.q r20, -8, r3
|
st.q r20, -8, r3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user