From afeb7e4f00eff33e9e1cfcb766825e7c87f5f1d1 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 21 Feb 2021 15:45:41 +0100 Subject: Activated SSE/FPU features for better performance --- kernel/drivers/fpu.c | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 kernel/drivers/fpu.c (limited to 'kernel/drivers/fpu.c') 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 - -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"); -} -- cgit v1.2.3