Kernel: store/load sse/mmx/fpu state on isr/irq/syscall

I haven't tested this yet but should be fine. This will be optimized
to only save state from threads that are using it
This commit is contained in:
Bananymous
2023-07-31 22:28:57 +03:00
parent e86e755c51
commit 8b1bccb79b
3 changed files with 17 additions and 0 deletions

View File

@@ -30,6 +30,8 @@ namespace Kernel
return 0;
}
Thread::current().save_sse();
asm volatile("sti");
(void)arg1;
@@ -183,6 +185,8 @@ namespace Kernel
break;
}
Thread::current().load_sse();
if (ret.is_error())
return -ret.error().get_error_code();
return ret.value();