- (:note "inline array store")
- (:translate data-vector-set)
- (:policy :fast-safe)
- (:args (object :scs (descriptor-reg))
- (index :scs (unsigned-reg) :target shift)
- (value :scs (unsigned-reg zero immediate) :target result))
- (:arg-types ,type positive-fixnum positive-fixnum)
- (:results (result :scs (unsigned-reg)))
- (:result-types positive-fixnum)
- (:temporary (:scs (non-descriptor-reg)) temp old offset)
- (:temporary (:scs (non-descriptor-reg) :from (:argument 1)) shift)
- (:generator 25
- (inst srl offset index ,bit-shift)
- (inst sll offset n-fixnum-tag-bits)
- (inst add offset (- (* vector-data-offset n-word-bytes)
- other-pointer-lowtag))
- (inst ld old object offset)
- (inst and shift index ,(1- elements-per-word))
- (inst xor shift ,(1- elements-per-word))
- ,@(unless (= bits 1)
- `((inst sll shift ,(1- (integer-length bits)))))
- (unless (and (sc-is value immediate)
- (= (tn-value value) ,(1- (ash 1 bits))))
- (inst li temp ,(1- (ash 1 bits)))
- (inst sll temp shift)
- (inst not temp)
- (inst and old temp))
- (unless (sc-is value zero)
- (sc-case value
- (immediate
- (inst li temp (logand (tn-value value) ,(1- (ash 1 bits)))))
- (unsigned-reg
- (inst and temp value ,(1- (ash 1 bits)))))
- (inst sll temp shift)
- (inst or old temp))
- (inst st old object offset)
- (sc-case value
- (immediate
- (inst li result (tn-value value)))
- (t
- (move result value)))))
+ (:note "inline array store")
+ (:translate data-vector-set)
+ (:policy :fast-safe)
+ (:args (object :scs (descriptor-reg))
+ (index :scs (unsigned-reg) :target shift)
+ (value :scs (unsigned-reg zero immediate) :target result))
+ (:arg-types ,type positive-fixnum positive-fixnum)
+ (:results (result :scs (unsigned-reg)))
+ (:result-types positive-fixnum)
+ (:temporary (:scs (non-descriptor-reg)) temp old offset)
+ (:temporary (:scs (non-descriptor-reg) :from (:argument 1)) shift)
+ (:generator 25
+ (inst srl offset index ,bit-shift)
+ (inst sll offset n-fixnum-tag-bits)
+ (inst add offset (- (* vector-data-offset n-word-bytes)
+ other-pointer-lowtag))
+ (inst ld old object offset)
+ (inst and shift index ,(1- elements-per-word))
+ (inst xor shift ,(1- elements-per-word))
+ ,@(unless (= bits 1)
+ `((inst sll shift ,(1- (integer-length bits)))))
+ (unless (and (sc-is value immediate)
+ (= (tn-value value) ,(1- (ash 1 bits))))
+ (inst li temp ,(1- (ash 1 bits)))
+ (inst sll temp shift)
+ (inst not temp)
+ (inst and old temp))
+ (unless (sc-is value zero)
+ (sc-case value
+ (immediate
+ (inst li temp (logand (tn-value value) ,(1- (ash 1 bits)))))
+ (unsigned-reg
+ (inst and temp value ,(1- (ash 1 bits)))))
+ (inst sll temp shift)
+ (inst or old temp))
+ (inst st old object offset)
+ (sc-case value
+ (immediate
+ (inst li result (tn-value value)))
+ (t
+ (move result value)))))