From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 13:56:06 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BECDD1065688; Sat, 13 Jun 2009 13:56:06 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADBAA8FC16; Sat, 13 Jun 2009 13:56:06 +0000 (UTC) (envelope-from ed@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 n5DDu69m015674; Sat, 13 Jun 2009 13:56:06 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5DDu6bT015673; Sat, 13 Jun 2009 13:56:06 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200906131356.n5DDu6bT015673@svn.freebsd.org> From: Ed Schouten Date: Sat, 13 Jun 2009 13:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194110 - head/sys/i386/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2009 13:56:07 -0000 Author: ed Date: Sat Jun 13 13:56:06 2009 New Revision: 194110 URL: http://svn.freebsd.org/changeset/base/194110 Log: Simplify the inline assembler (and correct potential error) of pte_load_store(). Submitted by: Christoph Mallon Modified: head/sys/i386/include/pmap.h Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Sat Jun 13 13:54:03 2009 (r194109) +++ head/sys/i386/include/pmap.h Sat Jun 13 13:56:06 2009 (r194110) @@ -362,15 +362,8 @@ pte_load(pt_entry_t *ptep) static __inline pt_entry_t pte_load_store(pt_entry_t *ptep, pt_entry_t pte) { - pt_entry_t r; - - __asm __volatile( - "xchgl %0,%1" - : "=m" (*ptep), - "=r" (r) - : "1" (pte), - "m" (*ptep)); - return (r); + __asm volatile("xchgl %0, %1" : "+m" (*ptep), "+r" (pte)); + return (pte); } #define pte_load_clear(pte) atomic_readandclear_int(pte)