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:
@@ -82,6 +82,9 @@ namespace Kernel
|
||||
|
||||
bool is_userspace() const { return m_is_userspace; }
|
||||
|
||||
void save_sse() { asm volatile("fxsave %0" :: "m"(m_sse_storage)); }
|
||||
void load_sse() { asm volatile("fxrstor %0" :: "m"(m_sse_storage)); }
|
||||
|
||||
private:
|
||||
Thread(pid_t tid, Process*);
|
||||
void on_exit();
|
||||
@@ -111,6 +114,8 @@ namespace Kernel
|
||||
|
||||
uint64_t m_terminate_blockers { 0 };
|
||||
|
||||
alignas(16) uint8_t m_sse_storage[512];
|
||||
|
||||
friend class TerminateBlocker;
|
||||
friend class Scheduler;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user