forked from CHatingPython/towos
feat: enable SSE
This commit is contained in:
@@ -80,6 +80,17 @@ _start:
|
||||
|
||||
.code64
|
||||
|
||||
enable_sse:
|
||||
movq %cr0, %rax
|
||||
andw $0xFFFB, %ax
|
||||
orw $0x0002, %ax
|
||||
movq %rax, %cr0
|
||||
|
||||
movq %cr4, %rax
|
||||
orw $0x600, %ax
|
||||
movq %rax, %cr4
|
||||
ret
|
||||
|
||||
long_mode_entry:
|
||||
movw $0x10, %ax
|
||||
|
||||
@@ -97,6 +108,8 @@ long_mode_entry:
|
||||
|
||||
call run_global_constructors
|
||||
|
||||
call enable_sse
|
||||
|
||||
call kmain
|
||||
.hang:
|
||||
cli
|
||||
|
||||
Reference in New Issue
Block a user