Simplify fldcw() macro. There is no reason to use pointer here. No object
file change after this commit (verified with md5).
This commit is contained in:
parent
07c86dcf54
commit
172754036a
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user