summaryrefslogtreecommitdiff
path: root/kernel/src/cpu/fpu.asm
blob: e49ab6f5128a44a7fb55c3f4eacb1ec5599e39b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
global fpu_init

fpu_init:
    mov edx, cr0
    and edx, (-1) - ((1 << 3) + (1 << 4))       
    mov cr0, edx
    fninit                                  
    fnstsw [test]                      
    cmp word [test], 0                 
    jne no_fpu
    
    xor eax, 0
    ret

no_fpu:
	mov eax, 1
	ret

test: dw 0x55AA