Changeset 12043


Ignore:
Timestamp:
May 13, 2009, 6:32:21 AM (10 years ago)
Author:
gb
Message:

In X862-n-[UN]TARGETED-REG-FORMS, recognize that an apparently trivial
expression may need to use a temp register to target a non-node-GPR (and
the temp register may conflict with the target of some preceding expression.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/X86/x862.lisp

    r11974 r12043  
    32183218;;; would vpop the first argument out of line.)
    32193219(defun x862-two-targeted-reg-forms (seg aform areg bform breg)
    3220   (unless (typep areg 'lreg)
    3221     (warn "~s is not an lreg (1/2)" areg))
    3222   (unless (typep breg 'lreg)
    3223     (warn "~s is not an lreg (2/2)" breg))
    32243220  (let* ((avar (nx2-lexical-reference-p aform))
    3225          (atriv (x862-trivial-p bform))
     3221         (atriv (and (x862-trivial-p bform) (nx2-node-gpr-p breg)))
    32263222         (aconst (and (not atriv) (or (x86-side-effect-free-form-p aform)
    32273223                                      (if avar (nx2-var-not-set-by-form-p avar bform)))))
     
    32453241           (adest areg)
    32463242           (bdest breg)
    3247            (atriv (x862-trivial-p bform))
     3243           (atriv (and (x862-trivial-p bform) (nx2-node-gpr-p breg)))
    32483244           (aconst (and (not atriv) (or (x86-side-effect-free-form-p aform)
    32493245                                        (if avar (nx2-var-not-set-by-form-p avar bform)))))
     
    32633259
    32643260(defun x862-three-targeted-reg-forms (seg aform areg bform breg cform creg)
    3265   (unless (typep areg 'lreg)
    3266     (warn "~s is not an lreg (1/3)" areg))
    3267   (unless (typep breg 'lreg)
    3268     (warn "~s is not an lreg (2/3)" breg))
    3269   (unless (typep creg 'lreg)
    3270     (warn "~s is not an lreg (3/3)" creg))
    3271   (let* ((atriv (or (null aform)
     3261  (let* ((bnode (nx2-node-gpr-p breg))
     3262         (cnode (nx2-node-gpr-p creg))
     3263         (atriv (or (null aform)
    32723264                    (and (x862-trivial-p bform)
    3273                          (x862-trivial-p cform))))
     3265                         (x862-trivial-p cform)
     3266                         bnode
     3267                         cnode)))
    32743268         (btriv (or (null bform)
    3275                     (x862-trivial-p cform)))
     3269                    (and (x862-trivial-p cform)
     3270                         cnode)))
    32763271         (aconst (and (not atriv)
    32773272                      (or (x86-side-effect-free-form-p aform)
     
    33073302
    33083303(defun x862-four-targeted-reg-forms (seg aform areg bform breg cform creg dform dreg)
    3309   (unless (typep areg 'lreg)
    3310     (warn "~s is not an lreg (1/4)" areg))
    3311   (unless (typep breg 'lreg)
    3312     (warn "~s is not an lreg (2/4)" breg))
    3313   (unless (typep creg 'lreg)
    3314     (warn "~s is not an lreg (3/4)" creg))
    3315   (unless (typep dreg 'lreg)
    3316     (warn "~s is not an lreg (4/4)" dreg))
    3317   (let* ((atriv (or (null aform)
     3304  (let* ((bnode (nx2-node-gpr-p breg))
     3305         (cnode (nx2-node-gpr-p creg))
     3306         (dnode (nx2-node-gpr-p dreg))
     3307         (atriv (or (null aform)
    33183308                    (and (x862-trivial-p bform)
    33193309                         (x862-trivial-p cform)
    3320                          (x862-trivial-p dform))))
     3310                         (x862-trivial-p dform)
     3311                         bnode
     3312                         cnode
     3313                         dnode)))
    33213314         (btriv (or (null bform)
    33223315                    (and (x862-trivial-p cform)
    3323                          (x862-trivial-p dform))))
     3316                         (x862-trivial-p dform)
     3317                         cnode
     3318                         dnode)))
    33243319         (ctriv (or (null cform)
    3325                     (x862-trivial-p dform)))
     3320                    (and (x862-trivial-p dform)
     3321                         dnode)))
    33263322         (aconst (and (not atriv)
    33273323                      (or (x86-side-effect-free-form-p aform)
     
    33713367        (x862-one-targeted-reg-form seg aform areg)
    33723368        (x862-elide-pushes seg apushed (x862-pop-register seg areg))))
    3373     (values areg breg creg)))
     3369    (values areg breg creg dreg)))
    33743370
    33753371(defun x862-three-untargeted-reg-forms (seg aform areg bform breg cform creg)
    33763372  (with-x86-local-vinsn-macros (seg)
    3377     (let* ((atriv (or (null aform)
     3373    (let* ((bnode (nx2-node-gpr-p breg))
     3374           (cnode (nx2-node-gpr-p creg))
     3375           (atriv (or (null aform)
    33783376                      (and (x862-trivial-p bform)
    3379                            (x862-trivial-p cform))))
     3377                           (x862-trivial-p cform)
     3378                           bnode
     3379                           cnode)))
    33803380           (btriv (or (null bform)
    3381                       (x862-trivial-p cform)))
     3381                      (and (x862-trivial-p cform)
     3382                           cnode)))
    33823383           (aconst (and (not atriv)
    33833384                        (or (x86-side-effect-free-form-p aform)
     
    34163417
    34173418(defun x862-four-untargeted-reg-forms (seg aform areg bform breg cform creg dform dreg)
    3418   (let* ((atriv (or (null aform)
     3419  (let* ((bnode (nx2-node-gpr-p breg))
     3420         (cnode (nx2-node-gpr-p creg))
     3421         (dnode (nx2-node-gpr-p dreg))
     3422         (atriv (or (null aform)
    34193423                    (and (x862-trivial-p bform)
    34203424                         (x862-trivial-p cform)
    3421                          (x862-trivial-p dform))))
     3425                         (x862-trivial-p dform)
     3426                         bnode
     3427                         cnode
     3428                         dnode)))
    34223429         (btriv (or (null bform)
    34233430                    (and (x862-trivial-p cform)
    3424                          (x862-trivial-p dform))))
     3431                         (x862-trivial-p dform)
     3432                         cnode
     3433                         dnode)))
    34253434         (ctriv (or (null cform)
    34263435                    (x862-trivial-p dform)))
Note: See TracChangeset for help on using the changeset viewer.