Skip to content

Commit

Permalink
0.9.13.25:
Browse files Browse the repository at this point in the history
	Remove vestiges of raw-slot indirection in structures for non-HPPA
	  ports.
	... #!{-,+}hppa where appropriate;
	... purge %RAW-REF-FOO and associated SET VOPs on #-HPPA ports;
	... tested on PPC.
  • Loading branch information
Nathan Froyd committed Jun 4, 2006
1 parent 1f77eb1 commit 8823bb3
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 296 deletions.
6 changes: 6 additions & 0 deletions src/code/defsetfs.lisp
Expand Up @@ -39,16 +39,22 @@
;;; from defstruct.lisp
(in-package "SB!KERNEL")
(defsetf %instance-ref %instance-set)
#!-hppa
(progn
(defsetf %raw-instance-ref/word %raw-instance-set/word)
(defsetf %raw-instance-ref/single %raw-instance-set/single)
(defsetf %raw-instance-ref/double %raw-instance-set/double)
(defsetf %raw-instance-ref/complex-single %raw-instance-set/complex-single)
(defsetf %raw-instance-ref/complex-double %raw-instance-set/complex-double)
)
#!+hppa
(progn
(defsetf %raw-ref-single %raw-set-single)
(defsetf %raw-ref-double %raw-set-double)

(defsetf %raw-ref-complex-single %raw-set-complex-single)
(defsetf %raw-ref-complex-double %raw-set-complex-double)
)

(defsetf %instance-layout %set-instance-layout)
(defsetf %funcallable-instance-info %set-funcallable-instance-info)
Expand Down
6 changes: 5 additions & 1 deletion src/code/target-defstruct.lisp
Expand Up @@ -71,8 +71,11 @@
(defun %raw-instance-set/complex-double (instance index new-value)
(declare (type index index)
(type (complex double-float) new-value))
(%raw-instance-set/complex-double instance index new-value)))
(%raw-instance-set/complex-double instance index new-value))
) ; #!-HPPA

#!+hppa
(progn
(defun %raw-ref-single (vec index)
(declare (type index index))
(%raw-ref-single vec index))
Expand Down Expand Up @@ -124,6 +127,7 @@
(defun %raw-set-complex-long (vec index val)
(declare (type index index))
(%raw-set-complex-long vec index val))
) ; #!+HPPA

(defun %instance-layout (instance)
(%instance-layout instance))
Expand Down
39 changes: 0 additions & 39 deletions src/compiler/alpha/array.lisp
Expand Up @@ -525,45 +525,6 @@
(inst fmove value-imag result-imag)))))


;;; These VOPs are used for implementing float slots in structures
;;; (whose raw data is an unsigned-32 vector).
;;;
(define-vop (raw-ref-single data-vector-ref/simple-array-single-float)
(:translate %raw-ref-single)
(:arg-types sb!c::raw-vector positive-fixnum))
;;;
(define-vop (raw-set-single data-vector-set/simple-array-single-float)
(:translate %raw-set-single)
(:arg-types sb!c::raw-vector positive-fixnum single-float))
;;;
(define-vop (raw-ref-double data-vector-ref/simple-array-double-float)
(:translate %raw-ref-double)
(:arg-types sb!c::raw-vector positive-fixnum))
;;;
(define-vop (raw-set-double data-vector-set/simple-array-double-float)
(:translate %raw-set-double)
(:arg-types sb!c::raw-vector positive-fixnum double-float))

(define-vop (raw-ref-complex-single
data-vector-ref/simple-array-complex-single-float)
(:translate %raw-ref-complex-single)
(:arg-types sb!c::raw-vector positive-fixnum))
;;;
(define-vop (raw-set-complex-single
data-vector-set/simple-array-complex-single-float)
(:translate %raw-set-complex-single)
(:arg-types sb!c::raw-vector positive-fixnum complex-single-float))
;;;
(define-vop (raw-ref-complex-double
data-vector-ref/simple-array-complex-double-float)
(:translate %raw-ref-complex-double)
(:arg-types sb!c::raw-vector positive-fixnum))
;;;
(define-vop (raw-set-complex-double
data-vector-set/simple-array-complex-double-float)
(:translate %raw-set-complex-double)
(:arg-types sb!c::raw-vector positive-fixnum complex-double-float))

