From owner-p4-projects@FreeBSD.ORG Thu May 8 21:46:28 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 74F8937B404; Thu, 8 May 2003 21:46:28 -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 EE74637B401 for ; Thu, 8 May 2003 21:46:27 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 736D443F75 for ; Thu, 8 May 2003 21:46:27 -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 h494kR0U018224 for ; Thu, 8 May 2003 21:46:27 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h494kR5k018221 for perforce@freebsd.org; Thu, 8 May 2003 21:46:27 -0700 (PDT) Date: Thu, 8 May 2003 21:46:27 -0700 (PDT) Message-Id: <200305090446.h494kR5k018221@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 30831 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: Fri, 09 May 2003 04:46:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=30831 Change 30831 by jmallett@jmallett_dalek on 2003/05/08 21:46:20 Properly refer to input and output arguments, as to make these work. This fixes atomic_cmpset_ptr most notably for witness such that it gets past that point now. Inspired by Alpha & PowerPC. Affected files ... .. //depot/projects/mips/sys/mips/include/atomic.h#14 edit Differences ... ==== //depot/projects/mips/sys/mips/include/atomic.h#14 (text+ko) ==== @@ -103,12 +103,12 @@ \ __asm __volatile ( \ "1:\n\t" \ - "ll %[temp], (%[p])\n\t" \ + "ll %[temp], %[p]\n\t" \ asmop "\n\t" \ - "sc %[temp], (%[p])\n\t" \ + "sc %[temp], %[p]\n\t" \ "beqz %[temp], 1b\n\t" \ - : [val] "=r"(val) \ - : [temp] "r"(temp), [p] "r"(p) \ + : [val] "=&r"(val), [p] "+m"(*p) \ + : [temp] "r"(temp) \ : "memory" \ ); \ } @@ -139,15 +139,15 @@ __asm __volatile ( "1:\n\t" "move %[res], $0\n\t" - "ll %[temp], (%[p])\n\t" + "ll %[temp], %[p]\n\t" "bne %[temp], %[old], 2f\n\t" "move %[temp], %[val]\n\t" "li %[res], 1\n\t" - "sc %[temp], (%[p])\n\t" + "sc %[temp], %[p]\n\t" "beqz %[temp], 1b\n\t" "2:\n\t" - : [old] "=r"(old), [val] "=r"(val) - : [res] "r"(res), [temp] "r"(temp), [p] "r"(p) + : [res] "=&r"(res), [p] "+m"(*p) + : [old] "r"(old), [val] "r"(val), [temp] "r"(temp) : "memory" ); @@ -164,13 +164,13 @@ __asm __volatile ( "1:\n\t" - "ll %[temp], (%[p])\n\t" + "ll %[temp], %[p]\n\t" "move %[res], %[temp]\n\t" "move %[temp], $0\n\t" - "sc %[temp], (%[p])\n\t" + "sc %[temp], %[p]\n\t" "beqz %[temp], 1b\n\t" - : - : [temp] "r"(temp), [p] "r"(p), [res] "r"(res) + : [res] "=&r"(res), [p] "+m"(*p) + : [temp] "r"(temp) : "memory" ); @@ -191,12 +191,12 @@ \ __asm __volatile ( \ "1:\n\t" \ - "lld %[temp], (%[p])\n\t" \ + "lld %[temp], %[p]\n\t" \ asmop "\n\t" \ - "scd %[temp], (%[p])\n\t" \ + "scd %[temp], %[p]\n\t" \ "beqz %[temp], 1b\n\t" \ - : [val] "=r"(val) \ - : [temp] "r"(temp), [p] "r"(p) \ + : [val] "=&r"(val), [p] "+m"(*p) \ + : [temp] "r"(temp) \ : "memory" \ ); \ } @@ -227,15 +227,15 @@ __asm __volatile ( "1:\n\t" "move %[res], $0\n\t" - "lld %[temp], (%[p])\n\t" + "lld %[temp], %[p]\n\t" "bne %[temp], %[old], 2f\n\t" "move %[temp], %[val]\n\t" "li %[res], 1\n\t" - "scd %[temp], (%[p])\n\t" + "scd %[temp], %[p]\n\t" "beqz %[temp], 1b\n\t" "2:\n\t" - : [old] "=r"(old), [val] "=r"(val) - : [res] "r"(res), [temp] "r"(temp), [p] "r"(p) + : [res] "=&r"(res), [p] "+m"(*p) + : [old] "r"(old), [val] "r"(val), [temp] "r"(temp) : "memory" ); @@ -252,13 +252,13 @@ __asm __volatile ( "1:\n\t" - "lld %[temp], (%[p])\n\t" + "lld %[temp], %[p]\n\t" "move %[res], %[temp]\n\t" "move %[temp], $0\n\t" - "scd %[temp], (%[p])\n\t" + "scd %[temp], %[p]\n\t" "beqz %[temp], 1b\n\t" - : - : [temp] "r"(temp), [p] "r"(p), [res] "r"(res) + : [res] "=&r"(res), [p] "+m"(*p) + : [temp] "r"(temp) : "memory" );