From 6feaee2df686c62509f7c2292df81899af9762ed Mon Sep 17 00:00:00 2001 From: Raymond Toy <toy.raymond@gmail.com> Date: Sat, 16 Jan 2016 08:37:03 -0800 Subject: [PATCH] Add comment on why RESTORE_FPU is needed. --- src/lisp/x86-arch.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lisp/x86-arch.c b/src/lisp/x86-arch.c index 841e2ccba..9030daf83 100644 --- a/src/lisp/x86-arch.c +++ b/src/lisp/x86-arch.c @@ -320,6 +320,12 @@ sigtrap_handler(HANDLER_ARGS) /* This is just for info in case monitor wants to print an approx */ current_control_stack_pointer = (unsigned long *) SC_SP(os_context); + + /* + * In many places in the switch below, we eventually throw instead + * of returning from the signal handler. So, just in case, set + * the current FPU modes from the saved context. + */ RESTORE_FPU(os_context); /* -- GitLab