Skip to content

Commit

Permalink
0.8alpha.0.13:
Browse files Browse the repository at this point in the history
	(oops: add file needed from last commit)
  • Loading branch information
csrhodes committed May 5, 2003
1 parent 22b819c commit ef339cb
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/code/unportable-float.lisp
@@ -0,0 +1,28 @@
;;;; nonportable floating point things, useful in LOAD-TIME-VALUE
;;;; forms for referring to floating point objects that will exist on
;;;; the SBCL target but may not when running under an ordinary ANSI
;;;; Common Lisp implementation.

;;;; This software is part of the SBCL system. See the README file for
;;;; more information.
;;;;
;;;; This software is derived from the CMU CL system, which was
;;;; written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
;;;; provided with absolutely no warranty. See the COPYING and CREDITS
;;;; files for more information.

(in-package "SB!IMPL")

(defun make-unportable-float (name)
(flet ((opaque-identity (x) x))
;; KLUDGE: "DO NOT CONSTANT FOLD, EVIL COMPILER!"
(declare (notinline opaque-identity make-single-float make-double-float))
(ecase name
(:single-float-negative-zero (make-single-float
(opaque-identity #x-80000000)))
(:double-float-negative-zero (make-double-float
(opaque-identity #x-80000000)
(opaque-identity #x00000000)))
#!+long-float
(:long-float-negative-zero (error "write LONG-FLOAT creation form")))))

0 comments on commit ef339cb

Please sign in to comment.