Don't save disabled FPU registers

This commit is contained in:
pjht 2022-10-30 17:14:24 -05:00
parent 2f3ffefe8e
commit 978cc419f9

View File

@ -77,7 +77,7 @@ pub extern "C-unwind" fn save_context() -> Context {
mov [rax + 0x78], r15
mov rdx, [rsp]
mov [rax + 0x80], rdx
stmxcsr [rax + 0x88]
/* stmxcsr [rax + 0x88] */
fnstcw [rax + 0x90]
ret
",
@ -95,7 +95,7 @@ pub unsafe extern "C" fn restore_context(ctx: &Context) -> ! {
mov rsp, [rdi + 0x38]
/* Restore callee-saved control registers */
ldmxcsr [rdi + 0x88]
/* ldmxcsr [rdi + 0x88] */
fldcw [rdi + 0x90]
/* Restore return address */