Skip to content
Snippets Groups Projects
  1. Jan 14, 2016
  2. Jan 13, 2016
    • Raymond Toy's avatar
      Restore the FPU state before exiting. · d7850f57
      Raymond Toy authored
      Put an unwind-protect around the error calls.  The cleanup form
      restores the floating-point modes from the sigcontext so that the mode
      is restored.  This is needed, I think, because we throw so that the
      signal handler doesn't return so the sigcontext isn't restored.  If we
      don't restore the fpu state, it's set to the default processor state.
      We want the default state when calling error.
      
      In this way, things like (* 1d300 1d300) signals an overflow, and when
      we throw to top-level, the floating-point modes are restored to their
      original values they had before.
      d7850f57
  3. Jan 10, 2016
    • Raymond Toy's avatar
      In WITH-FLOAT-TRAPS-*, remove the unused junk modifying the state. · d9763e90
      Raymond Toy authored
      We just want to return the original modes, so remove all the old
      commented out stuff that was modifying the original modes to some
      strange state.  This makes a lot more sense to me if
      WITH-FLOAT-TRAPS-* actually restored the modes exactly as they were
      before running the body.
      d9763e90
    • Raymond Toy's avatar
      Handle FPU exceptions better. · da2ff74d
      Raymond Toy authored
      In sigfpe-handler, don't modify the modes; just use whatever they
      are. (They should be the default values.)
      
      In with-float-traps-*, actually just restore the floating-point mode
      to the exact original mode instead of trying to mask things out.
      da2ff74d
    • Raymond Toy's avatar
      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
  4. Jan 07, 2016
  5. Jan 01, 2016
  6. Dec 31, 2015
  7. Dec 30, 2015
    • Raymond Toy's avatar
      WITH-FLOAT-TRAPS-ENABLED was incorrectly setting accrued exceptions. · edb5af9b
      Raymond Toy authored
      Fix issue #14.
      
      WITH-FLOAT-TRAPS-ENABLED was leaving the accrued (and current)
      exceptions unchanged, but it should have cleared out any values there
      that matched the exceptions to be enabled.  Without this, the next x87
      operation would signal an exception if an accrued exception matched
      an enabled exception.  This was the cause of issue #14.  (Note that
      for x87, the accrued exception is the same as current exception.)
      edb5af9b
    • Raymond Toy's avatar
      Add %SET-FLOATING-POINT-MODES and %GET-FLOATING-POINT-MODES functions. · b4771d76
      Raymond Toy authored
      To aid in debugging floating point modes, add two new functions:
      
      o %SET-FLOATING-POINT-MODES is like SET-FLOATING-POINT-MODES but
        applies the result to a specified mode value, returning the new mode
        value (as an integer).  This is useful for investigating different
        mode values without modifying the actual hardware mode.
      o %GET-FLOATING-POINT-MODES is like GET-FLOATING-POINT-MODES but uses
        an integer argument instead of the actual floating-point mode.
        Useful when used with %SET-FLOATING-POINT-MODE or on its own.
      b4771d76
  8. Dec 28, 2015
    • Raymond Toy's avatar
      Clean up with-float-traps macro. · 90b9651b
      Raymond Toy authored
       * Add some comments.
       * Change x86 (setf floating-point-modes) to accept (unsigned-byte
         32).
       * Remove unneeded x86 conditionalization on the byte size.
      90b9651b
  9. Dec 27, 2015
  10. Dec 26, 2015
    • Raymond Toy's avatar
      Fix bug on sparc and clean up. · 38e8ce5c
      Raymond Toy authored
      On sparc and ppc (setf vm:floating-point-modes) takes an
      (unsigned-byte 32) arg, so adjust the ldb byte appopriately. 
      
      Clean up code by putting the docstring into the macro.
      38e8ce5c
  11. Dec 25, 2015
  12. Dec 24, 2015
  13. Dec 03, 2015
    • Raymond Toy's avatar
      Linux needs unix-setitimer · 5406768c
      Raymond Toy authored
      Cut and paste error from unix-glibc2.lisp copied unix-getitimer
      instead of unix-setitimer which is needed by SAVE-LISP.
      5406768c
  14. Nov 11, 2015
  15. Oct 31, 2015
  16. Oct 20, 2015
  17. Oct 18, 2015
  18. Oct 11, 2015
  19. Oct 10, 2015
  20. Sep 01, 2015
    • Raymond Toy's avatar
      Really don't print the herald when -quiet is given. · b8654321
      Raymond Toy authored
      The previous implementation cleared *herald-items* when -quiet was
      given, but if the init file loaded up items that added to
      *herald-items*, then the items were still printed.  Plus, it seems odd
      that -quiet actually clears *herald-items*.
      
      So, just don't print herald if -quiet is given, but also preserve
      *herald-items* so that (print-herald) would actually print the actual
      herald.
      b8654321
  21. Aug 30, 2015
  22. Aug 01, 2015
    • Raymond Toy's avatar
      Fix #4 again, but for negative indices. · 5a1ecf1a
      Raymond Toy authored
      o Add declaration for LIST-ELT* that the index is a kerrnel:index.
      o Clean up ELT to directly call LIST-ELT* instead of having an inlined
        version.
      o Fix typo: issue.5 is really issue.4.
      o Add tests for invalid indices for ELT and (SETF ELT) for both lists
        and vectors.
      5a1ecf1a
  23. Jun 24, 2015
  24. Jun 22, 2015
  25. Jun 14, 2015
    • Raymond Toy's avatar
      Fix #4: ELT signals error on invalid index on lists · 1ca0a557
      Raymond Toy authored
      code/seq.lisp:
      o Define internal LIST-ELT* function that executes ELT on lists,
        signaling an error if the index is invalid.
      
      compiler/seqtran.lisp:
      o Change the deftransform for ELT to use LIST-ELT* instead of NTH.
      
      tests/issues.lisp:
      o Add test for this issue.
      1ca0a557
    • Raymond Toy's avatar
      Fix #5: Give better error message · e791b596
      Raymond Toy authored
      Give a better error message when using T clause in case
      
      error.lisp:
      o Add new invalid-case condition to handle errors from case
        expressions.
      
      macros.lisp:
      o Use new invalid-case condition to signal the invalid usage of T in
        CASE expressions.
      o Replace old message with better, more informative, message. Include
        xref to ANSI CL spec.
      
      exports.lisp:
      o Export INVALID-CASE from KERNEL package.
      e791b596
  26. Jun 12, 2015
    • Raymond Toy's avatar
      Move more unix support to core for asdf and slime. · 1a20bb57
      Raymond Toy authored
      o The upcoming version of asdf wants to use unix-getenv, so add that
        to the core, removing from the unix contrib.
      o Slime wants to use unix-execve and unix-fork, so import that and the
        necessary support routines in to the core from the unix contrib.
      1a20bb57
  27. May 18, 2015
Loading