From owner-svn-src-user@FreeBSD.ORG Tue Mar 2 05:32:00 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55C70106566B; Tue, 2 Mar 2010 05:32:00 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id EC65D8FC14; Tue, 2 Mar 2010 05:31:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o225UYTD057034; Mon, 1 Mar 2010 22:30:34 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 01 Mar 2010 22:30:49 -0700 (MST) Message-Id: <20100301.223049.864843819497816567.imp@bsdimp.com> To: jmallett@freebsd.org From: "M. Warner Losh" In-Reply-To: <201003010521.o215LZqd002772@svn.freebsd.org> References: <201003010521.o215LZqd002772@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r204507 - in user/jmallett/octeon/sys/mips: include mips X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 05:32:00 -0000 In message: <201003010521.o215LZqd002772@svn.freebsd.org> Juli Mallett writes: : Author: jmallett : Date: Mon Mar 1 05:21:35 2010 : New Revision: 204507 : URL: http://svn.freebsd.org/changeset/base/204507 : : Log: : o) Adjust ptr and register macros for assembly wrt ABI in a way that ought to : work better. Need to check for places where the assembly assumes pointers : are register width, I guess. NetBSD has much better asm.h foo, which I'd hoped to import to help with this problem... Warner : Modified: : user/jmallett/octeon/sys/mips/include/asm.h : user/jmallett/octeon/sys/mips/mips/locore.S : : Modified: user/jmallett/octeon/sys/mips/include/asm.h : ============================================================================== : --- user/jmallett/octeon/sys/mips/include/asm.h Mon Mar 1 04:46:07 2010 (r204506) : +++ user/jmallett/octeon/sys/mips/include/asm.h Mon Mar 1 05:21:35 2010 (r204507) : @@ -362,16 +362,13 @@ _C_LABEL(x): : * ABI calls. : */ : : -#if !defined(_MIPS_BSD_API) || _MIPS_BSD_API == _MIPS_BSD_API_LP32 : -/* #if !defined(__mips_n64) */ : +#if !defined(__mips_n32) && !defined(__mips_n64) : #define REG_L lw : #define REG_S sw : #define REG_LI li : #define REG_PROLOGUE .set push : #define REG_EPILOGUE .set pop : #define SZREG 4 : -#define PTR_LA la : -#define PTR_ADDU addu : #else : #define REG_L ld : #define REG_S sd : @@ -379,9 +376,19 @@ _C_LABEL(x): : #define REG_PROLOGUE .set push ; .set mips3 : #define REG_EPILOGUE .set pop : #define SZREG 8 : +#endif : + : +#if !defined(__mips_n64) : +#define PTR_LA la : +#define PTR_ADDU addu : +#define PTR_L lw : +#define PTR_S sw : +#else : #define PTR_LA dla : #define PTR_ADDU daddu : -#endif /* _MIPS_BSD_API */ : +#define PTR_L ld : +#define PTR_S sd : +#endif : : #define mfc0_macro(data, spr) \ : __asm __volatile ("mfc0 %0, $%1" \ : : Modified: user/jmallett/octeon/sys/mips/mips/locore.S : ============================================================================== : --- user/jmallett/octeon/sys/mips/mips/locore.S Mon Mar 1 04:46:07 2010 (r204506) : +++ user/jmallett/octeon/sys/mips/mips/locore.S Mon Mar 1 05:21:35 2010 (r204507) : @@ -178,7 +178,7 @@ VECTOR(_locore, unknown) : nop : : PTR_LA sp, _C_LABEL(thread0) : - REG_L a0, TD_PCB(sp) : + PTR_L a0, TD_PCB(sp) : REG_LI t0, ~7 : and a0, a0, t0 : subu sp, a0, START_FRAME :