Skip to content
Snippets Groups Projects
Commit b5237efc authored by Raymond Toy's avatar Raymond Toy
Browse files

Add some fixnum contants for x86, as was done for sparc.

 code/export.lisp::
 * Export new symbols

 compiler/x86/parms.lisp::
 * Define constants for useful the number of lowtag bits and masks and
   the number of fixnum tag bits and masks.
parent d1af0b85
No related branches found
No related tags found
No related merge requests found
......@@ -1136,7 +1136,10 @@
"CHAR-BITS" "CHAR-BYTES"
)
#+x86
(:export "COMPATIBLE-FUNCTION-TYPES-P")
(:export "COMPATIBLE-FUNCTION-TYPES-P"
"POSITIVE-FIXNUM-BITS"
"FIXNUM-TAG-BITS"
"FIXNUM-TAG-MASK")
#+sparc
(:export "ALLOCATION-TRAP"
"POSITIVE-FIXNUM-BITS"
......
......@@ -75,6 +75,7 @@
;;;; Machine Architecture parameters:
(export '(word-bits byte-bits char-bits word-shift word-bytes char-bytes
fixnum-tag-bits fixnum-tag-mask positive-fixnum-bits
float-sign-shift
single-float-bias single-float-exponent-byte
......@@ -119,6 +120,25 @@
(defconstant word-bytes (/ word-bits byte-bits)
"Number of bytes in a word.")
(defconstant lowtag-bits 3
"Number of bits at the low end of a pointer used for type information.")
(defconstant lowtag-mask (1- (ash 1 lowtag-bits))
"Mask to extract the low tag bits from a pointer.")
(defconstant lowtag-limit (ash 1 lowtag-bits)
"Exclusive upper bound on the value of the low tag bits from a
pointer.")
(defconstant fixnum-tag-bits (1- lowtag-bits)
"Number of tag bits used for a fixnum")
(defconstant fixnum-tag-mask (1- (ash 1 fixnum-tag-bits))
"Mask to get the fixnum tag")
(defconstant positive-fixnum-bits (- word-bits fixnum-tag-bits 1)
"Maximum number of bits in a positive fixnum")
) ; eval-when
(eval-when (compile load eval)
......
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