10636b65e2c11f620b6cb7cd55e7f8a786da9587
[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 (eval-when (:compile-toplevel :execute :load-toplevel)
13
14 (defconstant lowtag-bits 3
15   #!+sb-doc
16   "Number of bits at the low end of a pointer used for type information.")
17
18 (defconstant lowtag-mask (1- (ash 1 lowtag-bits))
19   #!+sb-doc
20   "Mask to extract the low tag bits from a pointer.")
21
22 (defconstant lowtag-limit (ash 1 lowtag-bits)
23   #!+sb-doc
24   "Exclusive upper bound on the value of the low tag bits from a pointer.")
25
26 (defconstant type-bits 8
27   #!+sb-doc
28   "Number of bits used in the header word of a data block to store the type.")
29
30 (defconstant type-mask (1- (ash 1 type-bits))
31   #!+sb-doc
32   "Mask to extract the type from a header word.")
33
34 ); eval-when
35
36 ;;; FIXME: Couldn't/shouldn't these be DEFCONSTANT instead of DEFPARAMETER?
37 (defparameter *target-most-positive-fixnum* (1- (ash 1 29))
38   #!+sb-doc
39   "most-positive-fixnum in the target architecture.")
40 (defparameter *target-most-negative-fixnum* (ash -1 29)
41   #!+sb-doc
42   "most-negative-fixnum in the target architecture.")