mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-18 16:21:52 +00:00
Kernel: Save and restore FPU state on signal dispatch on i386/x86_64
This commit is contained in:
parent
e14e919b78
commit
88d7bf7362
Notes:
sideshowbarker
2024-07-17 17:57:06 +09:00
Author: https://github.com/alimpfard
Commit: 88d7bf7362
Pull-request: https://github.com/SerenityOS/serenity/pull/12762
3 changed files with 19 additions and 7 deletions
|
@ -1190,6 +1190,11 @@ DispatchSignalResult Thread::dispatch_signal(u8 signal)
|
|||
|
||||
VERIFY(stack % 16 == 0);
|
||||
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
// Save the FPU/SSE state
|
||||
TRY(copy_value_on_user_stack(stack, fpu_state()));
|
||||
#endif
|
||||
|
||||
#if ARCH(I386)
|
||||
// Leave one empty slot to align the stack for a handler call.
|
||||
TRY(push_value_on_user_stack(stack, 0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue