0.pre8.7
[sbcl.git] / src / compiler / alpha / arith.lisp
index d4b6df7..1da0e8c 100644 (file)
   (:temporary (:scs (non-descriptor-reg)) temp)
   (:policy :fast-safe))
 
-(deftype integer-with-a-bite-out (s bite)
-  (cond ((eq s '*) 'integer)
-       ((and (integerp s) (> s 1))
-        (let ((bound (ash 1 s)))
-          `(integer 0 ,(- bound bite 1))))
-       (t
-        (error "Bad size specified for SIGNED-BYTE type specifier: ~S." s))))
-
 (define-vop (fast-conditional/fixnum fast-conditional)
   (:args (x :scs (any-reg))
         (y :scs (any-reg)))
 
 (define-vop (fast-conditional-c/fixnum fast-conditional/fixnum)
   (:args (x :scs (any-reg)))
-  (:arg-types tagged-num (:constant (integer-with-a-bite-out 6 4)))
+  (:arg-types tagged-num (:constant (unsigned-byte-with-a-bite-out 6 4)))
   (:info target not-p y))
 
 (define-vop (fast-conditional/signed fast-conditional)
 
 (define-vop (fast-conditional-c/signed fast-conditional/signed)
   (:args (x :scs (signed-reg)))
-  (:arg-types signed-num (:constant (integer-with-a-bite-out 8 1)))
+  (:arg-types signed-num (:constant (unsigned-byte-with-a-bite-out 8 1)))
   (:info target not-p y))
 
 (define-vop (fast-conditional/unsigned fast-conditional)
 
 (define-vop (fast-conditional-c/unsigned fast-conditional/unsigned)
   (:args (x :scs (unsigned-reg)))
-  (:arg-types unsigned-num (:constant (integer-with-a-bite-out 8 1)))
+  (:arg-types unsigned-num (:constant (unsigned-byte-with-a-bite-out 8 1)))
   (:info target not-p y))
 
 
 (defmacro define-conditional-vop (translate &rest generator)
   `(progn
-     ,@(mapcar #'(lambda (suffix cost signed)
-                  (unless (and (member suffix '(/fixnum -c/fixnum))
-                               (eq translate 'eql))
-                    `(define-vop (,(intern (format nil "~:@(FAST-IF-~A~A~)"
-                                                   translate suffix))
-                                  ,(intern
-                                    (format nil "~:@(FAST-CONDITIONAL~A~)"
-                                            suffix)))
-                       (:translate ,translate)
-                       (:generator ,cost
-                         (let* ((signed ,signed)
-                                (-c/fixnum ,(eq suffix '-c/fixnum))
-                                (y (if -c/fixnum (fixnumize y) y)))
-                           ,@generator)))))
+     ,@(mapcar (lambda (suffix cost signed)
+                (unless (and (member suffix '(/fixnum -c/fixnum))
+                             (eq translate 'eql))
+                  `(define-vop (,(intern (format nil "~:@(FAST-IF-~A~A~)"
+                                                 translate suffix))
+                                ,(intern
+                                  (format nil "~:@(FAST-CONDITIONAL~A~)"
+                                          suffix)))
+                     (:translate ,translate)
+                     (:generator ,cost
+                                 (let* ((signed ,signed)
+                                        (-c/fixnum ,(eq suffix '-c/fixnum))
+                                        (y (if -c/fixnum (fixnumize y) y)))
+                                   ,@generator)))))
               '(/fixnum -c/fixnum /signed -c/signed /unsigned -c/unsigned)
               '(3 2 5 4 5 4)
               '(t t t t nil nil))))
   (unsigned-reg) unsigned-num sb!bignum::%bignum-ref)
 
 (define-full-setter bignum-set * bignum-digits-offset other-pointer-lowtag
-  (unsigned-reg) unsigned-num sb!bignum::%bignum-set #+gengc nil)
+  (unsigned-reg) unsigned-num sb!bignum::%bignum-set #!+gengc nil)
 
 (define-vop (digit-0-or-plus)
   (:translate sb!bignum::%digit-0-or-plusp)