Changeset 12352


Ignore:
Timestamp:
Jul 2, 2009, 7:26:23 AM (10 years ago)
Author:
gb
Message:

In PPC2-%FIXNUM-TO-SINGLE, actually do DOUBLE-TO-SINGLE at runtime;
don't just change compile-time notion of reg's mode.

In PPC2-%SINGLE-FLOAT/PPC2-%DOUBLE-FLOAT: if we have a real constant,
wrap IGNORE-ERRORS around attempts to constant-fold it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/PPC/ppc2.lisp

    r12297 r12352  
    91019101        (! trap-unless-fixnum r))
    91029102      (! fixnum->fpr dreg r)
    9103       (<- (set-regspec-mode dreg hard-reg-class-fpr-mode-single))
     9103      (! double-to-single vreg dreg)
    91049104      (^))))
    91059105
     
    91119111                                  (%nx1-operator immediate))
    91129112                              (typep (cadr form) 'real))
    9113                        (cadr form))))))
    9114     (if real
    9115       (ppc2-immediate seg vreg xfer (float real 0.0d0))
     9113                       (cadr form)))))
     9114         (dconst (and real (ignore-errors (float real 0.0d0)))))
     9115    (if dconst
     9116      (ppc2-immediate seg vreg xfer dconst)
    91169117      (if (ppc2-form-typep arg 'single-float)
    91179118        (ppc2-use-operator (%nx1-operator %single-to-double)
     
    91419142                                  (%nx1-operator immediate))
    91429143                              (typep (cadr form) 'real))
    9143                        (cadr form))))))
    9144     (if real
    9145       (ppc2-immediate seg vreg xfer (float real 0.0f0))
     9144                       (cadr form)))))
     9145         (sconst (and real (ignore-errors (float real 0.0f0)))))
     9146    (if sconst
     9147      (ppc2-immediate seg vreg xfer sconst)
    91469148      (if (ppc2-form-typep arg 'double-float)
    91479149        (ppc2-use-operator (%nx1-operator %double-to-single)
Note: See TracChangeset for help on using the changeset viewer.