diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-12-19 22:30:48 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-12-19 22:30:48 +0000 |
commit | 5723639e3ccaa5b214ebe31dcdce31ba1cbf6bef (patch) | |
tree | 9bf742edc4a332b8715160b66727b543ba5ebda2 /sys | |
parent | 7412f6d3de493abc18236e2f44c24d7404db1aca (diff) |
sync with libc, using brnz,pt instead, should be better
ok kettenis
Diffstat (limited to 'sys')
-rw-r--r-- | sys/lib/libkern/arch/sparc64/strlen.S | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/lib/libkern/arch/sparc64/strlen.S b/sys/lib/libkern/arch/sparc64/strlen.S index 091cdc70f36..bf6ae9a362c 100644 --- a/sys/lib/libkern/arch/sparc64/strlen.S +++ b/sys/lib/libkern/arch/sparc64/strlen.S @@ -1,4 +1,4 @@ -/* $OpenBSD: strlen.S,v 1.4 2007/11/25 18:25:36 deraadt Exp $ */ +/* $OpenBSD: strlen.S,v 1.5 2014/12/19 22:30:47 deraadt Exp $ */ /* $NetBSD: strlen.S,v 1.1.1.1 1998/06/20 05:18:14 eeh Exp $ */ /* @@ -42,8 +42,7 @@ ENTRY(strlen) add %o0, 1, %o1 ! save starting point + 1 1: ldsb [%o0], %o2 ! fetch byte - tst %o2 ! null? - bne 1b ! no, keep going - inc %o0 ! always increment pointer + brnz,pt %o2, 1b ! no, keep going + inc %o0 ! always increment pointer retl - sub %o0, %o1, %o0 ! return length (ptr - (origptr+1)) + sub %o0, %o1, %o0 ! return length (ptr - (origptr+1)) |