Skip to content
Snippets Groups Projects
Commit 9dfaa2fc authored by wlott's avatar wlott
Browse files

Fixed the data-vector-{ref,set} transforms for simple vectors of

(unsigned-byte 2) and (unsigned-byte 4).
parent e2a2f1bc
Branches
Tags
No related merge requests found
......@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/vm-tran.lisp,v 1.11 1990/06/06 03:57:36 wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/vm-tran.lisp,v 1.12 1990/06/15 12:35:22 wlott Exp $
;;;
;;; This file contains impelemtentation-dependent transforms.
;;;
......@@ -139,17 +139,19 @@
`(multiple-value-bind (word bit)
(floor index ,',elements-per-word)
(ldb ,(ecase vm:target-byte-order
(:little-endian '(byte ,bits bit))
(:big-endian '(byte 1 (- vm:word-bits ,bits bit))))
(:little-endian '(byte ,bits (* bit ,bits)))
(:big-endian '(byte ,bits (- vm:word-bits
(* (1+ bit) ,bits)))))
(%raw-bits vector (+ word vm:vector-data-offset)))))
(deftransform data-vector-set ((vector index new-value)
(,type * *))
`(multiple-value-bind (word bit)
(floor index ,',elements-per-word)
(setf (ldb ,(ecase vm:target-byte-order
(:little-endian '(byte ,bits bit))
(:little-endian '(byte ,bits (* bit ,bits)))
(:big-endian
'(byte 1 (- vm:word-bits ,bits bit))))
'(byte ,bits (- vm:word-bits
(* (1+ bit) ,bits)))))
(%raw-bits vector (+ word vm:vector-data-offset)))
new-value)))))))
(frob simple-bit-vector 1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment