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
+11
View File
@@ -37,4 +37,15 @@ void cpu_state_init(){
// undefined opcode exception will handle system calls then
else printf("CPU%lu: syscall instruction not supported\n", arch_getcls()->lapicid);
// enable SSE
asm volatile(
"mov %%cr0, %%rax;"
"and $0xFFFB, %%ax;"
"or $2, %%eax;"
"mov %%rax, %%cr0;"
"mov %%cr4, %%rax;"
"or $0b11000000000, %%rax;"
"mov %%rax, %%cr4;"
: : : "rax");
}