mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +00:00
sse support
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user