From owner-svn-src-head@FreeBSD.ORG Mon Jul 26 23:20:55 2010 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 689861065670; Mon, 26 Jul 2010 23:20:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D8C28FC1A; Mon, 26 Jul 2010 23:20:55 +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 o6QNKtog015383; Mon, 26 Jul 2010 23:20:55 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QNKtDM015380; Mon, 26 Jul 2010 23:20:55 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007262320.o6QNKtDM015380@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 26 Jul 2010 23:20:55 +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: r210521 - in head/sys: amd64/amd64 i386/isa 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: Mon, 26 Jul 2010 23:20:55 -0000 Author: jkim Date: Mon Jul 26 23:20:55 2010 New Revision: 210521 URL: http://svn.freebsd.org/changeset/base/210521 Log: Simplify fldcw() macro. There is no reason to use pointer here. No object file change after this commit (verified with md5). Modified: head/sys/amd64/amd64/fpu.c head/sys/i386/isa/npx.c Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Mon Jul 26 23:02:18 2010 (r210520) +++ head/sys/amd64/amd64/fpu.c Mon Jul 26 23:20:55 2010 (r210521) @@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$"); #if defined(__GNUCLIKE_ASM) && !defined(lint) -#define fldcw(addr) __asm __volatile("fldcw %0" : : "m" (*(addr))) +#define fldcw(cw) __asm __volatile("fldcw %0" : : "m" (cw)) #define fnclex() __asm __volatile("fnclex") #define fninit() __asm __volatile("fninit") #define fnstcw(addr) __asm __volatile("fnstcw %0" : "=m" (*(addr))) @@ -80,7 +80,7 @@ __FBSDID("$FreeBSD$"); #else /* !(__GNUCLIKE_ASM && !lint) */ -void fldcw(caddr_t addr); +void fldcw(u_short cw); void fnclex(void); void fninit(void); void fnstcw(caddr_t addr); @@ -124,7 +124,7 @@ fpuinit(void) stop_emulating(); fninit(); control = __INITIAL_FPUCW__; - fldcw(&control); + fldcw(control); mxcsr = __INITIAL_MXCSR__; ldmxcsr(mxcsr); if (PCPU_GET(cpuid) == 0) { @@ -425,7 +425,7 @@ fpudna(void) */ fxrstor(&fpu_initialstate); if (pcb->pcb_initial_fpucw != __INITIAL_FPUCW__) - fldcw(&pcb->pcb_initial_fpucw); + fldcw(pcb->pcb_initial_fpucw); pcb->pcb_flags |= PCB_FPUINITDONE; if (PCB_USER_FPU(pcb)) pcb->pcb_flags |= PCB_USERFPUINITDONE; Modified: head/sys/i386/isa/npx.c ============================================================================== --- head/sys/i386/isa/npx.c Mon Jul 26 23:02:18 2010 (r210520) +++ head/sys/i386/isa/npx.c Mon Jul 26 23:20:55 2010 (r210521) @@ -87,7 +87,7 @@ __FBSDID("$FreeBSD$"); #if defined(__GNUCLIKE_ASM) && !defined(lint) -#define fldcw(addr) __asm __volatile("fldcw %0" : : "m" (*(addr))) +#define fldcw(cw) __asm __volatile("fldcw %0" : : "m" (cw)) #define fnclex() __asm __volatile("fnclex") #define fninit() __asm __volatile("fninit") #define fnsave(addr) __asm __volatile("fnsave %0" : "=m" (*(addr))) @@ -111,7 +111,7 @@ __FBSDID("$FreeBSD$"); #endif #else /* !(__GNUCLIKE_ASM && !lint) */ -void fldcw(caddr_t addr); +void fldcw(u_short cw); void fnclex(void); void fninit(void); void fnsave(caddr_t addr); @@ -266,7 +266,7 @@ npx_probe(device_t dev) * 16 works. */ control &= ~(1 << 2); /* enable divide by 0 trap */ - fldcw(&control); + fldcw(control); #ifdef FPU_ERROR_BROKEN /* * FPU error signal doesn't work on some CPU @@ -364,7 +364,7 @@ npxinit(void) fninit(); #endif control = __INITIAL_NPXCW__; - fldcw(&control); + fldcw(control); start_emulating(); intr_restore(savecrit); } @@ -683,7 +683,7 @@ npxdna(void) */ fpurstor(&npx_initialstate); if (pcb->pcb_initial_npxcw != __INITIAL_NPXCW__) - fldcw(&pcb->pcb_initial_npxcw); + fldcw(pcb->pcb_initial_npxcw); pcb->pcb_flags |= PCB_NPXINITDONE; if (PCB_USER_FPU(pcb)) pcb->pcb_flags |= PCB_NPXUSERINITDONE;