]> sourceware.org Git - glibc.git/commitdiff
sparc: Fix v9 memchr with long buffer lengths.
authorDavid S. Miller <davem@davemloft.net>
Sat, 20 Feb 2010 21:42:07 +0000 (13:42 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Feb 2010 21:48:06 +0000 (13:48 -0800)
test-memchr fails on 32-bit sparc with v9 optimized memchr because
it uses signed branch comparisons on the buffer pointers.

ChangeLog
sysdeps/sparc/sparc64/memchr.S

index cd1be5759567524c0a1f11a074dd7872591d0bef..8b91c5f9eadd001285a6cb5775d2154eddc29def 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
        * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_runtime_setup):
        Adjust rela->r_offset by l->l_addr when rewriting PLT.
 
+       * sysdeps/sparc/sparc64/memchr.S: Use unsigned branch on greater to
+       test end of buffer.
+
 2009-02-20  Joseph Myers  <joseph@codesourcery.com>
 
        * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_runtime_setup):
index 4f13cb57069ecd9e948355d92493ebf6e235c1c9..ab1666bfb5e8dbe63049a9da1afe01db0d0cd1db 100644 (file)
@@ -96,7 +96,7 @@ ENTRY(__memchr)
                                                         * %o4 =   value XOR c          */
 2:     cmp             %o0, %o2                        /* IEU1         Group           */
 
-       bg,pn           %XCC, 11f                       /* CTI                          */
+       bgu,pn          %XCC, 11f                       /* CTI                          */
         ldxa           [%o0] ASI_PNF, %o3              /* Load                         */
        sub             %o4, %g1, %o5                   /* IEU0         Group           */
        add             %o0, 8, %o0                     /* IEU1                         */
This page took 0.058933 seconds and 5 git commands to generate.