From owner-svn-src-all@FreeBSD.ORG Tue Oct 5 05:49:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36B23106566B; Tue, 5 Oct 2010 05:49:39 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AD328FC13; Tue, 5 Oct 2010 05:49:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o955ncKW041394; Tue, 5 Oct 2010 05:49:38 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o955ncvu041392; Tue, 5 Oct 2010 05:49:38 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201010050549.o955ncvu041392@svn.freebsd.org> From: "Jayachandran C." Date: Tue, 5 Oct 2010 05:49:38 +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: r213441 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2010 05:49:39 -0000 Author: jchandra Date: Tue Oct 5 05:49:38 2010 New Revision: 213441 URL: http://svn.freebsd.org/changeset/base/213441 Log: Fix asm for XKPHYS read for o32, constriants needed for input registers that are clobbered. Fixes a crash when compiled without DEBUG Modified: head/sys/mips/rmi/rmi_mips_exts.h Modified: head/sys/mips/rmi/rmi_mips_exts.h ============================================================================== --- head/sys/mips/rmi/rmi_mips_exts.h Tue Oct 5 05:15:27 2010 (r213440) +++ head/sys/mips/rmi/rmi_mips_exts.h Tue Oct 5 05:49:38 2010 (r213441) @@ -39,7 +39,7 @@ #define CPU_BLOCKID_MMU 4 #define CPU_BLOCKID_PRF 5 -#define LSU_CERRLOG_REGID 9 +#define LSU_CERRLOG_REGID 9 #if defined(__mips_n64) || defined(__mips_n32) static __inline uint64_t @@ -481,14 +481,15 @@ xlr_paddr_lw(uint64_t paddr) __asm__ __volatile__( ".set push \n\t" ".set mips64 \n\t" - "dsll32 %1, %1, 0 \n\t" - "dsll32 %2, %2, 0 \n\t" /* get rid of the */ - "dsrl32 %2, %2, 0 \n\t" /* sign extend */ - "or %0, %1, %2 \n\t" - "lw %0, 0(%0) \n\t" + "dsll32 $8, %1, 0 \n\t" + "dsll32 $9, %2, 0 \n\t" /* get rid of the */ + "dsrl32 $9, $9, 0 \n\t" /* sign extend */ + "or $9, $8, $8 \n\t" + "lw %0, 0($9) \n\t" ".set pop \n" - : "=&r"(val) - : "r"(addrh), "r"(addrl)); + : "=r"(val) + : "r"(addrh), "r"(addrl) + : "$8", "$9"); return (val); } @@ -505,14 +506,14 @@ xlr_paddr_ld(uint64_t paddr) __asm__ __volatile__( ".set push \n\t" ".set mips64 \n\t" - "dsll32 %2, %2, 0 \n\t" - "dsll32 %3, %3, 0 \n\t" /* get rid of the */ - "dsrl32 %3, %3, 0 \n\t" /* sign extend */ - "or %0, %2, %3 \n\t" + "dsll32 %0, %2, 0 \n\t" + "dsll32 %1, %3, 0 \n\t" /* get rid of the */ + "dsrl32 %1, %1, 0 \n\t" /* sign extend */ + "or %0, %0, %1 \n\t" "lw %1, 4(%0) \n\t" "lw %0, 0(%0) \n\t" ".set pop \n" - : "=&r"(valh), "=r"(vall) + : "=&r"(valh), "=&r"(vall) : "r"(addrh), "r"(addrl)); return (((uint64_t)valh << 32) | vall);