From 978cc419f9db73a5fd115c1969809c4994869cb9 Mon Sep 17 00:00:00 2001 From: pjht Date: Sun, 30 Oct 2022 17:14:24 -0500 Subject: [PATCH] Don't save disabled FPU registers --- src/unwinder/arch/x86_64.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unwinder/arch/x86_64.rs b/src/unwinder/arch/x86_64.rs index e15a229..d33e26b 100644 --- a/src/unwinder/arch/x86_64.rs +++ b/src/unwinder/arch/x86_64.rs @@ -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 */