X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fsparc%2Fvm.lisp;h=5ee30a896aed051d3b00119bcca4133312f3efd0;hb=69ef68ba7393e3492c1b4a756d1140f71c2922bc;hp=40eca8345b03a7eb5a176408fb1f822a760a39aa;hpb=8731c1a7c1a585d190151fa881050fb5e14c0616;p=sbcl.git diff --git a/src/compiler/sparc/vm.lisp b/src/compiler/sparc/vm.lisp index 40eca83..5ee30a8 100644 --- a/src/compiler/sparc/vm.lisp +++ b/src/compiler/sparc/vm.lisp @@ -10,7 +10,18 @@ ;;;; files for more information. (in-package "SB!VM") - + +;;;; Additional constants + +;;; NUMBER-STACK-DISPLACEMENT +;;; +;;; The number of bytes reserved above the number stack pointer. These +;;; slots are required by architecture for a place to spill register windows. +;;; +;;; FIXME: Where is this used? +(def!constant number-stack-displacement + (* 16 n-word-bytes)) + ;;;; Define the registers (eval-when (:compile-toplevel :load-toplevel :execute) @@ -118,7 +129,7 @@ ;;; and seems to be working so far -dan ;;; ;;; arbitrarily taken for alpha, too. - Christophe -(def!constant sb!vm::kludge-nondeterministic-catch-block-size 7) +(def!constant kludge-nondeterministic-catch-block-size 7) (!define-storage-classes @@ -142,7 +153,7 @@ ;; The non-descriptor stacks. (signed-stack non-descriptor-stack) ; (signed-byte 32) (unsigned-stack non-descriptor-stack) ; (unsigned-byte 32) - (base-char-stack non-descriptor-stack) ; non-descriptor characters. + (character-stack non-descriptor-stack) ; non-descriptor characters. (sap-stack non-descriptor-stack) ; System area pointers. (single-stack non-descriptor-stack) ; single-floats (double-stack non-descriptor-stack @@ -177,11 +188,11 @@ :alternate-scs (control-stack)) ;; Non-Descriptor characters - (base-char-reg registers + (character-reg registers :locations #.non-descriptor-regs :constant-scs (immediate) :save-p t - :alternate-scs (base-char-stack)) + :alternate-scs (character-stack)) ;; Non-Descriptor SAP's (arbitrary pointers into address space) (sap-reg registers @@ -270,12 +281,9 @@ ;; A catch or unwind block. - (catch-block control-stack :element-size sb!vm::kludge-nondeterministic-catch-block-size)) - - + (catch-block control-stack :element-size kludge-nondeterministic-catch-block-size)) -;;;; Make some random tns for important registers. - +;;;; Make some miscellaneous TNs for important registers. (macrolet ((defregtn (name sc) (let ((offset-sym (symbolicate name "-OFFSET")) (tn-sym (symbolicate name "-TN"))) @@ -294,10 +302,8 @@ (defregtn cfp any-reg) (defregtn ocfp any-reg) (defregtn nsp any-reg)) - - -;;; If value can be represented as an immediate constant, then return the +;;; If VALUE can be represented as an immediate constant, then return the ;;; appropriate SC number, otherwise return NIL. (!def-vm-support-routine immediate-constant-sc (value) (typecase value @@ -305,13 +311,13 @@ (sc-number-or-lose 'zero)) (null (sc-number-or-lose 'null)) - ((or fixnum system-area-pointer character) + ((or (integer #.sb!xc:most-negative-fixnum #.sb!xc:most-positive-fixnum) + system-area-pointer character) (sc-number-or-lose 'immediate)) (symbol (if (static-symbol-p value) (sc-number-or-lose 'immediate) nil)))) - ;;;; function call parameters @@ -328,16 +334,14 @@ (def!constant nfp-save-offset 2) ;; the number of arguments/return values passed in registers. - ;; (def!constant register-arg-count 6) ;; names to use for the argument registers. - ;; (defparameter register-arg-names '(a0 a1 a2 a3 a4 a5)) -); eval-when (:compile-toplevel :load-toplevel :execute) +) ; EVAL-WHEN -;;; a list of TN's describing the register arguments. +;;; a list of TN's describing the register arguments (defparameter *register-arg-tns* (mapcar (lambda (n) (make-random-tn :kind :normal @@ -347,7 +351,6 @@ ;;; This is used by the debugger. (def!constant single-value-return-byte-offset 8) - ;;; This function is called by debug output routines that want a ;;; pretty name for a TN's location. It returns a thing that can be @@ -365,10 +368,3 @@ (constant (format nil "Const~D" offset)) (immediate-constant "Immed")))) - -;;; The loader uses this to convert alien names to the form they -;;; occure in the symbol table (for example, prepending an -;;; underscore). On the SPARC, we don't prepend an underscore. -(defun extern-alien-name (name) - (declare (type simple-base-string name)) - (concatenate 'string #+nil "_" name))