Simplify EMIT-GENERIC-VOP.
[sbcl.git] / src / compiler / tn.lisp
index 1f72696..c75aebf 100644 (file)
       ;; However, in the case of USE-IMMED-P we can have the same TN for both
       ;; uses. The first two legs here take care of that by cross-pollinating the
       ;; cached values.
-      ((and use-immed-p boxedp (leaf-info constant)))
-      ((and use-immed-p (not boxedp) (constant-boxed-tn constant)))
+      ;;
+      ;; Similarly, when there is no immediate SC.
+      ((and (or use-immed-p (not immed)) boxedp (leaf-info constant)))
+      ((and (or use-immed-p (not immed)) (not boxedp) (constant-boxed-tn constant)))
       (t
        (let* ((component (component-info *component-being-compiled*))
               (sc (svref *backend-sc-numbers*
   (let ((arg (reference-tn x nil))
         (result (reference-tn y t)))
     (multiple-value-bind (first last)
-        (funcall (template-emit-function template) node block template arg
-                 result)
+        (emit-vop node block template arg result)
       (insert-vop-sequence first last block before)
       last)))
 
   (let ((arg (reference-tn x nil))
         (result (reference-tn y t)))
     (multiple-value-bind (first last)
-        (funcall (template-emit-function template) node block template arg
-                 result info)
+        (emit-vop node block template arg result info)
       (insert-vop-sequence first last block before)
       last)))
 
         (y-ref (reference-tn y t)))
     (setf (tn-ref-across x-ref) f-ref)
     (multiple-value-bind (first last)
-        (funcall (template-emit-function template) node block template x-ref
-                 y-ref)
+        (emit-vop node block template x-ref y-ref)
       (insert-vop-sequence first last block before)
       last)))
 
            (type template template) (type tn y))
   (let ((y-ref (reference-tn y t)))
     (multiple-value-bind (first last)
-        (funcall (template-emit-function template) node block template nil
-                 y-ref)
+        (emit-vop node block template nil y-ref)
       (insert-vop-sequence first last block before)
       last)))