;; Some special cases where we know we want a left shift. Just do the
;; shift, instead of checking for the sign of the shift.
(macrolet
- ((frob (name sc-type type result-type cost)
+ ((def (name sc-type type result-type cost)
`(define-vop (,name)
(:note "inline ASH")
(:translate ash)
(let ((amount (tn-value amount)))
(aver (>= amount 0))
(inst sll result number amount))))))))
- (frob fast-ash-left/signed=>signed signed-reg signed-num signed-reg 3)
- (frob fast-ash-left/fixnum=>fixnum any-reg tagged-num any-reg 2)
- (frob fast-ash-left/unsigned=>unsigned unsigned-reg unsigned-num unsigned-reg 3))
+ (def fast-ash-left/signed=>signed signed-reg signed-num signed-reg 3)
+ (def fast-ash-left/fixnum=>fixnum any-reg tagged-num any-reg 2)
+ (def fast-ash-left/unsigned=>unsigned unsigned-reg unsigned-num unsigned-reg 3))
\f
(define-vop (signed-byte-32-len)
(define-vop (fast-ash-left-mod32-c/unsigned=>unsigned
fast-ash-c/unsigned=>unsigned)
(:translate ash-left-mod32))
+
+(define-vop (fast-ash-left-mod32/unsigned=>unsigned
+ fast-ash-left/unsigned=>unsigned))
+(deftransform ash-left-mod32 ((integer count)
+ ((unsigned-byte 32) (unsigned-byte 5)))
+ (when (sb!c::constant-lvar-p count)
+ (sb!c::give-up-ir1-transform))
+ '(%primitive fast-ash-left-mod32/unsigned=>unsigned integer count))
\f
;;;; Binary conditional VOPs:
(emit-label done)
(move result res))))
-(define-source-transform word-logical-not (x)
- `(logand (lognot (the (unsigned-byte 32) ,x)) #.(1- (ash 1 32))))
-
-(deftransform word-logical-and ((x y))
- '(logand x y))
-
-(deftransform word-logical-nand ((x y))
- '(logand (lognand x y) #.(1- (ash 1 32))))
-
-(deftransform word-logical-or ((x y))
- '(logior x y))
-
-(deftransform word-logical-nor ((x y))
- '(logand (lognor x y) #.(1- (ash 1 32))))
-
-(deftransform word-logical-xor ((x y))
- '(logxor x y))
-
-(deftransform word-logical-eqv ((x y))
- '(logand (logeqv x y) #.(1- (ash 1 32))))
-
-(deftransform word-logical-orc1 ((x y))
- '(logand (logorc1 x y) #.(1- (ash 1 32))))
-
-(deftransform word-logical-orc2 ((x y))
- '(logand (logorc2 x y) #.(1- (ash 1 32))))
-
-(deftransform word-logical-andc1 ((x y))
- '(logand (logandc1 x y) #.(1- (ash 1 32))))
-
-(deftransform word-logical-andc2 ((x y))
- '(logand (logandc2 x y) #.(1- (ash 1 32))))
-
(define-vop (shift-towards-someplace)
(:policy :fast-safe)
(:args (num :scs (unsigned-reg))