X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fsparc%2Fvm.lisp;h=40eca8345b03a7eb5a176408fb1f822a760a39aa;hb=369029d73f198b59135c6c005b7a70ae5a753650;hp=6c954051bab3d5868ed53f752d9ec980a21edd1d;hpb=68fd2d2dd6f265669a8957accd8a33e62786a97e;p=sbcl.git diff --git a/src/compiler/sparc/vm.lisp b/src/compiler/sparc/vm.lisp index 6c95405..40eca83 100644 --- a/src/compiler/sparc/vm.lisp +++ b/src/compiler/sparc/vm.lisp @@ -19,7 +19,7 @@ (macrolet ((defreg (name offset) (let ((offset-sym (symbolicate name "-OFFSET"))) `(eval-when (:compile-toplevel :load-toplevel :execute) - (defconstant ,offset-sym ,offset) + (def!constant ,offset-sym ,offset) (setf (svref *register-names* ,offset-sym) ,(symbol-name name))))) @@ -29,7 +29,7 @@ (list ,@(mapcar (lambda (name) (symbolicate name "-OFFSET")) regs)))))) - ;; "c.f. src/runtime/sparc-lispregs.h + ;; c.f. src/runtime/sparc-lispregs.h ;; Globals. These are difficult to extract from a sigcontext. (defreg zero 0) ; %g0 @@ -79,7 +79,7 @@ (defregset *register-arg-offsets* a0 a1 a2 a3 a4 a5)) -;;;; SB and SC definition: +;;;; SB and SC definition (define-storage-base registers :finite :size 32) (define-storage-base float-registers :finite :size 64) @@ -88,11 +88,9 @@ (define-storage-base constant :non-packed) (define-storage-base immediate-constant :non-packed) -;;; Handy macro so we don't have to keep changing all the numbers whenever -;;; we insert a new storage class. -;;; -;;; FIXME: This macro is not needed in the runtime target. -(defmacro define-storage-classes (&rest classes) +;;; handy macro so we don't have to keep changing all the numbers +;;; whenever we insert a new storage class +(defmacro !define-storage-classes (&rest classes) (do ((forms (list 'progn) (let* ((class (car classes)) (sc-name (car class)) @@ -101,7 +99,7 @@ "-SC-NUMBER")))) (list* `(define-storage-class ,sc-name ,index ,@(cdr class)) - `(defconstant ,constant-name ,index) + `(def!constant ,constant-name ,index) ;; (The CMU CL version of this macro did ;; `(EXPORT ',CONSTANT-NAME) ;; here, but in SBCL we try to have package @@ -120,11 +118,11 @@ ;;; and seems to be working so far -dan ;;; ;;; arbitrarily taken for alpha, too. - Christophe -(defconstant sb!vm::kludge-nondeterministic-catch-block-size 7) +(def!constant sb!vm::kludge-nondeterministic-catch-block-size 7) -(define-storage-classes +(!define-storage-classes - ;; Non-immediate contstants in the constant pool + ;; non-immediate constants in the constant pool (constant constant) ;; ZERO and NULL are in registers. @@ -134,8 +132,9 @@ ;; Anything else that can be an immediate. (immediate immediate-constant) - - ;; **** The stacks. + ;; + ;; the stacks + ;; ;; The control stack. (Scanned by GC) (control-stack control-stack) @@ -317,20 +316,20 @@ ;;;; function call parameters ;;; the SC numbers for register and stack arguments/return values. -(defconstant register-arg-scn (meta-sc-number-or-lose 'descriptor-reg)) -(defconstant immediate-arg-scn (meta-sc-number-or-lose 'any-reg)) -(defconstant control-stack-arg-scn (meta-sc-number-or-lose 'control-stack)) +(def!constant register-arg-scn (meta-sc-number-or-lose 'descriptor-reg)) +(def!constant immediate-arg-scn (meta-sc-number-or-lose 'any-reg)) +(def!constant control-stack-arg-scn (meta-sc-number-or-lose 'control-stack)) (eval-when (:compile-toplevel :load-toplevel :execute) ;; offsets of special stack frame locations - (defconstant ocfp-save-offset 0) - (defconstant lra-save-offset 1) - (defconstant nfp-save-offset 2) + (def!constant ocfp-save-offset 0) + (def!constant lra-save-offset 1) + (def!constant nfp-save-offset 2) ;; the number of arguments/return values passed in registers. ;; - (defconstant register-arg-count 6) + (def!constant register-arg-count 6) ;; names to use for the argument registers. ;; @@ -347,7 +346,7 @@ *register-arg-offsets*)) ;;; This is used by the debugger. -(defconstant single-value-return-byte-offset 8) +(def!constant single-value-return-byte-offset 8) ;;; This function is called by debug output routines that want a