X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fvalues.lisp;h=082ad2c6b074ad71a83cef04abc2d37830392f1c;hb=b2ed34b667665e52609cf431c00179b136be450d;hp=c7c294b368b59489b8797e9030a1e3ebb50b266b;hpb=1e5296127f5b384a2171646747021ebeee73b801;p=sbcl.git diff --git a/src/compiler/x86/values.lisp b/src/compiler/x86/values.lisp index c7c294b..082ad2c 100644 --- a/src/compiler/x86/values.lisp +++ b/src/compiler/x86/values.lisp @@ -109,16 +109,32 @@ ;;; defining a new stack frame. (define-vop (%more-arg-values) (:args (context :scs (descriptor-reg any-reg) :target src) + (skip :scs (any-reg immediate)) (num :scs (any-reg) :target count)) - (:arg-types * positive-fixnum) + (:arg-types * positive-fixnum positive-fixnum) (:temporary (:sc any-reg :offset esi-offset :from (:argument 0)) src) (:temporary (:sc descriptor-reg :offset eax-offset) temp) (:temporary (:sc unsigned-reg :offset ecx-offset) loop-index) (:results (start :scs (any-reg)) (count :scs (any-reg))) (:generator 20 - (move src context) - (move count num) + (sc-case skip + (immediate + (cond ((zerop (tn-value skip)) + (move src context) + (move count num)) + (t + (inst lea src (make-ea :dword :base context + :disp (- (* (tn-value skip) + n-word-bytes)))) + (move count num) + (inst sub count (* (tn-value skip) n-word-bytes))))) + + (any-reg + (move src context) + (inst sub src skip) + (move count num) + (inst sub count skip))) (move loop-index count) (inst mov start esp-tn) @@ -133,5 +149,6 @@ (inst mov (make-ea :dword :base esp-tn :index loop-index) temp) (inst jmp :nz LOOP) - DONE)) + DONE + ))