All: Start work again on sse support

This commit is contained in:
2023-12-28 19:14:42 +02:00
parent 5d83ab2289
commit 4307968182
4 changed files with 16 additions and 17 deletions

View File

@@ -303,9 +303,7 @@ done:
extern "C" void cpp_irq_handler(uint64_t irq, InterruptStack& interrupt_stack)
{
#if __enable_sse
bool from_userspace = (interrupt_stack.cs & 0b11) == 0b11;
if (from_userspace)
Thread::current().save_sse();
Thread::current().save_sse();
#endif
if (Scheduler::current_tid())
@@ -330,11 +328,7 @@ done:
ASSERT(Thread::current().state() != Thread::State::Terminated);
#if __enable_sse
if (from_userspace)
{
ASSERT(Thread::current().state() == Thread::State::Executing);
Thread::current().load_sse();
}
Thread::current().load_sse();
#endif
}

View File

@@ -99,7 +99,11 @@ namespace Kernel
Thread::Thread(pid_t tid, Process* process)
: m_tid(tid), m_process(process)
{}
{
#if __enable_sse
save_sse();
#endif
}
Thread& Thread::current()
{