-(define-vop (data-vector-ref-with-offset/simple-array-single-float)
- (:note "inline array access")
- (:translate data-vector-ref-with-offset)
- (:policy :fast-safe)
- (:args (object :scs (descriptor-reg))
- (index :scs (any-reg)))
- (:info offset)
- (:arg-types simple-array-single-float positive-fixnum
- (:constant (constant-displacement other-pointer-lowtag
- 4 vector-data-offset)))
- (:temporary (:sc unsigned-reg) dword-index)
- (:results (value :scs (single-reg)))
- (:result-types single-float)
- (:generator 5
- (move dword-index index)
- (inst shr dword-index 1)
- (inst movss value (make-ea-for-float-ref object dword-index offset 4))))
+#.
+(let ((use-temp (<= word-shift n-fixnum-tag-bits)))
+ `(define-vop (data-vector-ref-with-offset/simple-array-single-float)
+ (:note "inline array access")
+ (:translate data-vector-ref-with-offset)
+ (:policy :fast-safe)
+ (:args (object :scs (descriptor-reg))
+ (index :scs (any-reg)))
+ (:info offset)
+ (:arg-types simple-array-single-float positive-fixnum
+ (:constant (constant-displacement other-pointer-lowtag
+ 4 vector-data-offset)))
+ ,@(when use-temp '((:temporary (:sc unsigned-reg) dword-index)))
+ (:results (value :scs (single-reg)))
+ (:result-types single-float)
+ (:generator 5
+ ,@(if use-temp
+ '((move dword-index index)
+ (inst shr dword-index (1+ (- n-fixnum-tag-bits word-shift)))
+ (inst movss value (make-ea-for-float-ref object dword-index offset 4)))
+ '((inst movss value (make-ea-for-float-ref object index offset 4
+ :scale (ash 4 (- n-fixnum-tag-bits)))))))))