Changeset 6542


Ignore:
Timestamp:
May 12, 2007, 8:25:09 PM (15 years ago)
Author:
gb
Message:

Use *ppc2-target-half-fixnum-type* to suppress overflow checking in some
cases.

File:
1 edited

Legend:

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

    r6461 r6542  
    3131(defparameter *ppc2-target-node-shift* 0)
    3232(defparameter *ppc2-target-bits-in-word* 0)
     33(defparameter *ppc2-ppc32-half-fixnum-type* '(signed-byte 29))
     34(defparameter *ppc2-ppc64-half-fixnum-type* `(signed-byte 60))
     35(defparameter *ppc2-target-half-fixnum-type* nil)
    3336
    3437
     
    388391           (*ppc2-target-bits-in-word* (arch::target-nbits-in-word (backend-target-arch *target-backend*)))
    389392           (*ppc2-target-node-size* *ppc2-target-lcell-size*)
     393           (*ppc2-target-half-fixnum-type* (target-word-size-case
     394                                            (32 *ppc2-ppc32-half-fixnum-type*)
     395                                            (64 *ppc2-ppc64-half-fixnum-type*)))
    390396           (*ppc2-all-lcells* ())
    391397           (*ppc2-top-vstack-lcell* nil)
     
    66066612
    66076613(defppc2 ppc2-%i+ %i+ (seg vreg xfer form1 form2 &optional overflow)
     6614  (when overflow
     6615    (let* ((type *ppc2-target-half-fixnum-type*))
     6616      (when (and (ppc2-form-typep form1 type)
     6617                 (ppc2-form-typep form2 type))
     6618        (setq overflow nil))))
    66086619  (cond ((null vreg)
    66096620         (ppc2-form seg nil nil form1)
     
    66556666
    66566667(defppc2 ppc2-%i- %i- (seg vreg xfer num1 num2 &optional overflow)
     6668  (when overflow
     6669    (let* ((type *ppc2-target-half-fixnum-type*))
     6670      (when (and (ppc2-form-typep form1 type)
     6671                 (ppc2-form-typep form2 type))
     6672        (setq overflow nil))))
    66576673  (let* ((v1 (acode-fixnum-form-p num1))
    66586674         (v2 (acode-fixnum-form-p num2)))
Note: See TracChangeset for help on using the changeset viewer.