From: David S. Miller Date: Sun, 7 Oct 2012 01:36:40 +0000 (-0700) Subject: Fix Niagara-4 memcpy bug on 32-bit. X-Git-Tag: glibc-2.17~435 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1ecb7ef7f5703fc156b8ab2ca153d774c39ec7a;p=thirdparty%2Fglibc.git Fix Niagara-4 memcpy bug on 32-bit. * sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S: On 32-bit, clear upper 32-bits of the length value in %o2 since we use branch-on-register tests which consider the entire 64-bit register. --- diff --git a/ChangeLog b/ChangeLog index fe1e0193986..1c8111b2767 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-10-06 David S. Miller + + * sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S: On 32-bit, clear + upper 32-bits of the length value in %o2 since we use branch-on-register + tests which consider the entire 64-bit register. + 2012-10-06 H.J. Lu * string/test-strstr.c (check2): Add a test for page boundary. diff --git a/sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S b/sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S index 7bb05b98182..3da98a87ab3 100644 --- a/sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S +++ b/sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S @@ -64,6 +64,9 @@ ENTRY(__memcpy_niagara4) 100: /* %o0=dst, %o1=src, %o2=len */ mov %o0, %o3 101: +#ifndef __arch64__ + srl %o2, 0, %o2 +#endif brz,pn %o2, .Lexit cmp %o2, 3 ble,pn %icc, .Ltiny