From owner-p4-projects Tue Feb 18 22:45: 9 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 35E3137B405; Tue, 18 Feb 2003 22:45:07 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C481B37B401 for ; Tue, 18 Feb 2003 22:45:06 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6747443FCB for ; Tue, 18 Feb 2003 22:45:06 -0800 (PST) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h1J6j60U068706 for ; Tue, 18 Feb 2003 22:45:06 -0800 (PST) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h1J6j5Vf068703 for perforce@freebsd.org; Tue, 18 Feb 2003 22:45:05 -0800 (PST) Date: Tue, 18 Feb 2003 22:45:05 -0800 (PST) Message-Id: <200302190645.h1J6j5Vf068703@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett Subject: PERFORCE change 25411 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=25411 Change 25411 by jmallett@jmallett_dalek on 2003/02/18 22:44:59 Avoid branch conditional issues, real and imagined. Use unsigned byte loads, to fetch one character. Affected files ... .. //depot/projects/mips/sys/mips/mips/support.S#5 edit Differences ... ==== //depot/projects/mips/sys/mips/mips/support.S#5 (text+ko) ==== @@ -44,13 +44,14 @@ */ ENTRY(bcopy) beqz a2, 2f + nop subu a2, 1 -1: lb t0, (a0) +1: lbu t0, (a0) addu a0, 1 sb t0, (a1) + subu a2, 1 + bnezl a2, 1b addu a1, 1 - bnezl a2, 1b - subu a2, 1 2: jr ra nop END(bcopy) @@ -61,11 +62,12 @@ */ ENTRY(bzero) beqz a1, 2f + nop subu a1, 1 1: sb zero, (a0) + subu a1, 1 + bnezl a1, 1b addu a0, 1 - bnezl a1, 1b - subu a1, 1 2: jr ra nop END(bzero) @@ -75,15 +77,15 @@ * void *memcpy(void *dst, const void *src, size_t len) */ ENTRY(memcpy) + beqz a2, 2f move v0, a0 - beqz a2, 2f subu a2, 1 -1: lb t0, (a1) +1: lbu t0, (a1) addu a1, 1 sb t0, (a0) + subu a2, 1 + bnezl a2, 1b addu a0, 1 - bnezl a2, 1b - subu a2, 1 2: jr ra nop END(memcpy) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message