Skip to content
Snippets Groups Projects
Commit 291a4146 authored by cwang's avatar cwang
Browse files

Unfortunately, I need to put the hardwired constants back into fixnumize.

Cross-compiling from x86 to amd64 requires it.
parent f70b71c6
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/utils.lisp,v 1.9 2004/05/24 23:18:37 cwang Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/utils.lisp,v 1.10 2004/06/16 23:09:40 cwang Rel $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -25,7 +25,10 @@ ...@@ -25,7 +25,10 @@
(defun fixnumize (num) (defun fixnumize (num)
"Make a fixnum out of NUM. (i.e. shift by two bits if it will fit.)" "Make a fixnum out of NUM. (i.e. shift by two bits if it will fit.)"
(if (<= most-negative-fixnum num most-positive-fixnum) ;; the bounds must be hardcoded for cross-compilation
(if (<= #-amd64 #x-20000000 #+amd64 #x-2000000000000000
num
#-amd64 #x1fffffff #+amd64 #x1fffffffffffffff)
(ash num (1- vm:lowtag-bits)) (ash num (1- vm:lowtag-bits))
(error "~D is too big for a fixnum." num))) (error "~D is too big for a fixnum." num)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment