projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.8.7.6:
[sbcl.git]
/
src
/
compiler
/
alpha
/
array.lisp
diff --git
a/src/compiler/alpha/array.lisp
b/src/compiler/alpha/array.lisp
index
0250c2b
..
38572a3
100644
(file)
--- a/
src/compiler/alpha/array.lisp
+++ b/
src/compiler/alpha/array.lisp
@@
-23,13
+23,13
@@
(:temporary (:scs (non-descriptor-reg)) header)
(:results (result :scs (descriptor-reg)))
(:generator 13
(:temporary (:scs (non-descriptor-reg)) header)
(:results (result :scs (descriptor-reg)))
(:generator 13
- (inst addq rank (+ (* array-dimensions-offset word-bytes)
+ (inst addq rank (+ (* array-dimensions-offset n-word-bytes)
lowtag-mask)
bytes)
(inst li (lognot lowtag-mask) header)
(inst and bytes header bytes)
(inst addq rank (fixnumize (1- array-dimensions-offset)) header)
lowtag-mask)
bytes)
(inst li (lognot lowtag-mask) header)
(inst and bytes header bytes)
(inst addq rank (fixnumize (1- array-dimensions-offset)) header)
- (inst sll header type-bits header)
+ (inst sll header n-widetag-bits header)
(inst bis header type header)
(inst srl header 2 header)
(pseudo-atomic ()
(inst bis header type header)
(inst srl header 2 header)
(pseudo-atomic ()
@@
-40,36
+40,25
@@
\f
;;;; additional accessors and setters for the array header
\f
;;;; additional accessors and setters for the array header
-
-(defknown sb!impl::%array-dimension (t index) index
- (flushable))
-(defknown sb!impl::%set-array-dimension (t index index) index
- ())
-
(define-full-reffer %array-dimension *
array-dimensions-offset other-pointer-lowtag
(define-full-reffer %array-dimension *
array-dimensions-offset other-pointer-lowtag
- (any-reg) positive-fixnum sb!impl::%array-dimension)
+ (any-reg) positive-fixnum sb!kernel:%array-dimension)
(define-full-setter %set-array-dimension *
array-dimensions-offset other-pointer-lowtag
(define-full-setter %set-array-dimension *
array-dimensions-offset other-pointer-lowtag
- (any-reg) positive-fixnum sb!impl::%set-array-dimension #+gengc nil)
-
-
-(defknown sb!impl::%array-rank (t) index (flushable))
+ (any-reg) positive-fixnum sb!kernel:%set-array-dimension #!+gengc nil)
(define-vop (array-rank-vop)
(define-vop (array-rank-vop)
- (:translate sb!impl::%array-rank)
+ (:translate sb!kernel:%array-rank)
(:policy :fast-safe)
(:args (x :scs (descriptor-reg)))
(:temporary (:scs (non-descriptor-reg)) temp)
(:results (res :scs (any-reg descriptor-reg)))
(:generator 6
(loadw temp x 0 other-pointer-lowtag)
(:policy :fast-safe)
(:args (x :scs (descriptor-reg)))
(:temporary (:scs (non-descriptor-reg)) temp)
(:results (res :scs (any-reg descriptor-reg)))
(:generator 6
(loadw temp x 0 other-pointer-lowtag)
- (inst sra temp type-bits temp)
+ (inst sra temp n-widetag-bits temp)
(inst subq temp (1- array-dimensions-offset) temp)
(inst sll temp 2 res)))
(inst subq temp (1- array-dimensions-offset) temp)
(inst sll temp 2 res)))
-
-
\f
;;;; bounds checking routine
\f
;;;; bounds checking routine
@@
-100,7
+89,7
@@
(define-full-reffer ,(symbolicate "DATA-VECTOR-REF/" type)
,type
vector-data-offset other-pointer-lowtag
(define-full-reffer ,(symbolicate "DATA-VECTOR-REF/" type)
,type
vector-data-offset other-pointer-lowtag
- ,(remove-if #'(lambda (x) (member x '(null zero))) scs)
+ ,(remove-if (lambda (x) (member x '(null zero))) scs)
,element-type
data-vector-ref)
(define-full-setter ,(symbolicate "DATA-VECTOR-SET/" type)
,element-type
data-vector-ref)
(define-full-setter ,(symbolicate "DATA-VECTOR-SET/" type)
@@
-122,7
+111,7
@@
,size vector-data-offset other-pointer-lowtag ,scs
,element-type data-vector-set)))
(def-small-data-vector-frobs (type bits)
,size vector-data-offset other-pointer-lowtag ,scs
,element-type data-vector-set)))
(def-small-data-vector-frobs (type bits)
- (let* ((elements-per-word (floor word-bits bits))
+ (let* ((elements-per-word (floor n-word-bits bits))
(bit-shift (1- (integer-length elements-per-word))))
`(progn
(define-vop (,(symbolicate 'data-vector-ref/ type))
(bit-shift (1- (integer-length elements-per-word))))
`(progn
(define-vop (,(symbolicate 'data-vector-ref/ type))
@@
-142,7
+131,7
@@
(inst sll temp 2 temp)
(inst addq object temp lip)
(inst ldl result
(inst sll temp 2 temp)
(inst addq object temp lip)
(inst ldl result
- (- (* vector-data-offset word-bytes)
+ (- (* vector-data-offset n-word-bytes)
other-pointer-lowtag)
lip)
(inst and index ,(1- elements-per-word) temp)
other-pointer-lowtag)
lip)
(inst and index ,(1- elements-per-word) temp)
@@
-161,7
+150,7
@@
(integer 0
,(1- (* (1+ (- (floor (+ #x7fff
other-pointer-lowtag)
(integer 0
,(1- (* (1+ (- (floor (+ #x7fff
other-pointer-lowtag)
- word-bytes)
+ n-word-bytes)
vector-data-offset))
elements-per-word)))))
(:info index)
vector-data-offset))
elements-per-word)))))
(:info index)
@@
-198,7
+187,7
@@
(inst sll temp 2 temp)
(inst addq object temp lip)
(inst ldl old
(inst sll temp 2 temp)
(inst addq object temp lip)
(inst ldl old
- (- (* vector-data-offset word-bytes)
+ (- (* vector-data-offset n-word-bytes)
other-pointer-lowtag)
lip)
(inst and index ,(1- elements-per-word) shift)
other-pointer-lowtag)
lip)
(inst and index ,(1- elements-per-word) shift)
@@
-227,7
+216,7
@@
(inst sll temp shift temp)
(inst bis old temp old))
(inst stl old
(inst sll temp shift temp)
(inst bis old temp old))
(inst stl old
- (- (* vector-data-offset word-bytes)
+ (- (* vector-data-offset n-word-bytes)
other-pointer-lowtag)
lip)
(sc-case value
other-pointer-lowtag)
lip)
(sc-case value
@@
-248,7
+237,7
@@
(integer 0
,(1- (* (1+ (- (floor (+ #x7fff
other-pointer-lowtag)
(integer 0
,(1- (* (1+ (- (floor (+ #x7fff
other-pointer-lowtag)
- word-bytes)
+ n-word-bytes)
vector-data-offset))
elements-per-word))))
positive-fixnum)
vector-data-offset))
elements-per-word))))
positive-fixnum)
@@
-259,11
+248,11
@@
(:generator 20
(multiple-value-bind (word extra)
(floor index ,elements-per-word)
(:generator 20
(multiple-value-bind (word extra)
(floor index ,elements-per-word)
- (inst ldl object
+ (inst ldl old
(- (* (+ word vector-data-offset)
(- (* (+ word vector-data-offset)
- word-bytes)
+ n-word-bytes)
other-pointer-lowtag)
other-pointer-lowtag)
- old)
+ object)
(unless (and (sc-is value immediate)
(= (tn-value value)
,(1- (ash 1 bits))))
(unless (and (sc-is value immediate)
(= (tn-value value)
,(1- (ash 1 bits))))
@@
-298,7
+287,7
@@
(inst bis old temp old)))
(inst stl old
(- (* (+ word vector-data-offset)
(inst bis old temp old)))
(inst stl old
(- (* (+ word vector-data-offset)
- word-bytes)
+ n-word-bytes)
other-pointer-lowtag)
object)
(sc-case value
other-pointer-lowtag)
object)
(sc-case value
@@
-311,15
+300,21
@@
(def-full-data-vector-frobs simple-vector *
descriptor-reg any-reg null zero)
(def-full-data-vector-frobs simple-vector *
descriptor-reg any-reg null zero)
- (def-partial-data-vector-frobs simple-string base-char :byte nil
+ (def-partial-data-vector-frobs simple-base-string base-char :byte nil
base-char-reg)
base-char-reg)
+ (def-partial-data-vector-frobs simple-array-unsigned-byte-7 positive-fixnum
+ :byte nil unsigned-reg signed-reg)
(def-partial-data-vector-frobs simple-array-unsigned-byte-8 positive-fixnum
:byte nil unsigned-reg signed-reg)
(def-partial-data-vector-frobs simple-array-unsigned-byte-8 positive-fixnum
:byte nil unsigned-reg signed-reg)
+ (def-partial-data-vector-frobs simple-array-unsigned-byte-15 positive-fixnum
+ :short nil unsigned-reg signed-reg)
(def-partial-data-vector-frobs simple-array-unsigned-byte-16 positive-fixnum
:short nil unsigned-reg signed-reg)
(def-partial-data-vector-frobs simple-array-unsigned-byte-16 positive-fixnum
:short nil unsigned-reg signed-reg)
+ (def-full-data-vector-frobs simple-array-unsigned-byte-31 unsigned-num
+ unsigned-reg)
(def-full-data-vector-frobs simple-array-unsigned-byte-32 unsigned-num
unsigned-reg)
(def-full-data-vector-frobs simple-array-unsigned-byte-32 unsigned-num
unsigned-reg)
@@
-329,6
+324,7
@@
(def-partial-data-vector-frobs simple-array-signed-byte-16 tagged-num
:short t signed-reg)
(def-partial-data-vector-frobs simple-array-signed-byte-16 tagged-num
:short t signed-reg)
+ (def-full-data-vector-frobs simple-array-unsigned-byte-29 positive-fixnum any-reg)
(def-full-data-vector-frobs simple-array-signed-byte-30 tagged-num any-reg)
(def-full-data-vector-frobs simple-array-signed-byte-32 signed-num
(def-full-data-vector-frobs simple-array-signed-byte-30 tagged-num any-reg)
(def-full-data-vector-frobs simple-array-signed-byte-32 signed-num
@@
-355,7
+351,7
@@
(:generator 20
(inst addq object index lip)
(inst lds value
(:generator 20
(inst addq object index lip)
(inst lds value
- (- (* vector-data-offset word-bytes)
+ (- (* vector-data-offset n-word-bytes)
other-pointer-lowtag)
lip)))
other-pointer-lowtag)
lip)))
@@
-373,7
+369,7
@@
(:generator 20
(inst addq object index lip)
(inst sts value
(:generator 20
(inst addq object index lip)
(inst sts value
- (- (* vector-data-offset word-bytes)
+ (- (* vector-data-offset n-word-bytes)
other-pointer-lowtag)
lip)
(unless (location= result value)
other-pointer-lowtag)
lip)
(unless (location= result value)
@@
-393,7
+389,7
@@
(inst addq object index lip)
(inst addq lip index lip)
(inst ldt value
(inst addq object index lip)
(inst addq lip index lip)
(inst ldt value
- (- (* vector-data-offset word-bytes)
+ (- (* vector-data-offset n-word-bytes)
other-pointer-lowtag)
lip)))
other-pointer-lowtag)
lip)))
@@
-412,7
+408,7
@@
(inst addq object index lip)
(inst addq lip index lip)
(inst stt value
(inst addq object index lip)
(inst addq lip index lip)
(inst stt value
- (- (* vector-data-offset word-bytes)
+ (- (* vector-data-offset n-word-bytes)
other-pointer-lowtag) lip)
(unless (location= result value)
(inst fmove value result))))
other-pointer-lowtag) lip)
(unless (location= result value)
(inst fmove value result))))
@@
-434,11
+430,11
@@
(inst addq object index lip)
(inst addq lip index lip)
(inst lds real-tn
(inst addq object index lip)
(inst addq lip index lip)
(inst lds real-tn
- (- (* vector-data-offset word-bytes) other-pointer-lowtag)
+ (- (* vector-data-offset n-word-bytes) other-pointer-lowtag)
lip))
(let ((imag-tn (complex-single-reg-imag-tn value)))
(inst lds imag-tn
lip))
(let ((imag-tn (complex-single-reg-imag-tn value)))
(inst lds imag-tn
- (- (* (1+ vector-data-offset) word-bytes) other-pointer-lowtag)
+ (- (* (1+ vector-data-offset) n-word-bytes) other-pointer-lowtag)
lip))))
(define-vop (data-vector-set/simple-array-complex-single-float)
lip))))
(define-vop (data-vector-set/simple-array-complex-single-float)
@@
-459,14
+455,14
@@
(inst addq object index lip)
(inst addq lip index lip)
(inst sts value-real
(inst addq object index lip)
(inst addq lip index lip)
(inst sts value-real
- (- (* vector-data-offset word-bytes) other-pointer-lowtag)
+ (- (* vector-data-offset n-word-bytes) other-pointer-lowtag)
lip)
(unless (location= result-real value-real)
(inst fmove value-real result-real)))
(let ((value-imag (complex-single-reg-imag-tn value))
(result-imag (complex-single-reg-imag-tn result)))
(inst sts value-imag
lip)
(unless (location= result-real value-real)
(inst fmove value-real result-real)))
(let ((value-imag (complex-single-reg-imag-tn value))
(result-imag (complex-single-reg-imag-tn result)))
(inst sts value-imag
- (- (* (1+ vector-data-offset) word-bytes) other-pointer-lowtag)
+ (- (* (1+ vector-data-offset) n-word-bytes) other-pointer-lowtag)
lip)
(unless (location= result-imag value-imag)
(inst fmove value-imag result-imag)))))
lip)
(unless (location= result-imag value-imag)
(inst fmove value-imag result-imag)))))
@@
-488,11
+484,11
@@
(inst addq lip index lip)
(inst addq lip index lip)
(inst ldt real-tn
(inst addq lip index lip)
(inst addq lip index lip)
(inst ldt real-tn
- (- (* vector-data-offset word-bytes) other-pointer-lowtag)
+ (- (* vector-data-offset n-word-bytes) other-pointer-lowtag)
lip))
(let ((imag-tn (complex-double-reg-imag-tn value)))
(inst ldt imag-tn
lip))
(let ((imag-tn (complex-double-reg-imag-tn value)))
(inst ldt imag-tn
- (- (* (+ vector-data-offset 2) word-bytes) other-pointer-lowtag)
+ (- (* (+ vector-data-offset 2) n-word-bytes) other-pointer-lowtag)
lip))))
(define-vop (data-vector-set/simple-array-complex-double-float)
lip))))
(define-vop (data-vector-set/simple-array-complex-double-float)
@@
-515,14
+511,14
@@
(inst addq lip index lip)
(inst addq lip index lip)
(inst stt value-real
(inst addq lip index lip)
(inst addq lip index lip)
(inst stt value-real
- (- (* vector-data-offset word-bytes) other-pointer-lowtag)
+ (- (* vector-data-offset n-word-bytes) other-pointer-lowtag)
lip)
(unless (location= result-real value-real)
(inst fmove value-real result-real)))
(let ((value-imag (complex-double-reg-imag-tn value))
(result-imag (complex-double-reg-imag-tn result)))
(inst stt value-imag
lip)
(unless (location= result-real value-real)
(inst fmove value-real result-real)))
(let ((value-imag (complex-double-reg-imag-tn value))
(result-imag (complex-double-reg-imag-tn result)))
(inst stt value-imag
- (- (* (+ vector-data-offset 2) word-bytes) other-pointer-lowtag)
+ (- (* (+ vector-data-offset 2) n-word-bytes) other-pointer-lowtag)
lip)
(unless (location= result-imag value-imag)
(inst fmove value-imag result-imag)))))
lip)
(unless (location= result-imag value-imag)
(inst fmove value-imag result-imag)))))