From owner-p4-projects@FreeBSD.ORG Mon May 12 17:37:11 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3FB9937B404; Mon, 12 May 2003 17:37:11 -0700 (PDT) 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 CA37137B401 for ; Mon, 12 May 2003 17:37:10 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7076B43FA3 for ; Mon, 12 May 2003 17:37:10 -0700 (PDT) (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 h4D0bA0U047379 for ; Mon, 12 May 2003 17:37:10 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D0b9YR047376 for perforce@freebsd.org; Mon, 12 May 2003 17:37:09 -0700 (PDT) Date: Mon, 12 May 2003 17:37:09 -0700 (PDT) Message-Id: <200305130037.h4D0b9YR047376@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31037 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 00:37:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=31037 Change 31037 by jmallett@jmallett_dalek on 2003/05/12 17:36:28 Use implicit-operand-is-destination (two-register) syntax for the atomic ops so that we can fit more on one line. Remember to not (and re-not to loop) the val we and with in clear. This is significantly better than doing it before and after we loop, and thus fudging up the API here, but it would be a lot faster to avoid these nots, so probably that's a mess to be made once that matters. Affected files ... .. //depot/projects/mips/sys/mips/include/atomic.h#16 edit Differences ... ==== //depot/projects/mips/sys/mips/include/atomic.h#16 (text+ko) ==== @@ -113,10 +113,10 @@ ); \ } -ATOMIC_OP(add, "addu %[temp], %[temp], %[val]") -ATOMIC_OP(clear, "and %[temp], %[temp], %[val]") -ATOMIC_OP(set, "or %[temp], %[temp], %[val]") -ATOMIC_OP(subtract, "subu %[temp], %[temp], %[val]") +ATOMIC_OP(add, "addu %[temp], %[val]") +ATOMIC_OP(clear, "not %[val] ; and %[temp], %[val] ; not %[val]") +ATOMIC_OP(set, "or %[temp], %[val]") +ATOMIC_OP(subtract, "subu %[temp], %[val]") ATOMIC_ACQ_OP(int, add) ATOMIC_REL_OP(int, add) @@ -201,10 +201,10 @@ ); \ } -ATOMIC_DOP(add, "daddu %[temp], %[temp], %[val]") -ATOMIC_DOP(clear, "and %[temp], %[temp], %[val]") -ATOMIC_DOP(set, "or %[temp], %[temp], %[val]") -ATOMIC_DOP(subtract, "dsubu %[temp], %[temp], %[val]") +ATOMIC_DOP(add, "daddu %[temp], %[val]") +ATOMIC_DOP(clear, "not %[val] ; and %[temp], %[val] ; not %[val]") +ATOMIC_DOP(set, "or %[temp], %[val]") +ATOMIC_DOP(subtract, "dsubu %[temp], %[val]") ATOMIC_ACQ_OP(long, add) ATOMIC_REL_OP(long, add)