sse support

This commit is contained in:
Matheus
2022-08-20 11:58:05 -03:00
parent 1ed7aafa46
commit fce640c0f9
3 changed files with 16 additions and 1 deletions
+4 -1
View File
@@ -4,13 +4,16 @@
void arch_regs_saveextra(arch_extraregs* regs){
// user gs was swapped
regs->gsbase = rdmsr(MSR_KERNELGSBASE);
regs->fsbase = rdmsr(MSR_FSBASE);
regs->fsbase = rdmsr(MSR_FSBASE);
asm("fxsave (%%rax)" : : "a"(&regs->fx[0]));
}
void arch_regs_setupextra(arch_extraregs* regs){
// gs will be swapped later
wrmsr(MSR_KERNELGSBASE, regs->gsbase);
wrmsr(MSR_FSBASE, regs->fsbase);
asm("fxrstor (%%rax)" : : "a"(&regs->fx[0]));
}
void arch_regs_setupkernel(arch_regs* regs, void* ip, void* stack, bool interrupts){