;;; These vops are useful for accessing the bits of a vector irrespective of
;;; what type of vector it is.
;;;
Expand Down
15 changes: 12 additions & 3 deletions src/compiler/generic/vm-fndb.lisp
Expand Up @@ -121,6 +121,8 @@
(unsafe))
(defknown %layout-invalid-error (t layout) nil)

#!-hppa
(progn
(defknown %raw-instance-ref/word (instance index) sb!vm:word
(flushable))
(defknown %raw-instance-set/word (instance index sb!vm:word) sb!vm:word
Expand All @@ -147,13 +149,20 @@
(instance index (complex double-float))
(complex double-float)
(unsafe))

(sb!xc:deftype raw-vector () '(simple-array sb!vm:word (*)))
)

;;; %RAW-{REF,SET}-FOO VOPs should be declared as taking a RAW-VECTOR
;;; as their first argument (clarity and to match these DEFKNOWNs).
;;; We declare RAW-VECTOR as a primitive type so the VOP machinery
;;; will accept our VOPs as legitimate. --njf, 2004-08-10
;;;
;;; These are only used on HPPA, since on HPPA implements raw slots in
;;; structures with an indirection vector; all other ports implement
;;; raw slots directly in the structure. --njf, 2006-06-02
#!+hppa
(progn
(sb!xc:deftype raw-vector () '(simple-array sb!vm:word (*)))

(sb!vm::!def-primitive-type-alias raw-vector
#!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or))
sb!vm::simple-array-unsigned-byte-32
Expand Down Expand Up @@ -186,7 +195,7 @@
(defknown %raw-set-complex-double (raw-vector index (complex double-float))
(complex double-float)
(unsafe))

)

(defknown %raw-bits (t fixnum) sb!vm:word
(foldable flushable))
Expand Down
31 changes: 0 additions & 31 deletions src/compiler/mips/array.lisp
Expand Up @@ -510,37 +510,6 @@
(inst fmove :double result-imag value-imag)))))


;;; These VOPs are used for implementing float slots in structures (whose raw
;;; data is an unsigned-32 vector.
(define-vop (raw-ref-single data-vector-ref/simple-array-single-float)
(:translate %raw-ref-single)
(:arg-types sb!c::raw-vector positive-fixnum))
(define-vop (raw-set-single data-vector-set/simple-array-single-float)
(:translate %raw-set-single)
(:arg-types sb!c::raw-vector positive-fixnum single-float))
(define-vop (raw-ref-double data-vector-ref/simple-array-double-float)
(:translate %raw-ref-double)
(:arg-types sb!c::raw-vector positive-fixnum))
(define-vop (raw-set-double data-vector-set/simple-array-double-float)
(:translate %raw-set-double)
(:arg-types sb!c::raw-vector positive-fixnum double-float))
(define-vop (raw-ref-complex-single
data-vector-ref/simple-array-complex-single-float)
(:translate %raw-ref-complex-single)
(:arg-types sb!c::raw-vector positive-fixnum))
(define-vop (raw-set-complex-single
data-vector-set/simple-array-complex-single-float)
(:translate %raw-set-complex-single)
(:arg-types sb!c::raw-vector positive-fixnum complex-single-float))
(define-vop (raw-ref-complex-double
data-vector-ref/simple-array-complex-double-float)
(:translate %raw-ref-complex-double)
(:arg-types sb!c::raw-vector positive-fixnum))
(define-vop (raw-set-complex-double
data-vector-set/simple-array-complex-double-float)
(:translate %raw-set-complex-double)
(:arg-types sb!c::raw-vector positive-fixnum complex-double-float))

;;; These vops are useful for accessing the bits of a vector irrespective of
;;; what type of vector it is.
(define-full-reffer raw-bits * 0 other-pointer-lowtag (unsigned-reg) unsigned-num
Expand Down
40 changes: 0 additions & 40 deletions src/compiler/ppc/array.lisp
Expand Up @@ -473,46 +473,6 @@
(inst fmr result-imag value-imag)))))


