summaryrefslogtreecommitdiff
path: root/kernel/src/cpu/sse.asm
blob: e7b5a999e4f18301fa8c5544276e94b2f3a0acb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
global sse_init

sse_init:
    mov eax, 0x1
    cpuid
    test edx, 1<<25
    jmp no_sse

    mov eax, cr0
    and ax, 0xFFFB		
    or ax, 0x2			
    mov cr0, eax
    mov eax, cr4
    or ax, 3 << 9		
    mov cr4, eax

    mov eax, 0
    ret

no_sse:
	mov eax, 1
	ret