0.9.2.45:
[sbcl/lichteblau.git] / src / code / sc-offset.lisp
blobb05c9b75763c0ed9d5f07b84d9fdffc05a7b75e9
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.
10 ;;; SC-OFFSETs are needed by sparc-vm.lisp
12 (in-package "SB!C")
14 ;;;; SC-OFFSETs
15 ;;;;
16 ;;;; We represent the place where some value is stored with a SC-OFFSET,
17 ;;;; which is the SC number and offset encoded as an integer.
19 (defconstant-eqx sc-offset-scn-byte (byte 5 0) #'equalp)
20 (defconstant-eqx sc-offset-offset-byte (byte 22 5) #'equalp)
21 (def!type sc-offset () '(unsigned-byte 27))
23 (defmacro make-sc-offset (scn offset)
24 `(dpb ,scn sc-offset-scn-byte
25 (dpb ,offset sc-offset-offset-byte 0)))
27 (defmacro sc-offset-scn (sco) `(ldb sc-offset-scn-byte ,sco))
28 (defmacro sc-offset-offset (sco) `(ldb sc-offset-offset-byte ,sco))