0.9.2.25:
[sbcl.git] / src / compiler / mips / macros.lisp
index e582930..bfe1c9d 100644 (file)
   is nil)."
   (once-only ((n-dst dst)
              (n-src src))
-    (if always-emit-code-p
-       `(inst move ,n-dst ,n-src)
-       `(unless (location= ,n-dst ,n-src)
-          (inst move ,n-dst ,n-src)))))
+    `(if (location= ,n-dst ,n-src)
+        (when ,always-emit-code-p
+          (inst nop))
+        (inst move ,n-dst ,n-src))))
 
 (defmacro def-mem-op (op inst shift load)
   `(defmacro ,op (object base &optional (offset 0) (lowtag 0))
@@ -43,7 +43,8 @@
 (def-mem-op storew sw word-shift nil)
 
 (defmacro load-symbol (reg symbol)
-  `(inst addu ,reg null-tn (static-symbol-offset ,symbol)))
+  (once-only ((reg reg) (symbol symbol))
+    `(inst addu ,reg null-tn (static-symbol-offset ,symbol))))
 
 (defmacro load-symbol-value (reg symbol)
   `(progn
@@ -67,7 +68,7 @@
              (n-offset offset))
     (ecase *backend-byte-order*
       (:little-endian
-       `(inst lbu ,n-target ,n-source ,n-offset ))
+       `(inst lbu ,n-target ,n-source ,n-offset))
       (:big-endian
        `(inst lbu ,n-target ,n-source (+ ,n-offset 3))))))
 
@@ -81,7 +82,7 @@
      (inst addu ,lip ,function (- (ash simple-fun-code-offset word-shift)
                                   fun-pointer-lowtag))
      (inst j ,lip)
-     (move code-tn ,function)))
+     (move code-tn ,function t)))
 
 (defmacro lisp-return (return-pc lip &key (offset 0) (frob-code t))
   "Return to RETURN-PC.  LIP is an interior-reg temporary."
@@ -90,7 +91,7 @@
           (- (* (1+ ,offset) n-word-bytes) other-pointer-lowtag))
      (inst j ,lip)
      ,(if frob-code
-         `(move code-tn ,return-pc)
+         `(move code-tn ,return-pc t)
          '(inst nop))))
 
 
 
 \f
 ;;;; Error Code
-(eval-when (compile load eval)
+(eval-when (:compile-toplevel :load-toplevel :execute)
   (defun emit-error-break (vop kind code values)
     (let ((vector (gensym)))
       `((let ((vop ,vop))
      ,@forms
      (without-scheduling ()
        (let ((label (gen-label)))
-        (inst nop)
-        (inst nop)
-        (inst nop)
         (inst bgez ,flag-tn label)
         (inst addu alloc-tn (1- ,extra))
         (inst break 16)