Changeset 13795


Ignore:
Timestamp:
Jun 10, 2010, 4:08:19 AM (9 years ago)
Author:
gb
Message:

Map frontend condition to arm condition, true-p, not to arm-condition, t.
(Complementing/negating conditions depends on this, as written.)
Compare single-floats as single-floats.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/arm/compiler/ARM/arm2.lisp

    r13789 r13795  
    304304  (case cond
    305305    (:EQ (values arm::arm-cond-eq t))
    306     (:NE (values arm::arm-cond-ne t))
     306    (:NE (values arm::arm-cond-eq nil))
    307307    (:GT (values arm::arm-cond-gt t))
    308     (:LE (values arm::arm-cond-le t))
     308    (:LE (values arm::arm-cond-gt nil))
    309309    (:LT (values arm::arm-cond-lt t))
    310     (:GE (values arm::arm-cond-ge t))))
     310    (:GE (values arm::arm-cond-lt nil))))
    311311
    312312
     
    31283128      (^))))
    31293129
    3130 ;;; Have to extract a bit out of the CR when a boolean result needed.
    31313130(defun arm2-compare-double-float-registers (seg vreg xfer ireg jreg cr-bit true-p)
    31323131  (with-arm-local-vinsn-macros (seg vreg xfer)
     
    31443143         (^)))
    31453144      (^))))
     3145
     3146(defun arm2-compare-single-float-registers (seg vreg xfer ireg jreg cr-bit true-p)
     3147  (with-arm-local-vinsn-macros (seg vreg xfer)
     3148    (if vreg
     3149      (regspec-crf-gpr-case
     3150       (vreg dest)
     3151       (progn
     3152         (! single-float-compare dest ireg jreg)
     3153         (^ cr-bit true-p))
     3154       (progn
     3155         (with-crf-target () flags
     3156           (! single-float-compare flags ireg jreg)
     3157
     3158           (! cond->boolean dest (if true-p cr-bit (logxor cr-bit 1))))
     3159         (^)))
     3160      (^))))
     3161
     3162
    31463163
    31473164
     
    65316548      (with-fp-target (r1) (r2 :single-float)
    65326549        (multiple-value-bind (r1 r2) (arm2-two-untargeted-reg-forms seg form1 r1 form2 r2)
    6533           (arm2-compare-double-float-registers seg vreg xfer r1 r2 cr-bit true-p))))))
     6550          (arm2-compare-single-float-registers seg vreg xfer r1 r2 cr-bit true-p))))))
    65346551 
    65356552(eval-when (:compile-toplevel :execute)
Note: See TracChangeset for help on using the changeset viewer.