From owner-svn-src-projects@FreeBSD.ORG Sun Jul 5 21:16:26 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCB751065670; Sun, 5 Jul 2009 21:16:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAC3E8FC16; Sun, 5 Jul 2009 21:16:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n65LGQjO059894; Sun, 5 Jul 2009 21:16:26 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n65LGQfO059892; Sun, 5 Jul 2009 21:16:26 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200907052116.n65LGQfO059892@svn.freebsd.org> From: Warner Losh Date: Sun, 5 Jul 2009 21:16:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195382 - projects/mips/sys/mips/include X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 21:16:27 -0000 Author: imp Date: Sun Jul 5 21:16:26 2009 New Revision: 195382 URL: http://svn.freebsd.org/changeset/base/195382 Log: addu and subu are special. We need to use daddu and dsubu here to get proper behavior. Submitted by: jmallet@ Modified: projects/mips/sys/mips/include/atomic.h Modified: projects/mips/sys/mips/include/atomic.h ============================================================================== --- projects/mips/sys/mips/include/atomic.h Sun Jul 5 20:44:50 2009 (r195381) +++ projects/mips/sys/mips/include/atomic.h Sun Jul 5 21:16:26 2009 (r195382) @@ -220,7 +220,7 @@ atomic_add_64(__volatile uint64_t *p, ui __asm __volatile ( "1:\n\t" "lld %0, %3\n\t" /* load old value */ - "addu %0, %2, %0\n\t" /* calculate new value */ + "daddu %0, %2, %0\n\t" /* calculate new value */ "scd %0, %1\n\t" /* attempt to store */ "beqz %0, 1b\n\t" /* spin if failed */ : "=&r" (temp), "=m" (*p) @@ -236,7 +236,7 @@ atomic_subtract_64(__volatile uint64_t * __asm __volatile ( "1:\n\t" "lld %0, %3\n\t" /* load old value */ - "subu %0, %2\n\t" /* calculate new value */ + "dsubu %0, %2\n\t" /* calculate new value */ "scd %0, %1\n\t" /* attempt to store */ "beqz %0, 1b\n\t" /* spin if failed */ : "=&r" (temp), "=m" (*p)