0.8.9.18
[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 ;;; the number of bits at the low end of a pointer used for type
13 ;;; information
14 (def!constant n-lowtag-bits #!+x86-64 4 #!-x86-64 3)
15 ;;; a mask to extract the low tag bits from a pointer
16 (def!constant lowtag-mask (1- (ash 1 n-lowtag-bits)))
17 ;;; the exclusive upper bound on the value of the low tag bits from a
18 ;;; pointer
19 (def!constant lowtag-limit (ash 1 n-lowtag-bits))
20
21 ;;; the number of bits used in the header word of a data block to store
22 ;;; the type
23 (def!constant n-widetag-bits 8)
24 ;;; a mask to extract the type from a data block header word
25 (def!constant widetag-mask (1- (ash 1 n-widetag-bits)))
26
27 (def!constant sb!xc:most-positive-fixnum  
28     (1- (ash 1 (- n-word-bits n-lowtag-bits)))
29   #!+sb-doc
30   "the fixnum closest in value to positive infinity")
31 (def!constant sb!xc:most-negative-fixnum
32     (ash -1 (- n-word-bits n-lowtag-bits))
33   #!+sb-doc
34   "the fixnum closest in value to negative infinity")