0.pre7.31:
[sbcl.git] / src / compiler / x86 / vm.lisp
index 8f09651..c9eeb6d 100644 (file)
             (let ((offset-sym (symbolicate name "-OFFSET"))
                   (names-vector (symbolicate "*" size "-REGISTER-NAMES*")))
               `(progn
-                 (defconstant ,offset-sym ,offset)
+                 (eval-when (:compile-toplevel :load-toplevel :execute)
+                    ;; EVAL-WHEN is necessary because stuff like #.EAX-OFFSET
+                    ;; (in the same file) depends on compile-time evaluation
+                    ;; of the DEFCONSTANT. -- AL 20010224
+                   (defconstant ,offset-sym ,offset))
                  (setf (svref ,names-vector ,offset-sym)
                        ,(symbol-name name)))))
           ;; FIXME: It looks to me as though DEFREGSET should also
          (forms `(define-storage-class ,sc-name ,index
                    ,@(cdr class)))
          (forms `(defconstant ,constant-name ,index))
-         (forms `(let ((sb!int::*rogue-export* "DEFINE-STORAGE-CLASSES"))
-                   (export ',constant-name)))
          (incf index))))
     `(progn
        ,@(forms))))
                  :offset 31))          ; Offset doesn't get used.
 |#
 \f
-;;; IMMEDIATE-CONSTANT-SC
-;;;
 ;;; 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)
+(!def-vm-support-routine immediate-constant-sc (value)
   (typecase value
     ((or fixnum #-sb-xc-host system-area-pointer character)
      (sc-number-or-lose 'immediate))
 (defconstant cfp-offset ebp-offset)    ; pfw - needed by stuff in /code
                                        ; related to signal context stuff
 
-;;; SINGLE-VALUE-RETURN-BYTE-OFFSET
-;;;
 ;;; This is used by the debugger.
 (defconstant single-value-return-byte-offset 2)
 \f
 ;;; 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 printed with PRINC.
-(def-vm-support-routine location-print-name (tn)
+(!def-vm-support-routine location-print-name (tn)
   (declare (type tn tn))
   (let* ((sc (tn-sc tn))
         (sb (sb-name (sc-sb sc)))
 ;;; the symbol table (for example, prepending an underscore).
 (defun extern-alien-name (name)
   (declare (type simple-string name))
+  ;; On the X86 we don't do anything.
   name)