🔧 启用SSE

This commit is contained in:
fslongjin
2022-02-21 23:24:51 +08:00
parent d9d83335af
commit 63cc5c2b33
3 changed files with 12 additions and 3 deletions

View File

@ -453,7 +453,15 @@ SetUp_TSS64:
// (main.c使load_TR)
// mov $0x50, %ax // 80
// ltr %ax
//now enable SSE and the like
movq %cr0, %rax
and $0xFFFB, %ax //clear coprocessor emulation CR0.EM
or $0x2, %ax //set coprocessor monitoring CR0.MP
movq %rax, %cr0
movq %cr4, %rax
or $(3 << 9), %ax //set CR4.OSFXSR and CR4.OSXMMEXCPT at the same time
movq %rax, %cr4
call Start_Kernel