;;; These VOPs are used for implementing float slots in structures (whose raw
;;; data is an unsigned-32 vector.
;;;
(define-vop (raw-ref-single data-vector-ref/simple-array-single-float)
(:translate %raw-ref-single)
(:arg-types sb!c::raw-vector positive-fixnum))
;;;
(define-vop (raw-set-single data-vector-set/simple-array-single-float)
(:translate %raw-set-single)
(:arg-types sb!c::raw-vector positive-fixnum single-float))
;;;
(define-vop (raw-ref-double data-vector-ref/simple-array-double-float)
(:translate %raw-ref-double)
(:arg-types sb!c::raw-vector positive-fixnum))
;;;
(define-vop (raw-set-double data-vector-set/simple-array-double-float)
(:translate %raw-set-double)
(:arg-types sb!c::raw-vector positive-fixnum double-float))

(define-vop (raw-ref-complex-single
data-vector-ref/simple-array-complex-single-float)
(:translate %raw-ref-complex-single)
(:arg-types sb!c::raw-vector positive-fixnum))
;;;
(define-vop (raw-set-complex-single
data-vector-set/simple-array-complex-single-float)
(:translate %raw-set-complex-single)
(:arg-types sb!c::raw-vector positive-fixnum complex-single-float))
;;;
(define-vop (raw-ref-complex-double
data-vector-ref/simple-array-complex-double-float)
(:translate %raw-ref-complex-double)
(:arg-types sb!c::raw-vector positive-fixnum))
;;;
(define-vop (raw-set-complex-double
data-vector-set/simple-array-complex-double-float)
(:translate %raw-set-complex-double)
(:arg-types sb!c::raw-vector positive-fixnum complex-double-float))


;;; These vops are useful for accessing the bits of a vector irrespective of
;;; what type of vector it is.
;;;
Expand Down
49 changes: 0 additions & 49 deletions src/compiler/sparc/array.lisp
Expand Up @@ -605,55 +605,6 @@
(move-long-reg result-imag value-imag)))))


;;; These VOPs are used for implementing float slots in structures (whose raw
;;; data is an unsigned-32 vector.
(define-vop (raw-ref-single data-vector-ref/simple-array-single-float)
(:translate %raw-ref-single)
(:arg-types sb!c::raw-vector positive-fixnum))
(define-vop (raw-set-single data-vector-set/simple-array-single-float)
(:translate %raw-set-single)
(:arg-types sb!c::raw-vector positive-fixnum single-float))
(define-vop (raw-ref-double data-vector-ref/simple-array-double-float)
(:translate %raw-ref-double)
(:arg-types sb!c::raw-vector positive-fixnum))
(define-vop (raw-set-double data-vector-set/simple-array-double-float)
(:translate %raw-set-double)
(:arg-types sb!c::raw-vector positive-fixnum double-float))
#!+long-float
(define-vop (raw-ref-long data-vector-ref/simple-array-long-float)
(:translate %raw-ref-long)
(:arg-types sb!c::raw-vector positive-fixnum))
#!+long-float
(define-vop (raw-set-double data-vector-set/simple-array-long-float)
(:translate %raw-set-long)
(:arg-types sb!c::raw-vector positive-fixnum long-float))
(define-vop (raw-ref-complex-single
data-vector-ref/simple-array-complex-single-float)
(:translate %raw-ref-complex-single)
(:arg-types sb!c::raw-vector positive-fixnum))
(define-vop (raw-set-complex-single
data-vector-set/simple-array-complex-single-float)
(:translate %raw-set-complex-single)
(:arg-types sb!c::raw-vector positive-fixnum complex-single-float))
(define-vop (raw-ref-complex-double
data-vector-ref/simple-array-complex-double-float)
(:translate %raw-ref-complex-double)
(:arg-types sb!c::raw-vector positive-fixnum))
(define-vop (raw-set-complex-double
data-vector-set/simple-array-complex-double-float)
(:translate %raw-set-complex-double)
(:arg-types sb!c::raw-vector positive-fixnum complex-double-float))
#!+long-float
(define-vop (raw-ref-complex-long
data-vector-ref/simple-array-complex-long-float)
(:translate %raw-ref-complex-long)
(:arg-types sb!c::raw-vector positive-fixnum))
#!+long-float
(define-vop (raw-set-complex-long
data-vector-set/simple-array-complex-long-float)
(:translate %raw-set-complex-long)
(:arg-types sb!c::raw-vector positive-fixnum complex-long-float))

;;; These vops are useful for accessing the bits of a vector irrespective of
;;; what type of vector it is.
(define-vop (raw-bits word-index-ref)
Expand Down
66 changes: 0 additions & 66 deletions src/compiler/x86-64/array.lisp
Expand Up @@ -1314,72 +1314,6 @@
eax-tn)
(move result eax)))

;;; These VOPs are used for implementing float slots in structures (whose raw
;;; data is an unsigned-64 vector).
(define-vop (raw-ref-single data-vector-ref/simple-array-single-float)
(:translate %raw-ref-single)
(:arg-types sb!c::raw-vector positive-fixnum))
(define-vop (raw-ref-single-c data-vector-ref-c/simple-array-single-float)
(:translate %raw-ref-single)
(:arg-types sb!c::raw-vector (:constant low-index)))
(define-vop (raw-set-single data-vector-set/simple-array-single-float)
(:translate %raw-set-single)
(:arg-types sb!c::raw-vector positive-fixnum single-float))
(define-vop (raw-set-single-c data-vector-set-c/simple-array-single-float)
(:translate %raw-set-single)
(:arg-types sb!c::raw-vector (:constant low-index) single-float))
(define-vop (raw-ref-double data-vector-ref/simple-array-double-float)
(:translate %raw-ref-double)
(:arg-types sb!c::raw-vector positive-fixnum))
(define-vop (raw-ref-double-c data-vector-ref-c/simple-array-double-float)
(:translate %raw-ref-double)
(:arg-types sb!c::raw-vector (:constant low-index)))
(define-vop (raw-set-double data-vector-set/simple-array-double-float)
(:translate %raw-set-double)
(:arg-types sb!c::raw-vector positive-fixnum double-float))
(define-vop (raw-set-double-c data-vector-set-c/simple-array-double-float)
(:translate %raw-set-double)
(:arg-types sb!c::raw-vector (:constant low-index) double-float))


;;;; complex-float raw structure slot accessors

(define-vop (raw-ref-complex-single
data-vector-ref/simple-array-complex-single-float)
(:translate %raw-ref-complex-single)
(:arg-types sb!c::raw-vector positive-fixnum))
(define-vop (raw-ref-complex-single-c
data-vector-ref-c/simple-array-complex-single-float)
(:translate %raw-ref-complex-single)
(:arg-types sb!c::raw-vector (:constant low-index)))
(define-vop (raw-set-complex-single
data-vector-set/simple-array-complex-single-float)
(:translate %raw-set-complex-single)
(:arg-types sb!c::raw-vector positive-fixnum complex-single-float))
(define-vop (raw-set-complex-single-c
data-vector-set-c/simple-array-complex-single-float)
(:translate %raw-set-complex-single)
(:arg-types sb!c::raw-vector (:constant low-index)
complex-single-float))
(define-vop (raw-ref-complex-double
data-vector-ref/simple-array-complex-double-float)
(:translate %raw-ref-complex-double)
(:arg-types sb!c::raw-vector positive-fixnum))
(define-vop (raw-ref-complex-double-c
data-vector-ref-c/simple-array-complex-double-float)
(:translate %raw-ref-complex-double)
(:arg-types sb!c::raw-vector (:constant low-index)))
(define-vop (raw-set-complex-double
data-vector-set/simple-array-complex-double-float)
(:translate %raw-set-complex-double)
(:arg-types sb!c::raw-vector positive-fixnum complex-double-float))
(define-vop (raw-set-complex-double-c
data-vector-set-c/simple-array-complex-double-float)
(:translate %raw-set-complex-double)
(:arg-types sb!c::raw-vector (:constant low-index)
complex-double-float))


;;; These vops are useful for accessing the bits of a vector
;;; irrespective of what type of vector it is.
(define-full-reffer raw-bits * 0 other-pointer-lowtag (unsigned-reg)
Expand Down

0 comments on commit 8823bb3

Please sign in to comment.