Skip to content
Snippets Groups Projects
Forked from cmucl / cmucl
Source project has a limited visibility.
  • cshapiro's avatar
    9495c516
    Switch the FreeBSD port to use the common floating point trap handling · 9495c516
    cshapiro authored
    code.  Rather than introduce a new FreeBSD case to the x86 sigcontext
    member accessor routines, collapse all of the system specific routines
    down to a common set of routines.
    
    * code/debug-int.lisp - Disable some Darwin-specific code to debug
      NULL mcontext pointers.
    
    * code/float-trap.lisp - Remove ancient FreeBSD-specific code for
      handling floating point signals.
    
    * code/macros.lisp, code/sap.lisp, compiler/saptran.lisp - Include the
      SAP-REF-LONG setter by default on the x86.
    
    * code/x86-vm.lisp - Remove operating system specific sigcontext
      definitions and sigcontext accessors.  Define the alien sigcontext
      as a system area pointer.  Replace the sigcontext accessors with
      foreign function calls that mask the complexity of the underlying
      sigcontext member access.
    
    * compiler/x86/float.lisp - Unconditionally define STORE-LONG-FLOAT.
      This function is used by the %SET-SAP-REF-LONG VOP that underlies
      the SAP-REF-LONG setter.
    
    * compiler/x86/sap.lisp - Unconditionally define %SET-SAP-REF-LONG.
      In the case where there is not a distinct LONG-FLOAT type, admit
      DOUBLE-FLOAT values instead.  The x87 automatically widens values
      pushed onto stack.  This mirrors the behavior of the SAP-REF-LONG
      VOP.
    
    * lisp/Darwin-os.c, lisp/Linux-os.c - Define functions to access
      sigcontext members of interest to Lisp.  Delete the sc_reg function
      and replace its uses with os_sigcontext_reg which is more suitably
      typed.
    
    * lisp/FreeBSD-os.c - Define functions to access sigcontext members of
      interest to Lisp.  We need to be careful about the SSE and non-SSE
      cases for retrieving x87 registers from the saved machine state.
      Define a low-level SIGFPE handler to intercept floating point traps
      and restore the cleared status word bits based on the signal code.
      Get rid of sc_reg for the reasons noted above.
    
    * lisp/Darwin-os.h, lisp/FreeBSD-os.h - Declare the restore_fpu
      function and define a specialized RESTORE_FPU macro.  Remove the
      sc_reg prototype.
    
    * lisp/Linux-os.h - Remove the sc_reg prototype.
    
    * lisp/os.h - Add prototypes for the new os_sigcontext functions.
    
    * lisp/x86-lispregs.h - Redefine SC_REG and SC_PC to expand out to the
      new os_sigcontext functions.  Redfine SC_SP to expand out to SC_REG.
      Eliminate all platform-specific defintions of SC_PC and SC_SP.
    9495c516
    History
    Switch the FreeBSD port to use the common floating point trap handling
    cshapiro authored
    code.  Rather than introduce a new FreeBSD case to the x86 sigcontext
    member accessor routines, collapse all of the system specific routines
    down to a common set of routines.
    
    * code/debug-int.lisp - Disable some Darwin-specific code to debug
      NULL mcontext pointers.
    
    * code/float-trap.lisp - Remove ancient FreeBSD-specific code for
      handling floating point signals.
    
    * code/macros.lisp, code/sap.lisp, compiler/saptran.lisp - Include the
      SAP-REF-LONG setter by default on the x86.
    
    * code/x86-vm.lisp - Remove operating system specific sigcontext
      definitions and sigcontext accessors.  Define the alien sigcontext
      as a system area pointer.  Replace the sigcontext accessors with
      foreign function calls that mask the complexity of the underlying
      sigcontext member access.
    
    * compiler/x86/float.lisp - Unconditionally define STORE-LONG-FLOAT.
      This function is used by the %SET-SAP-REF-LONG VOP that underlies
      the SAP-REF-LONG setter.
    
    * compiler/x86/sap.lisp - Unconditionally define %SET-SAP-REF-LONG.
      In the case where there is not a distinct LONG-FLOAT type, admit
      DOUBLE-FLOAT values instead.  The x87 automatically widens values
      pushed onto stack.  This mirrors the behavior of the SAP-REF-LONG
      VOP.
    
    * lisp/Darwin-os.c, lisp/Linux-os.c - Define functions to access
      sigcontext members of interest to Lisp.  Delete the sc_reg function
      and replace its uses with os_sigcontext_reg which is more suitably
      typed.
    
    * lisp/FreeBSD-os.c - Define functions to access sigcontext members of
      interest to Lisp.  We need to be careful about the SSE and non-SSE
      cases for retrieving x87 registers from the saved machine state.
      Define a low-level SIGFPE handler to intercept floating point traps
      and restore the cleared status word bits based on the signal code.
      Get rid of sc_reg for the reasons noted above.
    
    * lisp/Darwin-os.h, lisp/FreeBSD-os.h - Declare the restore_fpu
      function and define a specialized RESTORE_FPU macro.  Remove the
      sc_reg prototype.
    
    * lisp/Linux-os.h - Remove the sc_reg prototype.
    
    * lisp/os.h - Add prototypes for the new os_sigcontext functions.
    
    * lisp/x86-lispregs.h - Redefine SC_REG and SC_PC to expand out to the
      new os_sigcontext functions.  Redfine SC_SP to expand out to SC_REG.
      Eliminate all platform-specific defintions of SC_PC and SC_SP.