diff options
Diffstat (limited to 'kernel/drivers/fpu.c')
-rw-r--r-- | kernel/drivers/fpu.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/kernel/drivers/fpu.c b/kernel/drivers/fpu.c deleted file mode 100644 index e61e267..0000000 --- a/kernel/drivers/fpu.c +++ /dev/null @@ -1,24 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#include <def.h> - -void set_fpu_cw(const u16 cw) -{ - __asm__ volatile("fldcw %0" ::"m"(cw)); -} - -void fpu_install(void) -{ - __asm__ volatile("clts"); - u32 t = 0; - __asm__ volatile("mov %%cr0, %0" : "=r"(t)); - t &= (u32) ~(1 << 2); - t |= (1 << 1); - __asm__ volatile("mov %0, %%cr0" ::"r"(t)); - - __asm__ volatile("mov %%cr4, %0" : "=r"(t)); - t |= 3 << 9; - __asm__ volatile("mov %0, %%cr4" ::"r"(t)); - - __asm__ volatile("fninit"); -} |