forked from dmitryvk/sbcl-win32-threads
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(oops: add file needed from last commit)
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"))))) |