0.9.5.1:
[sbcl.git] / src / compiler / mips / call.lisp
index 8cb79e2..3168b88 100644 (file)
@@ -35,7 +35,7 @@
       (make-restricted-tn *backend-t-primitive-type* register-arg-scn)))
 
 ;;; This is similar to MAKE-RETURN-PC-PASSING-LOCATION, but makes a
-;;; location to pass Old-FP in. This is (obviously) wired in the
+;;; location to pass OLD-FP in. This is (obviously) wired in the
 ;;; standard convention, but is totally unrestricted in non-standard
 ;;; conventions, since we can always fetch it off of the stack using
 ;;; the arg pointer.
     (trace-table-entry trace-table-fun-prologue)
     (emit-label start-lab)
     ;; Allocate function header.
-    (inst fun-header-word)
+    (inst simple-fun-header-word)
     (dotimes (i (1- simple-fun-code-offset))
       (inst word 0))
     ;; The start of the actual code.
     ;; Compute CODE from the address of this entry point.
     (let ((entry-point (gen-label)))
       (emit-label entry-point)
-      (inst compute-code-from-fn code-tn lip-tn entry-point temp)
+      (inst compute-code-from-lip code-tn lip-tn entry-point temp)
       ;; ### We should also save it on the stack so that the garbage collector
       ;; won't forget about us if we call anyone else.
       )
 ;;; In the general case, we have to do three things:
 ;;;  -- Default unsupplied register values.  This need only be done when a
 ;;;     single value is returned, since register values are defaulted by the
-;;;     called in the non-single case.
+;;;     callee in the non-single case.
 ;;;  -- Default unsupplied stack values.  This needs to be done whenever there
 ;;;     are stack values.
 ;;;  -- Reset SP.  This must be done whenever other than 1 value is returned,
@@ -240,7 +240,7 @@ regs-defaulted
         ...
 
 defaulting-done
-        move sp ocfp                    ; Reset SP.
+        move csp ocfp                    ; Reset SP.
 <end of code>
 
 <elsewhere>
@@ -284,7 +284,7 @@ default-value-8
               (inst addu temp nargs-tn (fixnumize (- register-arg-count)))
               (move csp-tn ocfp-tn t)))
 
-        ;; Do the single value calse.
+        ;; Do the single value case.
         (do ((i 1 (1+ i))
              (val (tn-ref-across values) (tn-ref-across val)))
             ((= i (min nvals register-arg-count)))
@@ -322,13 +322,15 @@ default-value-8
               (aver defaults)
               (assemble (*elsewhere*)
                 (emit-label default-stack-vals)
+                (trace-table-entry trace-table-fun-prologue)
                 (do ((remaining defaults (cdr remaining)))
                     ((null remaining))
                   (let ((def (car remaining)))
                     (emit-label (car def))
                     (when (null (cdr remaining))
                       (inst b defaulting-done))
-                    (store-stack-tn (cdr def) null-tn)))))))
+                    (store-stack-tn (cdr def) null-tn)))
+                (trace-table-entry trace-table-normal)))))
 
         (when lra-label
           (inst compute-code-from-lra code-tn code-tn lra-label temp))))
@@ -365,23 +367,25 @@ default-value-8
     (when lra-label
       (inst compute-code-from-lra code-tn code-tn lra-label temp))
     (inst addu csp-tn csp-tn 4)
-    (storew (first register-arg-tns) csp-tn -1)
+    (storew (first *register-arg-tns*) csp-tn -1)
     (inst addu start csp-tn -4)
     (inst li count (fixnumize 1))
 
     (emit-label done)
 
     (assemble (*elsewhere*)
+      (trace-table-entry trace-table-fun-prologue)
       (emit-label variable-values)
       (when lra-label
         (inst compute-code-from-lra code-tn code-tn lra-label temp))
-      (do ((arg register-arg-tns (rest arg))
+      (do ((arg *register-arg-tns* (rest arg))
            (i 0 (1+ i)))
           ((null arg))
         (storew (first arg) args i))
       (move start args)
       (inst b done)
-      (move count nargs t)))
+      (move count nargs t)
+      (trace-table-entry trace-table-normal)))
   (values))
 
 
@@ -1091,7 +1095,7 @@ default-value-8
           ;; Is this the last one?
           (inst beq count done)
           ;; Store it relative to the pointer saved at the start.
-          (storew (nth i register-arg-tns) result (- i fixed))
+          (storew (nth i *register-arg-tns*) result (- i fixed))
           ;; Decrement count.
           (inst subu count (fixnumize 1))))
       (emit-label done))))