From 6bbfe5013da935b90d58006456421452d87bf61d Mon Sep 17 00:00:00 2001 From: deraadt Date: Fri, 19 Dec 2014 22:30:47 +0000 Subject: [PATCH] sync with libc, using brnz,pt instead, should be better ok kettenis --- sys/lib/libkern/arch/sparc64/strlen.S | 9 ++++----- 1 file 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)) -- 2.20.1