summaryrefslogtreecommitdiffstats
path: root/sys/lib/libkern/arch
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-12-19 22:30:47 +0000
committerderaadt <deraadt@openbsd.org>2014-12-19 22:30:47 +0000
commit6bbfe5013da935b90d58006456421452d87bf61d (patch)
tree6c2bac9a5e93103ff13dd652097f1886eccef06b /sys/lib/libkern/arch
parentUse a simpler expression to check the ether type in scapy. This (diff)
downloadwireguard-openbsd-6bbfe5013da935b90d58006456421452d87bf61d.tar.xz
wireguard-openbsd-6bbfe5013da935b90d58006456421452d87bf61d.zip
sync with libc, using brnz,pt instead, should be better
ok kettenis
Diffstat (limited to 'sys/lib/libkern/arch')
-rw-r--r--sys/lib/libkern/arch/sparc64/strlen.S9
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))