pc64: AMD64 mandates SSE support, remove the check in fpuinit()

This commit is contained in:
cinap_lenrek 2020-12-06 21:44:26 +01:00
parent dcdb2bfb9a
commit cd38d41356

View file

@ -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