Skip to content
Snippets Groups Projects
Commit 660c9c16 authored by wlott's avatar wlott
Browse files

Fixed a bug in the data-vector-ref/unsigned-byte-{1,2,4}-c VOP in which it

wouldn't clear the extra bits if the bit offset into the word was 0.  In
actuality, this didn't matter, because this vop was never used.  Even if
the index was a constant, it got fed through check-bounds, so it was no
longer a constant when it showed up at data-vector-ref.
parent 8db12590
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/array.lisp,v 1.4 1991/04/17 21:36:54 wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/array.lisp,v 1.5 1991/05/04 18:46:52 wlott Exp $
;;;
;;; This file contains the SPARC definitions for array operations.
;;;
......@@ -193,6 +193,7 @@
(:temporary (:scs (non-descriptor-reg)) temp)
(:generator 15
(multiple-value-bind (word extra) (floor index ,elements-per-word)
(setf extra (logxor extra (1- ,elements-per-word)))
(let ((offset (- (* (+ word vm:vector-data-offset) vm:word-bytes)
vm:other-pointer-type)))
(cond ((typep offset '(signed-byte 13))
......@@ -203,7 +204,7 @@
(unless (zerop extra)
(inst srl result
(logxor (* extra ,bits) ,(1- elements-per-word))))
(unless (zerop extra)
(unless (= extra ,(1- elements-per-word))
(inst and result ,(1- (ash 1 bits)))))))
(define-vop (,(symbolicate 'data-vector-set/ type))
(:note "inline array store")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment