Changeset 12042


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

In PPC2-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/PPC/ppc2.lisp

    r11711 r12042  
    27962796;;; would vpop the first argument out of line.)
    27972797(defun ppc2-two-targeted-reg-forms (seg aform areg bform breg)
    2798   (unless (typep areg 'lreg)
    2799     (warn "~s is not an lreg (1/2)" areg))
    2800   (unless (typep breg 'lreg)
    2801     (warn "~s is not an lreg (2/2)" breg))
    28022798  (let* ((avar (ppc2-lexical-reference-p aform))
    2803          (atriv (ppc2-trivial-p bform))
     2799         (atriv (and (ppc2-trivial-p bform) (nx2-node-gpr-p breg)))
    28042800         (aconst (and (not atriv) (or (ppc-side-effect-free-form-p aform)
    28052801                                      (if avar (ppc2-var-not-set-by-form-p avar bform)))))
     
    28232819           (adest areg)
    28242820           (bdest breg)
    2825            (atriv (ppc2-trivial-p bform))
     2821           (atriv (and (ppc2-trivial-p bform) (nx2-node-gpr-p breg)))
    28262822           (aconst (and (not atriv) (or (ppc-side-effect-free-form-p aform)
    28272823                                        (if avar (ppc2-var-not-set-by-form-p avar bform)))))
     
    28412837
    28422838(defun ppc2-four-targeted-reg-forms (seg aform areg bform breg cform creg dform dreg)
    2843   (unless (typep areg 'lreg)
    2844     (warn "~s is not an lreg (1/4)" areg))
    2845   (unless (typep breg 'lreg)
    2846     (warn "~s is not an lreg (2/4)" breg))
    2847   (unless (typep creg 'lreg)
    2848     (warn "~s is not an lreg (3/4)" creg))
    2849   (unless (typep dreg 'lreg)
    2850     (warn "~s is not an lreg (4/4)" dreg)) 
    2851   (let* ((atriv (or (null aform)
     2839  (let* ((bnode (nx2-node-gpr-p breg))
     2840         (cnode (nx2-node-gpr-p creg))
     2841         (dnode (nx2-node-gpr-p dreg))
     2842         (atriv (or (null aform)
    28522843                    (and (ppc2-trivial-p bform)
    28532844                         (ppc2-trivial-p cform)
    2854                          (ppc2-trivial-p dform))))
     2845                         (ppc2-trivial-p dform)
     2846                         bnode
     2847                         cnode
     2848                         dnode)))
    28552849         (btriv (or (null bform)
    28562850                    (and (ppc2-trivial-p cform)
    2857                          (ppc2-trivial-p dform))))
     2851                         (ppc2-trivial-p dform)
     2852                         cnode
     2853                         dnode)))
    28582854         (ctriv (or (null cform)
    2859                     (ppc2-trivial-p dform)))
     2855                    (and (ppc2-trivial-p dform) dnode)))
    28602856         
    28612857         (aconst (and (not atriv)
     
    29082904
    29092905(defun ppc2-three-targeted-reg-forms (seg aform areg bform breg cform creg)
    2910   (unless (typep areg 'lreg)
    2911     (warn "~s is not an lreg (1/3)" areg))
    2912   (unless (typep breg 'lreg)
    2913     (warn "~s is not an lreg (2/3)" breg))
    2914   (unless (typep creg 'lreg)
    2915     (warn "~s is not an lreg (3/3)" creg))
    2916   (let* ((atriv (or (null aform)
     2906  (let* ((bnode (nx2-node-gpr-p breg))
     2907         (cnode (nx2-node-gpr-p creg))
     2908         (atriv (or (null aform)
    29172909                    (and (ppc2-trivial-p bform)
    2918                          (ppc2-trivial-p cform))))
     2910                         (ppc2-trivial-p cform)
     2911                         bnode
     2912                         cnode)))
    29192913         (btriv (or (null bform)
    2920                     (ppc2-trivial-p cform)))
     2914                    (and (ppc2-trivial-p cform)
     2915                         cnode)))
    29212916         (aconst (and (not atriv)
    29222917                      (or (ppc-side-effect-free-form-p aform)
     
    29532948(defun ppc2-three-untargeted-reg-forms (seg aform areg bform breg cform creg)
    29542949  (with-ppc-local-vinsn-macros (seg)
    2955     (let* ((atriv (or (null aform)
     2950    (let* ((bnode (nx2-node-gpr-p breg))
     2951           (cnode (nx2-node-gpr-p creg))
     2952           (atriv (or (null aform)
    29562953                      (and (ppc2-trivial-p bform)
    2957                            (ppc2-trivial-p cform))))
     2954                           (ppc2-trivial-p cform)
     2955                           bnode
     2956                           cnode)))
    29582957           (btriv (or (null bform)
    2959                       (ppc2-trivial-p cform)))
     2958                      (and (ppc2-trivial-p cform)
     2959                           cnode)))
    29602960           (aconst (and (not atriv)
    29612961                        (or (ppc-side-effect-free-form-p aform)
     
    29942994
    29952995(defun ppc2-four-untargeted-reg-forms (seg aform areg bform breg cform creg dform dreg)
    2996   (let* ((atriv (or (null aform)
     2996  (let* ((bnode (nx2-node-gpr-p breg))
     2997         (cnode (nx2-node-gpr-p creg))
     2998         (dnode (nx2-node-gpr-p dreg))
     2999         (atriv (or (null aform)
    29973000                    (and (ppc2-trivial-p bform)
    29983001                         (ppc2-trivial-p cform)
    2999                          (ppc2-trivial-p dform))))
     3002                         (ppc2-trivial-p dform)
     3003                         bnode
     3004                         cnode
     3005                         dnode)))
    30003006         (btriv (or (null bform)
    30013007                    (and (ppc2-trivial-p cform)
    3002                          (ppc2-trivial-p dform))))
     3008                         (ppc2-trivial-p dform)
     3009                         cnode
     3010                         dnode)))
    30033011         (ctriv (or (null cform)
    3004                     (ppc2-trivial-p dform)))
     3012                    (and (ppc2-trivial-p dform) dnode)))
    30053013         (aconst (and (not atriv)
    30063014                      (or (ppc-side-effect-free-form-p aform)
Note: See TracChangeset for help on using the changeset viewer.