1 ;;;; This software is part of the SBCL system. See the README file for
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
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 ;;;; FIXME: this layout is hardcoded in some .S files,
20 ;;;; undefined_tramp in at least mips/ppc/sparc-assem.S uses it.
21 ;;;; Ideally, it shouldn't be hardcoded.
22 (defconstant-eqx sc-offset-scn-byte
(byte 6 0) #'equalp
)
23 (defconstant-eqx sc-offset-offset-byte
(byte 21 6) #'equalp
)
24 (def!type sc-offset
() '(unsigned-byte 27))
26 (defmacro make-sc-offset
(scn offset
)
27 `(dpb ,scn sc-offset-scn-byte
28 (dpb ,offset sc-offset-offset-byte
0)))
30 (defmacro sc-offset-scn
(sco) `(ldb sc-offset-scn-byte
,sco
))
31 (defmacro sc-offset-offset
(sco) `(ldb sc-offset-offset-byte
,sco
))