(:result-types ,el-type)
(:temporary (:sc non-descriptor-reg) temp)
(:temporary (:sc non-descriptor-reg) temp1)
- (:generator 5
+ (:generator 4
,@(ecase size
(:byte
(if signed
(:temporary (:sc non-descriptor-reg) temp2)
(:results (result :scs ,scs))
(:result-types ,el-type)
- (:generator 5
+ (:generator 4
,@(ecase size
(:byte
- `((inst lda temp (- (* ,offset n-word-bytes)
- (* index ,scale) ,lowtag)
+ `((inst lda temp (- (+ (* ,offset n-word-bytes)
+ (* index ,scale))
+ ,lowtag)
object)
- (inst ldq_u temp1 (- (* ,offset n-word-bytes)
- (* index ,scale) ,lowtag)
+ (inst ldq_u temp1 (- (+ (* ,offset n-word-bytes)
+ (* index ,scale))
+ ,lowtag)
object)
(inst insbl value temp temp2)
(inst mskbl temp1 temp temp1)
(inst bis temp1 temp2 temp1)
- (inst stq_u temp1 (- (* ,offset n-word-bytes)
- (* index ,scale) ,lowtag) object)))
+ (inst stq_u temp1 (- (+ (* ,offset n-word-bytes)
+ (* index ,scale))
+ ,lowtag) object)))
(:short
- `((inst lda temp (- (* ,offset n-word-bytes)
- (* index ,scale) ,lowtag)
+ `((inst lda temp (- (+ (* ,offset n-word-bytes)
+ (* index ,scale))
+ ,lowtag)
object)
- (inst ldq_u temp1 (- (* ,offset n-word-bytes)
- (* index ,scale) ,lowtag)
+ (inst ldq_u temp1 (- (+ (* ,offset n-word-bytes)
+ (* index ,scale))
+ ,lowtag)
object)
(inst mskwl temp1 temp temp1)
(inst inswl value temp temp2)
(inst bis temp1 temp2 temp)
- (inst stq_u temp (- (* ,offset n-word-bytes)
- (* index ,scale) ,lowtag) object))))
+ (inst stq_u temp (- (+ (* ,offset n-word-bytes)
+ (* index ,scale))
+ ,lowtag) object))))
(move value result))))))
(defmacro sb!sys::with-pinned-objects ((&rest objects) &body body)
;;; Bug reported by Kalle Olavi Niemitalo for CMUCL through Debian BTS
(let ((array (make-array nil :initial-contents nil)))
(assert (eql (aref array) nil)))
+
+(let ((f (compile nil '(lambda ()
+ (let ((a (make-array '(4)
+ :element-type 'base-char
+ :initial-element #\z)))
+ (setf (aref a 0) #\a)
+ (setf (aref a 1) #\b)
+ (setf (aref a 2) #\c)
+ a)))))
+ (assert (= (length (funcall f)) 4)))