Skip to content
Snippets Groups Projects
Forked from cmucl / cmucl
Source project has a limited visibility.
  • Raymond Toy's avatar
    e63bc1e9
    Handle FP exceptions better. · e63bc1e9
    Raymond Toy authored
    Don't restore the fpu state from the context in the interrupt handler
    code (interrupt_handle_now) because that just makes the fpu state the
    same as the sigcontext that received the exception.  I think this was
    done to reset the x87 fpu precision to 53-bit so that lisp can
    continue with default double-float rounding.  This isn't needed
    anymore since lisp doesn't use x87 anymore.
    
    In SIGFPE-HANDLER, don't modify the current fp state based on the
    state from the sigcontext.
    
    These two items cause the arithmetic-error exception printer to
    trigger inexact when printing out the args.  We add a few debugging
    prints for now so we can see what the FP state is in the handler.
    Remove them later.
    e63bc1e9
    History
    Handle FP exceptions better.
    Raymond Toy authored
    Don't restore the fpu state from the context in the interrupt handler
    code (interrupt_handle_now) because that just makes the fpu state the
    same as the sigcontext that received the exception.  I think this was
    done to reset the x87 fpu precision to 53-bit so that lisp can
    continue with default double-float rounding.  This isn't needed
    anymore since lisp doesn't use x87 anymore.
    
    In SIGFPE-HANDLER, don't modify the current fp state based on the
    state from the sigcontext.
    
    These two items cause the arithmetic-error exception printer to
    trigger inexact when printing out the args.  We add a few debugging
    prints for now so we can see what the FP state is in the handler.
    Remove them later.