Changeset 14738


Ignore:
Timestamp:
Apr 27, 2011, 10:51:17 PM (9 years ago)
Author:
gb
Message:

ACODE-OPTIMIZE-NUMCMP.

File:
1 edited

Legend:

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

    r14727 r14738  
    713713                                        (caddr unwrapped))
    714714                  t))))))))
    715                  
     715
     716(defun acode-optimize-numcmp (seg vreg xfer cc num1 num2 trust-decls &optional (result-type 'boolean))
     717  (declare (ignorable result-type))
     718  (cond ((and (acode-form-typep num1 *nx-target-fixnum-type* trust-decls)
     719              (acode-form-typep num2 *nx-target-fixnum-type* trust-decls))
     720         (backend-use-operator (%nx1-operator %i<>) seg vreg xfer cc num1 num2)
     721         t)
     722        ((and (acode-form-typep num1 *nx-target-natural-type* trust-decls)
     723              (acode-form-typep num2 *nx-target-natural-type* trust-decls))
     724         (backend-use-operator (%nx1-operator %natural<>) seg vreg xfer cc num1 num2)
     725         t)
     726        ((and (acode-form-typep num1 'double-float trust-decls)
     727              (acode-form-typep num2 'double-float trust-decls))
     728         (backend-use-operator (%nx1-operator double-float-compare) seg vreg xfer cc num1 num2)
     729         t)
     730        ((and (acode-form-typep num1 'single-float trust-decls)
     731              (acode-form-typep num2 'single-float trust-decls))
     732         (backend-use-operator (%nx1-operator short-float-compare) seg vreg xfer cc num1 num2)
     733         t)))
    716734               
Note: See TracChangeset for help on using the changeset viewer.