X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fsc-offset.lisp;h=29c86365aca0ce5ba48d37bcc365e60d888e751f;hb=HEAD;hp=001367cb7620c9d776d7462d0c6f3f5bd024e08f;hpb=68fd2d2dd6f265669a8957accd8a33e62786a97e;p=sbcl.git diff --git a/src/code/sc-offset.lisp b/src/code/sc-offset.lisp index 001367c..29c8636 100644 --- a/src/code/sc-offset.lisp +++ b/src/code/sc-offset.lisp @@ -16,13 +16,16 @@ ;;;; We represent the place where some value is stored with a SC-OFFSET, ;;;; which is the SC number and offset encoded as an integer. -(defconstant-eqx sc-offset-scn-byte (byte 5 0) #'equalp) -(defconstant-eqx sc-offset-offset-byte (byte 22 5) #'equalp) +;;;; FIXME: this layout is hardcoded in some .S files, +;;;; undefined_tramp in at least mips/ppc/sparc-assem.S uses it. +;;;; Ideally, it shouldn't be hardcoded. +(defconstant-eqx sc-offset-scn-byte (byte 6 0) #'equalp) +(defconstant-eqx sc-offset-offset-byte (byte 21 6) #'equalp) (def!type sc-offset () '(unsigned-byte 27)) (defmacro make-sc-offset (scn offset) `(dpb ,scn sc-offset-scn-byte - (dpb ,offset sc-offset-offset-byte 0))) + (dpb ,offset sc-offset-offset-byte 0))) (defmacro sc-offset-scn (sco) `(ldb sc-offset-scn-byte ,sco)) (defmacro sc-offset-offset (sco) `(ldb sc-offset-offset-byte ,sco))