9654ac4a135c62e44c4b610a1b8582843a2e4142
[sbcl.git] / src / compiler / generic / early-vm.lisp
1 ;;;; This software is part of the SBCL system. See the README file for
2 ;;;; more information.
3 ;;;;
4 ;;;; This software is derived from the CMU CL system, which was
5 ;;;; written at Carnegie Mellon University and released into the
6 ;;;; public domain. The software is in the public domain and is
7 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
8 ;;;; files for more information.
9
10 (in-package "SB!VM")
11
12 (file-comment
13   "$Header$")
14
15 (eval-when (:compile-toplevel :execute :load-toplevel)
16
17 (defconstant lowtag-bits 3
18   #!+sb-doc
19   "Number of bits at the low end of a pointer used for type information.")
20
21 (defconstant lowtag-mask (1- (ash 1 lowtag-bits))
22   #!+sb-doc
23   "Mask to extract the low tag bits from a pointer.")
24
25 (defconstant lowtag-limit (ash 1 lowtag-bits)
26   #!+sb-doc
27   "Exclusive upper bound on the value of the low tag bits from a pointer.")
28
29 (defconstant type-bits 8
30   #!+sb-doc
31   "Number of bits used in the header word of a data block to store the type.")
32
33 (defconstant type-mask (1- (ash 1 type-bits))
34   #!+sb-doc
35   "Mask to extract the type from a header word.")
36
37 ); eval-when
38
39 ;;; FIXME: Couldn't/shouldn't these be DEFCONSTANT instead of DEFPARAMETER?
40 (defparameter *target-most-positive-fixnum* (1- (ash 1 29))
41   #!+sb-doc
42   "most-positive-fixnum in the target architecture.")
43 (defparameter *target-most-negative-fixnum* (ash -1 29)
44   #!+sb-doc
45   "most-negative-fixnum in the target architecture.")