Changeset 16157


Ignore:
Timestamp:
Aug 18, 2014, 6:11:11 PM (5 years ago)
Author:
gb
Message:

fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pinsn/source/compiler/nx0.lisp

    r16147 r16157  
    566566                      (low (numeric-ctype-low first))
    567567                      (high (numeric-ctype-high first)))
    568                  (dolist (type (cdr (union-ctype-types ctype)) (specifier-type `(integer ,low ,high)))
     568                 (dolist (type (cdr (union-ctype-types ctype)) (specifier-type `(integer ,low ,high)))
    569569                   (unless (bounded-integer-numeric-type-p type)
    570570                     (return))
     
    619619         (t2 (if t1 (bounded-integer-type-p type2))))
    620620    (when t2
    621       (specifier-type `(integer
    622                         ,(* (numeric-ctype-low t1) (numeric-ctype-low t2))
    623                         ,(* (numeric-ctype-high t1) (numeric-ctype-high t2)))))))
     621      (and (csubtypep t1 (specifier-type '(signed-byte 64)))
     622           (csubtypep t2 (specifier-type '(signed-byte 64)))
     623           (let* ((t1low (numeric-ctype-low t1))
     624                  (t1high (numeric-ctype-high t1))
     625                  (t2low (numeric-ctype-low t2))
     626                  (t2high (numeric-ctype-high t2))
     627                  (p0 (* t1low t2low))
     628                  (p1 (* t1low t2high))
     629                  (p2 (* t1high t2low))
     630                  (p3 (* t1high t2high))
     631                  (min (min p0 p1 p2 p3))
     632                  (max (max p0 p1 p2 p3)))
     633             (specifier-type `(integer
     634                               ,min
     635                               ,max)))))))
    624636
    625637(defun bounded-integer-type-for-ash (type1 type2)
Note: See TracChangeset for help on using the changeset viewer.