projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.4.85: small PCL cleanups and thread-safety notes
[sbcl.git]
/
src
/
compiler
/
x86
/
array.lisp
diff --git
a/src/compiler/x86/array.lisp
b/src/compiler/x86/array.lisp
index
3926463
..
f617419
100644
(file)
--- a/
src/compiler/x86/array.lisp
+++ b/
src/compiler/x86/array.lisp
@@
-171,10
+171,7
@@
(:generator 20
(move ecx index)
(inst shr ecx ,bit-shift)
(:generator 20
(move ecx index)
(inst shr ecx ,bit-shift)
- (inst mov result
- (make-ea :dword :base object :index ecx :scale 4
- :disp (- (* vector-data-offset n-word-bytes)
- other-pointer-lowtag)))
+ (inst mov result (make-ea-for-vector-data object :index ecx))
(move ecx index)
;; We used to mask ECX for all values of ELEMENT-PER-WORD,
;; but since Intel's documentation says that the chip will
(move ecx index)
;; We used to mask ECX for all values of ELEMENT-PER-WORD,
;; but since Intel's documentation says that the chip will
@@
-218,10
+215,7
@@
(:generator 25
(move word-index index)
(inst shr word-index ,bit-shift)
(:generator 25
(move word-index index)
(inst shr word-index ,bit-shift)
- (inst mov old
- (make-ea :dword :base object :index word-index :scale 4
- :disp (- (* vector-data-offset n-word-bytes)
- other-pointer-lowtag)))
+ (inst mov old (make-ea-for-vector-data object :index word-index))
(move ecx index)
;; We used to mask ECX for all values of ELEMENT-PER-WORD,
;; but since Intel's documentation says that the chip will
(move ecx index)
;; We used to mask ECX for all values of ELEMENT-PER-WORD,
;; but since Intel's documentation says that the chip will
@@
-242,9
+236,7
@@
(unsigned-reg
(inst or old value)))
(inst rol old :cl)
(unsigned-reg
(inst or old value)))
(inst rol old :cl)
- (inst mov (make-ea :dword :base object :index word-index :scale 4
- :disp (- (* vector-data-offset n-word-bytes)
- other-pointer-lowtag))
+ (inst mov (make-ea-for-vector-data object :index word-index)
old)
(sc-case value
(immediate
old)
(sc-case value
(immediate
@@
-263,11
+255,7
@@
(:temporary (:sc unsigned-reg :to (:result 0)) old)
(:generator 20
(multiple-value-bind (word extra) (floor index ,elements-per-word)
(:temporary (:sc unsigned-reg :to (:result 0)) old)
(:generator 20
(multiple-value-bind (word extra) (floor index ,elements-per-word)
- (inst mov old
- (make-ea :dword :base object
- :disp (- (* (+ word vector-data-offset)
- n-word-bytes)
- other-pointer-lowtag)))
+ (loadw old object (+ word vector-data-offset) other-pointer-lowtag)
(sc-case value
(immediate
(let* ((value (tn-value value))
(sc-case value
(immediate
(let* ((value (tn-value value))
@@
-286,11
+274,7
@@
(inst or old value)
(unless (zerop shift)
(inst rol old shift)))))
(inst or old value)
(unless (zerop shift)
(inst rol old shift)))))
- (inst mov (make-ea :dword :base object
- :disp (- (* (+ word vector-data-offset)
- n-word-bytes)
- other-pointer-lowtag))
- old)
+ (storew old object (+ word vector-data-offset) other-pointer-lowtag)
(sc-case value
(immediate
(inst mov result (tn-value value)))
(sc-case value
(immediate
(inst mov result (tn-value value)))
@@
-574,18
+558,13
@@
(:generator 5
(sc-case index
(immediate
(:generator 5
(sc-case index
(immediate
- (inst ,ref-inst value
- (make-ea :byte :base object
- :disp (- (+ (* vector-data-offset n-word-bytes)
- (tn-value index)
- offset)
- other-pointer-lowtag))))
+ (inst ,ref-inst value (make-ea-for-vector-data
+ object :size :byte
+ :offset (+ (tn-value index) offset))))
(t
(inst ,ref-inst value
(t
(inst ,ref-inst value
- (make-ea :byte :base object :index index :scale 1
- :disp (- (+ (* vector-data-offset n-word-bytes)
- offset)
- other-pointer-lowtag)))))))
+ (make-ea-for-vector-data object :size :byte
+ :index index :offset offset))))))
(define-vop (,(symbolicate "DATA-VECTOR-SET-WITH-OFFSET/" ptype))
(:translate data-vector-set-with-offset)
(:policy :fast-safe)
(define-vop (,(symbolicate "DATA-VECTOR-SET-WITH-OFFSET/" ptype))
(:translate data-vector-set-with-offset)
(:policy :fast-safe)
@@
-609,19
+588,14
@@
'((move eax value)))
(sc-case index
(immediate
'((move eax value)))
(sc-case index
(immediate
- (inst mov (make-ea :byte :base object
- :disp (- (+ (* vector-data-offset n-word-bytes)
- (tn-value index)
- offset)
- other-pointer-lowtag))
+ (inst mov (make-ea-for-vector-data
+ object :size :byte :offset (+ (tn-value index) offset))
,(if 8-bit-tns-p
'value
'al-tn)))
(t
,(if 8-bit-tns-p
'value
'al-tn)))
(t
- (inst mov (make-ea :byte :base object :index index :scale 1
- :disp (- (+ (* vector-data-offset n-word-bytes)
- offset)
- other-pointer-lowtag))
+ (inst mov (make-ea-for-vector-data object :size :byte
+ :index index :offset offset)
,(if 8-bit-tns-p
'value
'al-tn))))
,(if 8-bit-tns-p
'value
'al-tn))))
@@
-656,16
+630,12
@@
(sc-case index
(immediate
(inst ,ref-inst value
(sc-case index
(immediate
(inst ,ref-inst value
- (make-ea :word :base object
- :disp (- (+ (* vector-data-offset n-word-bytes)
- (* 2 (+ offset (tn-value index))))
- other-pointer-lowtag))))
+ (make-ea-for-vector-data object :size :word
+ :offset (+ (tn-value index) offset))))
(t
(inst ,ref-inst value
(t
(inst ,ref-inst value
- (make-ea :word :base object :index index :scale 2
- :disp (- (+ (* vector-data-offset n-word-bytes)
- (* 2 offset))
- other-pointer-lowtag)))))))
+ (make-ea-for-vector-data object :size :word
+ :index index :offset offset))))))
(define-vop (,(symbolicate "DATA-VECTOR-SET-WITH-OFFSET/" ptype))
(:translate data-vector-set-with-offset)
(:policy :fast-safe)
(define-vop (,(symbolicate "DATA-VECTOR-SET-WITH-OFFSET/" ptype))
(:translate data-vector-set-with-offset)
(:policy :fast-safe)
@@
-686,16
+656,12
@@
(move eax value)
(sc-case index
(immediate
(move eax value)
(sc-case index
(immediate
- (inst mov (make-ea :word :base object
- :disp (- (+ (* vector-data-offset n-word-bytes)
- (* 2 (+ offset (tn-value index))))
- other-pointer-lowtag))
+ (inst mov (make-ea-for-vector-data
+ object :size :word :offset (+ (tn-value index) offset))
ax-tn))
(t
ax-tn))
(t
- (inst mov (make-ea :word :base object :index index :scale 2
- :disp (- (+ (* vector-data-offset n-word-bytes)
- (* 2 offset))
- other-pointer-lowtag))
+ (inst mov (make-ea-for-vector-data object :size :word
+ :index index :offset offset)
ax-tn)))
(move result eax))))))
(define-data-vector-frobs simple-array-unsigned-byte-15 positive-fixnum
ax-tn)))
(move result eax))))))
(define-data-vector-frobs simple-array-unsigned-byte-15 positive-fixnum