aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc64/memchr.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-04-16 19:40:31 -0700
committerDavid S. Miller <davem@davemloft.net>2015-04-17 10:26:14 -0700
commitaa4980fc31e9ce176fe954bd0f29bcd65a61556a (patch)
tree61bc6a99b44a56bcf031f73116d1f6507ac84b49 /sysdeps/sparc/sparc64/memchr.S
parentd1e44df1fa5fefd8a083f6c1e909bbcdc97c6438 (diff)
downloadglibc-aa4980fc31e9ce176fe954bd0f29bcd65a61556a.tar
glibc-aa4980fc31e9ce176fe954bd0f29bcd65a61556a.tar.gz
glibc-aa4980fc31e9ce176fe954bd0f29bcd65a61556a.tar.bz2
glibc-aa4980fc31e9ce176fe954bd0f29bcd65a61556a.zip
Sparc memchr/memcmp/strncmp fixes from Il'ya Malakhov.
[BZ #17825] * sysdeps/sparc/sparc64/memchr.S: Fix signedness handling of length. * sysdeps/sparc/sparc64/memcmp.S: Likewise. * sysdeps/sparc/sparc64/strncmp.S: Likewise.
Diffstat (limited to 'sysdeps/sparc/sparc64/memchr.S')
-rw-r--r--sysdeps/sparc/sparc64/memchr.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/sparc/sparc64/memchr.S b/sysdeps/sparc/sparc64/memchr.S
index 23ed62ea4d..d92bad156c 100644
--- a/sysdeps/sparc/sparc64/memchr.S
+++ b/sysdeps/sparc/sparc64/memchr.S
@@ -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 */