- Dec 30, 2015
-
-
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.)
-
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.
-
- Dec 28, 2015
-
-
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.
-
- Dec 26, 2015
-
-
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.
-
- Dec 25, 2015
-
-
Raymond Toy authored
When enabling traps, need to take just the low 24 bits of the arg because (setf floating-point-modes) wants an (unsigned-byte 24) argument. The logorc2 makes the result negative when enabling traps.
-
Raymond Toy authored
WITH-FLOAT-TRAPS-ENABLED.
-
- Dec 24, 2015
-
-
Raymond Toy authored
Merge the body of both macros into one since they only differ in how the bits are merged with the actual mode bits.
-
Raymond Toy authored
This works like WITH-FLOAT-TRAPS-MASKED, except that the specified traps are enabled. Use this in fdlibm to enable the inexact trap.
-
- Nov 30, 2014
-
-
Raymond Toy authored
The tests still fail (along with others), but the test suite will finish. * code/float-trap.lisp: * Update SET-FLOATING-POINT-MODES: * When we clear out bits in float-invalid-op-1-byte, clear out the float-invalid-op-2-byte. Not necessary for this fix, but those bits signal other invalid operations from sqrt and such. * When clearing the exceptions, clear the sticky exceptions summary bit too. * Fix SIGFPE-HANDLER: * As above, clear out the bit in float-invalid-op-2-byte and the exceptions summary bit. * Only clear out the new exception bits, as done for SSE2. * Mask out the float-invalid-op-2-byte and the summary bit before setting the new modes. * compiler/ppc/parms.lisp * Define float-exceptions-summary-byte. * code/exports.lisp: * Export FLOAT-INVALID-OP-2-BYTE
-
- Aug 23, 2014
-
-
Raymond Toy authored
-
- Aug 22, 2014
-
-
Raymond Toy authored
doesn't use x87.
-
Raymond Toy authored
On 32-bit linux, we can still get FP exceptions using x87 because 32-bit linux can still use x87 instructions for arithmetic. Because of this, we need to re-enable the support x87 floating-point modes, including getting and setting the modes and also extracting the modes from a sigcontext. * src/code/float-trap.lisp: * Put back support for getting and setting the x87 FP modes. * src/compiler/x86/float.lisp: * Add comment on the layout of the status and control words for x87. * src/lisp/Linux-os.c: * Put back support for getting the x87 (and sse2) FP modes. Needed in the sigfpe-handler in float-trap.lisp. Some of this needs to be cleaned up because we always require sse2 now.
-
- Apr 29, 2014
-
-
Raymond Toy authored
setting the floating-point mode bits.
-
- May 15, 2013
-
-
Raymond Toy authored
src/compiler/generic/objdef.lisp:: src/compiler/generic/utils.lisp:; src/compiler/generic/vm-macs.lisp:: src/compiler/sparc/c-callback.lisp:: src/compiler/sparc/parms.lisp:: When export lost its compile-time effects and became a normal function, the exports in many files no longer took affect while compiling the file. This change makes the compile-time effects happen as before in selected files. With this change, the sparc port can be cross-compiled from x86 again. src/tools/cross-scripts/cross-x86-sparc.lisp:: Need to frob CHAR-BYTES, which is needed by BYTE-BASH-COPY. .
-
- Feb 02, 2013
-
-
Raymond Toy authored
-
- Feb 01, 2013
-
-
Raymond Toy authored
code/float-trap.lisp:: * In the default case, check FOP to see if it's defined. This means it's a divide exception. code/x86-vm.lisp:: * Also check to see if the offending instruction is a DIV or IDIV, which means we got an integer overflow. Return the appropriate values in this case.
-
- May 25, 2012
-
-
Raymond Toy authored
prevents the exception from being resignaled immediately. src/code/float-trap.lisp: o Clear current and accrued exception bits that match any new enabled exceptions specified by :traps. src/general-info/release-20d.txt: o Update.
-
- Jan 06, 2012
-
-
Raymond Toy authored
not running on solaris/x86.
-
- Nov 04, 2011
-
-
Raymond Toy authored
-
- Oct 15, 2011
-
-
Raymond Toy authored
the occasional problem about SIGFPE's with no exceptions enabled. error.lisp: o Add floating-point-denormal-operand arithmetic error. exports.lisp: o Export the new arithmetic error type. float-trap.lisp: o Check the denormal trap bit and signal the appropriate error. release-20c.txt: o Update.
-
- Sep 25, 2011
-
-
Raymond Toy authored
entries with just the file path, removing the revision number, date, author and state. The actual information is now computed during compilation and stored in the fasl itself. (See ticket:48.)
-
- Dec 22, 2010
-
-
rtoy authored
Solaris/x86. There should be no functional changes for either other x86 ports or for the sparc port.
-
- Apr 20, 2010
-
-
rtoy authored
may get confused with source locations if the reader macros are installed.
-
- Apr 19, 2010
-
-
rtoy authored
-
- Mar 19, 2010
-
-
rtoy authored
boot-2010-02-1 as the bootstrap file. You should probably also use the new -P option for build.sh to generate and update the po files while building.
-
- Jul 06, 2009
-
-
rtoy authored
instead of 53 bits. This causes the incorrect result (found by Paul): (ffloor 1.1605184953130993d26 12622780800d0) -> 9.193841782573768d15 -8.05306368d8 The correct result should have a remainder of zero. Force the precision to be 53 bits (double-float).
-
- Jan 05, 2009
-
-
rtoy authored
Use bootstrap-2009-01-1.lisp to bootstrap this change. code/float-trap.lisp: o FLOATING-POINT-MODES for :X87 needs to massage the results into the expected format (SSE2 MXCSR order). o Update for changed VOP names too. compiler/x86/float.lisp: o Rename the floating-point-modes and set-floating-point-modes VOPS to x87-floating-point-modes and set-x87-floating-point-modes. Change the translations accordingly too. compiler/x86/parms.lisp: o The float property bytes have been updated to match the SSE2 MXCSR register for both SSE2 and X87 builds because the code assumes SSE2 format. lisp/Linux-os.c: o Don't OR in the SSE2 modes if we're not running an SSE2 build. Doing this can erroneously mask out exceptions because the Lisp code didn't set up the sse2 modes. (This happens if you select the x87 core on a chip that supports sse2.) lisp/globals.h: o Declare fpu_mode. lisp/lisp.c: o Set fpu_mode to be the mode determined from the core file. Needed in Linux-os.c to process the SSE2 modes correctly with an x87 core on a sse2-capable chip.
-
- Nov 12, 2008
-
-
rtoy authored
sse2-packed-2008-11-12).
-
- Jan 03, 2008
-
-
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.
-
- Nov 14, 2007
-
-
cshapiro authored
the precision control will always be set to double precision. For the duration of calls into C, the precision control will be set to the ABI default. On Linux and Darwin this is double extended precision. On all other platforms the precision control is left as double precision. The specious FLOAT-ACCURACY declaration has been eliminated. * Shorten the precision control field to 24-bits by disposing of the unexamined high order eight bits of the status word. This compacts the code generated around floating point mode changes and reduces consing. * Eliminate unnecessary uses of FLDENV and FSTENV. We can substitute a use of FSTENV with FSTSW in FLOATING-POINT-MODES. This reduces the number of cycles to access the relevant mode bits by a factor of thirty. We cannot eliminate FLDENV in SET-FLOATING-POINT-MODES, but the common case does not require an update to the status word. A fast path has been added to the VOP that improves the execution time by at least a factor of fifteen. * Remove the precision control option to SET-FLOATING-POINT-MODES. It is the responsibility of the compiler to generating code that yields correctly rounded results in double and single precision.
-
- Jul 06, 2007
-
-
cshapiro authored
-
- Dec 02, 2006
-
-
rtoy authored
o Need to clear out the individual invalid operation bits when clearing the invalid exception bit. code/exports.lisp: compiler/ppc/parms.lisp: o Export FLOAT-INVALID-OP-1-BYTE. (Needs a better name.)
-
- Nov 16, 2006
-
-
rtoy authored
o Pass the modes to GET-FP-OPERANDS compiler/ppc/float.lisp: o If the destination register is the same as one of the source registers, an overflow or underflow exception will have replaced the source register with the result. In that case, replace the source value with NIL to indicate we don't know. (We could recompute the source from the result, but there would be a round-off error.)
-
- Nov 14, 2006
-
-
rtoy authored
code/float-trap.lisp: o Set FP modes now. o Clear out sticky bits in SIGFPE handler code/ppc-vm.lisp: o Add (setf sigcontext-floating-point-modes) to set the FP mode. compiler/ppc/parms.lisp: o Add fields for various invalid operations bits. o Fix float-fast-bit
-
- Nov 09, 2005
-
-
rtoy authored
-
- Jul 25, 2004
-
-
pmai authored
Besides support for Darwin foreign loading, and updates to the ppc-vm and bsd-os files, this commit removes unix:unix-errno as a foreign variable and replaces it with a function named unix-errno, and a (setf unix-errno). This makes both glibc support cleaner, and enables ports like PPC/Darwin (and the upcoming win32 port) which have no easy way of accessing errno as a foreign variable able to support this functionality at all. The current implementation of this is rather make-shift, it would likely be much cleaner to go the SBCL way and mediate all access to errno via defined functions in the C runtime. As an interim feature, the frobbing of the float-trap-modes is currently commented out for Darwin because of ongoing breakage.
-
- Mar 24, 2004
-
-
emarsden authored
- add ignore declaration - fix endpwent alien routine for Solaris
-
- Sep 02, 2003
-
-
gerd authored
* src/code/float-trap.lisp (FPE_*) [freebsd4]: Define constants from machine/trap.h. (sigfpe-handler) [freebsd4]: Use the code parameter to determine the reason for the signal.
-
- Jun 18, 2003
-
-
gerd authored
package COMMON-LISP which LISP uses, so that COMMON-LISP no longer has the non-ANSI nickname LISP. To bootstrap, use boot13.lisp as target:bootstrap.lisp with pmai's build scripts, and do a full compile. * src/bootfiles/18e/boot13.lisp: Change for all the package changes. * src/code/exports.lisp: New package common-lisp, which lisp uses. * src/tools/worldload.lisp: * src/tools/setup.lisp: Use cl-user instead of user. Use lisp:: instead of cl::. * src/tools/worldcom.lisp: * src/tools/snapshot-update.lisp: * src/tools/pclcom.lisp: * src/tools/mk-lisp: * src/tools/hemcom.lisp: * src/tools/config.lisp: * src/tools/comcom.lisp: * src/tools/clxcom.lisp: * src/tools/clmcom.lisp: * src/pcl/defsys.lisp: * src/motif/lisp/initial.lisp: * src/interface/initial.lisp: * src/hemlock/lispmode.lisp (setup-lisp-mode): Use cl-user instead of user. * src/code/save.lisp (assert-user-package): * src/code/print.lisp (%with-standard-io-syntax): Find cl-user package instead of user. * src/code/package.lisp (package-locks-init): Add lisp. (package-init): Don't add user nickname to cl-user. * src/code/ntrace.lisp (*trace-encapsulate-package-names*): Add common-lisp. * src/code/hash.lisp (toplevel): * src/code/hash-new.lisp (toplevel): Use in-package :lisp instead of :common-lisp. * src/code/float-trap.lisp (sigfpe-handler): Don't qualify floating-point-inexact with ext:. * src/pcl/simple-streams/strategy.lisp (sc): * src/pcl/simple-streams/null.lisp (null-read-char): * src/pcl/simple-streams/internal.lisp (allocate-buffer) (free-buffer): * src/pcl/simple-streams/impl.lisp (%check, %read-line) (%peek-char, %read-byte): * src/pcl/simple-streams/file.lisp (open-file-stream) (device-close): * src/pcl/simple-streams/classes.lisp (simple-stream) (device-close): * src/pcl/macros.lisp (toplevel): * src/pcl/braid.lisp (lisp::sxhash-instance): * src/pcl/env.lisp (toplevel): * src/compiler/generic/objdef.lisp (symbol-hash): * src/code/stream.lisp (read-sequence, write-sequence): * src/code/macros.lisp (defmacro, deftype): * src/code/eval.lisp (interpreted-function): * src/code/defstruct.lisp (defstruct): * src/code/debug.lisp (debug-eval-print): Use lisp:: instead of cl::.
-
- Apr 14, 2003
-
-
toy authored
operation and operands that signalled the floating-point exception so we can report it.
-