- (etypecase index
- (tn
- (make-ea :qword :base object :index instance-length
- :disp (+ (* (1- instance-slots-offset) n-word-bytes)
- (- instance-pointer-lowtag)
- adjustment)))
- (integer
- (make-ea :qword :base object :index instance-length
- :scale 8
- :disp (+ (* (1- instance-slots-offset) n-word-bytes)
- (- instance-pointer-lowtag)
- adjustment
- (- (fixnumize index)))))))
+ (if (integerp instance-length)
+ ;; For RAW-INSTANCE-INIT/* VOPs, which know the exact instance length
+ ;; at compile time.
+ (make-ea :qword
+ :base object
+ :disp (+ (* (- instance-length instance-slots-offset index)
+ n-word-bytes)
+ (- instance-pointer-lowtag)
+ adjustment))
+ (etypecase index
+ (tn
+ (make-ea :qword :base object :index instance-length
+ :disp (+ (* (1- instance-slots-offset) n-word-bytes)
+ (- instance-pointer-lowtag)
+ adjustment)))
+ (integer
+ (make-ea :qword :base object :index instance-length
+ :scale 8
+ :disp (+ (* (1- instance-slots-offset) n-word-bytes)
+ (- instance-pointer-lowtag)
+ adjustment
+ (* index (- n-word-bytes))))))))