mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:57:35 +00:00
Kernel: Clarify code that saves FPU state after FNINIT
After we clear the FPU state in a thread when it uses the FPU for the first time, we also save the clean slate in the thread's FPU state buffer. When we're doing that, let's write through current->fpu_state() just to make it clear what's going on. It was actually safe, since we'd just overwritten the g_last_fpu_thread pointer anyway, but this patch improves the communication of intent. Spotted by Bryan Steele, thanks!
This commit is contained in:
parent
3309bdf722
commit
98c7fd7aed
1 changed files with 1 additions and 1 deletions
|
@ -222,7 +222,7 @@ void exception_7_handler(RegisterDump& regs)
|
|||
} else {
|
||||
asm volatile("fninit");
|
||||
asm volatile("fxsave %0"
|
||||
: "=m"(g_last_fpu_thread->fpu_state()));
|
||||
: "=m"(current->fpu_state()));
|
||||
current->set_has_used_fpu(true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue