- (:note "inline ASH")
- (:translate ash)
- (:args (number :scs (,sc-type))
- (amount :scs (signed-reg unsigned-reg immediate)))
- (:arg-types ,type positive-fixnum)
- (:results (result :scs (,result-type)))
- (:result-types ,type)
- (:policy :fast-safe)
- (:generator ,cost
- ;; The result-type assures us that this shift will not
- ;; overflow. And for fixnums, the zero bits that get
- ;; shifted in are just fine for the fixnum tag.
- (sc-case amount
- ((signed-reg unsigned-reg)
- (inst sll result number amount))
- (immediate
- (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))
+ (:note "inline ASH")
+ (:translate ash)
+ (:args (number :scs (,sc-type))
+ (amount :scs (signed-reg unsigned-reg immediate)))
+ (:arg-types ,type positive-fixnum)
+ (:results (result :scs (,result-type)))
+ (:result-types ,type)
+ (:policy :fast-safe)
+ (:generator ,cost
+ ;; The result-type assures us that this shift will not
+ ;; overflow. And for fixnums, the zero bits that get
+ ;; shifted in are just fine for the fixnum tag.
+ (sc-case amount
+ ((signed-reg unsigned-reg)
+ (inst sll result number amount))
+ (immediate
+ (let ((amount (tn-value amount)))
+ (aver (>= amount 0))
+ (inst sll result number amount))))))))
+ (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))