Changeset 14846


Ignore:
Timestamp:
Jun 23, 2011, 6:54:47 AM (8 years ago)
Author:
gb
Message:

Missed some (fairly visible) cases where ARM FPR targeting had to
be sensitive to aliasing.

Location:
trunk/source/compiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/backend.lisp

    r14834 r14846  
    247247    (ash 1 fpreg))))
    248248
     249(defun fpr-mask-for-vreg (vreg)
     250  (let* ((value (hard-regspec-value vreg)))
     251    (target-arch-case
     252     (:arm
     253      (if (eql (get-regspec-mode vreg) hard-reg-class-fpr-mode-single)
     254        (ash 1 value)
     255        (ash 3 (ash value 1))))
     256     (t (ash value 1)))))
    249257
    250258(defun use-fp-reg (fpr)
    251   (let* ((mode-name (if (eql (get-regspec-mode fpr) hard-reg-class-fpr-mode-single)
    252                       :single-float
    253                       :double-float))
    254          (regval (hard-regspec-value fpr)))
    255     (setq *available-backend-fp-temps* (logand *available-backend-fp-temps* (lognot (target-fpr-mask regval mode-name))))))
    256 
    257 (defun use-fp-temp (n)
    258     (setq *available-backend-fp-temps* (logand *available-backend-fp-temps* (lognot (ash 1 n))))
    259     n)
     259    (setq *available-backend-fp-temps* (logand *available-backend-fp-temps* (lognot (fpr-mask-for-vreg fpr)))))
     260
     261
    260262
    261263(defun available-fp-temp (mask &optional (mode-name :double-float))
     
    480482                                ,@(mapcar
    481483                                   #'(lambda (r)
    482                                        `(ash 1 (hard-regspec-value ,r)))
     484                                       `(fpr-mask-for-vreg ,r))
    483485                                   reserved))))
    484486               ',mode-name))))
  • trunk/source/compiler/vinsn.lisp

    r14834 r14846  
    479479          (logbitp value (vinsn-gprs-set element))
    480480          (if (eq class hard-reg-class-fpr)
    481             (let* ((mode-name (if (eql (get-regspec-mode reg) hard-reg-class-fpr-mode-single)
    482                                 :single-float
    483                                 :double-float))
    484                    (mask (target-fpr-mask value mode-name)))
    485               (eql mask (logand mask (vinsn-fprs-set element))))))))))
     481            ;; The FPR is logically set in the vinsn if it or any
     482            ;; conflicting FPR is physically set in the vinsn.
     483            (logtest (fpr-mask-for-vreg reg) (vinsn-fprs-set element))))))))
    486484
    487485;;; Return bitmasks of all GPRs and all FPRs set in the vinsns between
Note: See TracChangeset for help on using the changeset viewer.