diff options
author | jkim <jkim@FreeBSD.org> | 2010-07-26 23:20:55 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-07-26 23:20:55 +0000 |
commit | 823ac342172532ac50e809c42eb12f2dcda7de1f (patch) | |
tree | 8775ce270951c40f0381a5c2dd2455bb24b2c82d /sys | |
parent | b8fb3921fac102fa6e1a35746ccc9870b28b0c8b (diff) | |
download | FreeBSD-src-823ac342172532ac50e809c42eb12f2dcda7de1f.zip FreeBSD-src-823ac342172532ac50e809c42eb12f2dcda7de1f.tar.gz |
Simplify fldcw() macro. There is no reason to use pointer here. No object
file change after this commit (verified with md5).
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/fpu.c | 8 | ||||
-rw-r--r-- | sys/i386/isa/npx.c | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index 20f94eb..5e05ecd 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -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; diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index 1203fcc4..72a6aa8 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -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; |