]> sourceware.org Git - newlib-cygwin.git/commitdiff
* libc/machine/sh/memset.S: Fix problem with alloco region
authorJoern Rennecke <joern.rennecke@embecosm.com>
Thu, 3 Apr 2003 13:06:02 +0000 (13:06 +0000)
committerJoern Rennecke <joern.rennecke@embecosm.com>
Thu, 3 Apr 2003 13:06:02 +0000 (13:06 +0000)
exceeding destination region for length >= 88 bytes, start
& 0x16 == 0, end & 0x1f == 18.

newlib/ChangeLog
newlib/libc/machine/sh/memset.S

index 5a692191a26ed95f27b020869671a3a72575412c..d66f67d0044cee3cf3ffdeb91403b2c5518bf1a8 100644 (file)
@@ -1,3 +1,9 @@
+Thu Apr  3 14:01:16 2003  J"orn Rennecke <joern.rennecke@superh.com>
+
+       * libc/machine/sh/memset.S: Fix problem with alloco region
+       exceeding destination region for length >= 88 bytes, start
+       & 0x16 == 0, end & 0x1f == 18.
+
 2001-04-03  Corinna Vinschen  <corinna@vinschen.de>
 
        * libc/string/wcscoll.c: Fix comment.
index 3d37e33e3efe812c19b982d9c0a7fb133c3115c0..ab71d95809e8a5e9431eefc5ba9634ff28667562 100644 (file)
 ENTRY(memset)
 #if __SHMEDIA__
        pta/l multiquad, tr0
-       andi r2, 7, r22
-       ptabs r18, tr2
        mshflo.b r3,r3,r3
-       add r4, r22, r23
+       ptabs r18, tr2
        mperm.w r3, r63, r3     // Fill pattern now in every byte of r3
 
-       movi 8, r9
-       bgtu/u r23, r9, tr0 // multiquad
+       andi r2, -8, r25
+       add r2, r4, r5
+       addi r5, -1, r20    // calculate end address.
+       andi r20, -8, r20
+       cmveq r4, r25, r20
+       bne/u r25, r20, tr0 // multiquad
 
        ldlo.q r2, 0, r7
        shlli r4, 2, r4
@@ -33,18 +35,16 @@ ENTRY(memset)
 multiquad:
        pta/l lastquad, tr0
        stlo.q r2, 0, r3
-       shlri r23, 3, r24
-       add r2, r4, r5
-       beqi/u r24, 1, tr0 // lastquad
+       sub r20, r25, r24
+       movi 64, r9
+       beqi/u r24, 8, tr0 // lastquad
        pta/l loop, tr1
-       sub r2, r22, r25
-       andi r5, -8, r20   // calculate end address and
        addi r20, -7*8, r8 // loop end address; This might overflow, so we need
                           // to use a different test before we start the loop
-       bge/u r24, r9, tr1 // loop
+       bgeu/u r24, r9, tr1// loop
        st.q r25, 8, r3
+       shlri r24, 4, r24
        st.q r20, -8, r3
-       shlri r24, 1, r24
        beqi/u r24, 1, tr0 // lastquad
        st.q r25, 16, r3
        st.q r20, -16, r3
This page took 0.045837 seconds and 5 git commands to generate.