]> sourceware.org Git - glibc.git/commitdiff
Sparc memchr/memcmp/strncmp fixes from Il'ya Malakhov.
authorDavid S. Miller <davem@davemloft.net>
Fri, 17 Apr 2015 02:40:31 +0000 (19:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Apr 2015 17:26:14 +0000 (10:26 -0700)
[BZ #17825]
* sysdeps/sparc/sparc64/memchr.S: Fix signedness handling of length.
* sysdeps/sparc/sparc64/memcmp.S: Likewise.
* sysdeps/sparc/sparc64/strncmp.S: Likewise.

ChangeLog
sysdeps/sparc/sparc64/memchr.S
sysdeps/sparc/sparc64/memcmp.S
sysdeps/sparc/sparc64/strncmp.S

index 44dc704b55535d2481548e961b747316a24513c2..411ef3dcc3d642a374625e7d15b72427fbab6a7e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-04-17  Il'ya Malakhov <ilmalakhov@yandex.ru>
+
+       [BZ #17825]
+       * sysdeps/sparc/sparc64/memchr.S: Fix signedness handling of length.
+       * sysdeps/sparc/sparc64/memcmp.S: Likewise.
+       * sysdeps/sparc/sparc64/strncmp.S: Likewise.
+
 2015-04-17  Roland McGrath  <roland@hack.frob.com>
 
        Add preliminary port to Google Native Client on ARM.
index 23ed62ea4da40a3714ddbea8d97d390e770e7166..d92bad156c4a756e2e3e043e13ccfe73ca9bc5f7 100644 (file)
@@ -63,7 +63,8 @@ ENTRY(__memchr)
        be,pn           %XCC, 12f                       /* CTI                          */
 #endif
         sll            %o1, 8, %g3                     /* IEU0         Group           */
-       add             %o0, %o2, %o2                   /* IEU1                         */
+       addcc           %o0, %o2, %o2                   /* IEU1                         */
+       movcs           %XCC, -1, %o2                   /* IEU0         Group           */
 
        sethi           %hi(0x01010101), %g1            /* IEU0         Group           */
        or              %g3, %o1, %g3                   /* IEU1                         */
index 18ed0ce77a3bca2533df2a261b9e3a6aa5f56610..552307edeb6a0a3b94f2631abfa1beaab4e83c1d 100644 (file)
@@ -51,7 +51,7 @@ ENTRY(memcmp)
 2:     mov             %g1, %o3                        /* IEU0         Group           */
        subcc           %o2, 8, %o2                     /* IEU1                         */
 
-       bl,pn           %XCC, 5f                        /* CTI                          */
+       bcs,pn          %XCC, 5f                        /* CTI                          */
         ldxa           [%o0] ASI_PNF, %g1              /* Load         Group           */
        mov             %g2, %o4                        /* IEU0                         */
        ldxa            [%o0 + %o1] ASI_PNF, %g2        /* Load         Group           */
@@ -125,7 +125,7 @@ ENTRY(memcmp)
 
        ldxa            [%o0] ASI_PNF, %g5              /* Load                         */
        subcc           %o2, 8, %o2                     /* IEU1         Group           */
-       bl,pn           %XCC, 6b                        /* CTI                          */
+       bcs,pn          %XCC, 6b                        /* CTI                          */
         or             %o4, %o5, %o4                   /* IEU0                         */
 
        cmp             %o3, %o4                        /* IEU1         Group           */
index cf8f56e7126f43781da57e908cf794a7803b35c8..233b62b20aa1025d9c1b8d89f91b426dd93e6ded 100644 (file)
@@ -72,7 +72,7 @@ ENTRY(strncmp)
 
        add             %o0, 8, %o0                     /* IEU1                         */
 2:     subcc           %o2, 8, %o2                     /* IEU1         Group           */
-       bl,pn           %XCC, 5f                        /* CTI                          */
+       bcs,pn          %XCC, 5f                        /* CTI                          */
         add            %o1, 8, %o1                     /* IEU0                         */
 
        sub             %g4, %g1, %g3                   /* IEU0         Group           */
@@ -310,7 +310,7 @@ ENTRY(strncmp)
        addcc           %o0, 8, %o0                     /* IEU1                         */
        srlx            %o4, %g6, %o5                   /* IEU0                         */
        subcc           %o2, 8, %o2                     /* IEU1         Group           */
-       bl,pn           %XCC, 5b                        /* CTI                          */
+       bcs,pn          %XCC, 5b                        /* CTI                          */
 
         or             %o3, %o5, %o3                   /* IEU0                         */
        cmp             %g4, %o3                        /* IEU1         Group           */
This page took 0.122584 seconds and 5 git commands to generate.