diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-20 13:42:07 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-20 13:48:06 -0800 |
commit | 2daff75bab89a597b2a29bc6f3c7f88e12352355 (patch) | |
tree | a7fad24afe394a6b5f25dbd066b72a073df4fa55 | |
parent | 5c866a8b9be0bd8dff97dd8143e55dd228617c23 (diff) | |
download | glibc-2daff75bab89a597b2a29bc6f3c7f88e12352355.tar glibc-2daff75bab89a597b2a29bc6f3c7f88e12352355.tar.gz glibc-2daff75bab89a597b2a29bc6f3c7f88e12352355.tar.bz2 glibc-2daff75bab89a597b2a29bc6f3c7f88e12352355.zip |
sparc: Fix v9 memchr with long buffer lengths.
test-memchr fails on 32-bit sparc with v9 optimized memchr because
it uses signed branch comparisons on the buffer pointers.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/memchr.S | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -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): diff --git a/sysdeps/sparc/sparc64/memchr.S b/sysdeps/sparc/sparc64/memchr.S index 4f13cb5706..ab1666bfb5 100644 --- a/sysdeps/sparc/sparc64/memchr.S +++ b/sysdeps/sparc/sparc64/memchr.S @@ -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 */ |