pc64: AMD64 mandates SSE support, remove the check in fpuinit()
This commit is contained in:
parent
dcdb2bfb9a
commit
cd38d41356
1 changed files with 18 additions and 35 deletions
|
@ -30,18 +30,6 @@ extern void _fwait(void);
|
||||||
extern void _ldmxcsr(u32int);
|
extern void _ldmxcsr(u32int);
|
||||||
extern void _stts(void);
|
extern void _stts(void);
|
||||||
|
|
||||||
/*
|
|
||||||
* not used, AMD64 mandated SSE
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
fpx87save(FPsave*)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
static void
|
|
||||||
fpx87restore(FPsave*)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fpssesave(FPsave *s)
|
fpssesave(FPsave *s)
|
||||||
{
|
{
|
||||||
|
@ -261,10 +249,9 @@ mathinit(void)
|
||||||
void
|
void
|
||||||
fpuinit(void)
|
fpuinit(void)
|
||||||
{
|
{
|
||||||
uintptr cr4;
|
u64int cr4;
|
||||||
ulong regs[4];
|
ulong regs[4];
|
||||||
|
|
||||||
if((m->cpuiddx & (Sse|Fxsr)) == (Sse|Fxsr)){ /* have sse fp? */
|
|
||||||
cr4 = getcr4() | CR4Osfxsr|CR4Oxmmex;
|
cr4 = getcr4() | CR4Osfxsr|CR4Oxmmex;
|
||||||
putcr4(cr4);
|
putcr4(cr4);
|
||||||
fpsave = fpssesave;
|
fpsave = fpssesave;
|
||||||
|
@ -286,10 +273,6 @@ fpuinit(void)
|
||||||
fprestore = fpxrestores;
|
fprestore = fpxrestores;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
fpsave = fpx87save;
|
|
||||||
fprestore = fpx87restore;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue