forked from CHatingPython/towos
feat: enable SSE
This commit is contained in:
@@ -26,10 +26,6 @@ CXXFLAGS := \
|
|||||||
-Wextra \
|
-Wextra \
|
||||||
-Wpedantic \
|
-Wpedantic \
|
||||||
-O2 \
|
-O2 \
|
||||||
-mno-sse \
|
|
||||||
-mno-sse2 \
|
|
||||||
-mno-mmx \
|
|
||||||
-mno-80387
|
|
||||||
|
|
||||||
ASFLAGS := \
|
ASFLAGS := \
|
||||||
--64
|
--64
|
||||||
|
|||||||
@@ -80,6 +80,17 @@ _start:
|
|||||||
|
|
||||||
.code64
|
.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:
|
long_mode_entry:
|
||||||
movw $0x10, %ax
|
movw $0x10, %ax
|
||||||
|
|
||||||
@@ -97,6 +108,8 @@ long_mode_entry:
|
|||||||
|
|
||||||
call run_global_constructors
|
call run_global_constructors
|
||||||
|
|
||||||
|
call enable_sse
|
||||||
|
|
||||||
call kmain
|
call kmain
|
||||||
.hang:
|
.hang:
|
||||||
cli
|
cli
|
||||||
|
|||||||
Reference in New Issue
Block a user