- (cond ((plusp amount) (inst shl result amount))
- ((< amount -31) (inst xor result result))
- (t (inst shr result (- amount))))))))
+ (cond ((< -32 amount 32)
+ ;; this code is used both in ASH and ASH-MOD32, so
+ ;; be careful
+ (if (plusp amount)
+ (inst shl result amount)
+ (inst shr result (- amount))))
+ (t (if (sc-is result unsigned-reg)
+ (inst xor result result)
+ (inst mov result 0))))))))