Commit 5e340d32 authored by Carl Shapiro's avatar Carl Shapiro
Browse files

Simplify the %more-arg-values VOP.

parent 60d810f9
...@@ -94,43 +94,25 @@ ...@@ -94,43 +94,25 @@
;;; ;;;
(define-vop (%more-arg-values) (define-vop (%more-arg-values)
(:args (context :scs (descriptor-reg any-reg) :target src) (:args (context :scs (descriptor-reg any-reg) :target src)
(skip :scs (any-reg immediate)) (skip :scs (any-reg immediate))
(num :scs (any-reg) :target count)) (num :scs (any-reg) :target count))
(:arg-types * positive-fixnum positive-fixnum) (:arg-types * positive-fixnum positive-fixnum)
(:temporary (:sc any-reg :offset esi-offset :from (:argument 0)) src) (:temporary (:sc any-reg :from (:argument 0)) src)
(:temporary (:sc descriptor-reg :offset eax-offset) temp) (:temporary (:sc any-reg :from (:argument 1)) i)
(:temporary (:sc unsigned-reg :offset ecx-offset) temp1)
(:results (start :scs (any-reg)) (:results (start :scs (any-reg))
(count :scs (any-reg))) (count :scs (any-reg)))
(:generator 20 (:generator 20
(sc-case skip (move src context)
(immediate (move count num)
(cond ((zerop (tn-value skip)) (inst sub src count)
(move src context) (unless (and (sc-is skip immediate) (zerop (tn-value skip)))
(move count num)) (inst sub count skip))
(t (move start esp-tn)
(inst lea src (make-ea :dword :base context (inst test count count)
:disp (- (* (tn-value skip) word-bytes)))) (inst jmp :z done)
(move count num) (inst mov i count)
(inst sub count (* (tn-value skip) word-bytes)))))
(move src context)
(inst sub src skip)
(move count num)
(inst sub count skip)))
(move temp1 count)
(inst mov start esp-tn)
(inst jecxz done) ; check for 0 count?
(inst shr temp1 word-shift) ; convert the fixnum to a count.
(inst mov temp (make-ea :dword :base src)) (inst push (make-ea :dword :base src :index i))
(inst sub src 4) (inst sub i word-bytes)
(inst push temp) (inst jmp :nz loop)
(inst loop loop)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment