Changeset 16452


Ignore:
Timestamp:
Jul 8, 2015, 7:19:59 AM (4 years ago)
Author:
gb
Message:

do dynamic binding inline when linear-scan
trust frontend to generate supplied-p vars when some are user-supplied.
in the simple lambda case, reserve spill area early.
work around assembler bug in %iasr, %ilsr; need to check %ilsr.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/lscan/source/compiler/X86/x862.lisp

    r16448 r16452  
    11721172                   (decf ea *x862-target-node-size*))))))))))
    11731173
    1174 
     1174<
    11751175(defun x862-bind-lambda (seg  req opt rest keys auxen optsupvloc passed-in-regs lexpr inherited tail-label
    11761176                             &aux (vloc 0)
     
    12381238  ;;(when *backend-use-linear-scan* "we may need to move this to the body")
    12391239  (with-x86-local-vinsn-macros (seg)
    1240     (dolist (var vars vloc)
     1240   (dolist (var vars vloc)
    12411241      (let* ((initform (pop inits))
    12421242             (spvar (pop spvars))
     
    13311331      (setq *x862-incoming-args-on-stack* (- max *x862-target-num-arg-regs*))
    13321332      (if fixed (@ (setq *x862-fixed-self-tail-call-label* (backend-get-next-label))))
     1333      (! reserve-spill-area)
     1334      (! save-nfp)
    13331335     
    13341336      (do* ((offset 0 (1+ offset))
     
    13531355                 (! copy-gpr reg ($ x8664::arg_z))))
    13541356            (setf (var-lreg var) reg)))
    1355       ())))
     1357      )))
    13561358
    13571359;;; nargs has been validated, arguments defaulted and canonicalized.
     
    58125814(defun x862-dbind (seg value sym)
    58135815  (with-x86-local-vinsn-macros (seg)
    5814     (cond ((and nil *backend-use-linear-scan*)
     5816    (cond ((and *backend-use-linear-scan*)
    58155817     
    58165818           (let*  ((rval (x862-one-untargeted-reg-form seg value (?)))
     
    68586860(defun x862-dpayback (seg n)
    68596861  (declare (fixnum n))
    6860    (with-x86-local-vinsn-macros (seg)
    6861      (unless (eql n 0)
    6862     (if (eql n 1)
    6863       (! call-subprim (subprim-name->offset '.SPunbind))
    6864       (progn
    6865         (! lri ($ x8664::imm0 :mode :u64) n)
    6866         (! call-subprim (subprim-name->offset '.SPunbind-n)))))))
     6862  (with-x86-local-vinsn-macros (seg)
     6863    (unless (eql n 0)
     6864      (if *backend-use-linear-scan*
     6865        (dotimes (i n)
     6866          (! unbind-inline))
     6867      (if (eql n 1)
     6868        (! call-subprim (subprim-name->offset '.SPunbind))
     6869        (progn
     6870          (! lri ($ x8664::imm0 :mode :u64) n)
     6871          (! call-subprim (subprim-name->offset '.SPunbind-n))))))))
    68676872             
    68686873
     
    75837588          ;; Caller's context is saved; *x862-vstack* is valid.  Might
    75847589         ;; still have method-var to worry about.
     7590          (unless handled-lambda
    75857591          (when *backend-use-linear-scan*
    75867592            (! reserve-spill-area))
    7587           (! save-nfp)
     7593          (! save-nfp))
    75887594          (unless (= 0 pregs)
    75897595            ;; Save NVRs; load constants into any that get constants.
     
    95019507          (! %iasr-c target (if (> count max) max count)
    95029508             (x862-one-untargeted-reg-form seg form2 *x862-arg-z*))
     9509          (if *backend-use-linear-scan*
     9510            (multiple-value-bind (cnt src)
     9511                (x862-two-untargeted-reg-forms seg form1 (?) form2 (?))
     9512             
     9513              (! %iasr target cnt src))
    95039514          (multiple-value-bind (cnt src) (x862-two-targeted-reg-forms seg form1 ($ *x862-arg-y*) form2 ($ *x862-arg-z*))
    95049515            (if (= (ash 1 (hard-regspec-value target))
     
    95079518                (! %iasr src cnt src)
    95089519                (! copy-gpr target src))
    9509               (! %iasr target cnt src)))))
     9520              (! %iasr target cnt src))))))
    95109521      (^))))
    95119522
     
    95159526      (x862-form seg nil nil form1)
    95169527      (x862-form seg vreg xfer form2))
     9528    (linear-scan-bailout "assembler bug")
    95179529    (let* ((count (acode-fixnum-form-p form1)))
    95189530      (ensuring-node-target (target vreg)
Note: See TracChangeset for help on using the changeset viewer.