Skip to content
Snippets Groups Projects
Commit 89d5ac5f authored by wlott's avatar wlott
Browse files

Fixed allocation of variable-length things to compute the header correctly.

Was ignoring the header size and just including the extra in the header.
Also, fixed allocation of static-length things to only adjust ALLOC once.
Was allocating twice as much memory as necessary by adding in the size
twice.
parent e860402c
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/alloc.lisp,v 1.17 1992/07/28 20:34:12 wlott Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/alloc.lisp,v 1.18 1992/08/02 20:24:36 wlott Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -185,23 +185,17 @@
(inst and temp temp2)
(inst addu alloc-tn temp)
(inst addu temp extra-words (fixnum (1- ,size)))
(inst sll temp extra-words
(- type-bits word-shift))
(inst sll temp (- type-bits word-shift))
(inst or temp temp ,header)
(storew temp result 0 ,lowtag)))
(variable-length
(error ":REST-P T with no header in ~S?"
(primitive-object-name obj)))
(header
`((inst addu alloc-tn alloc-tn
(pad-data-block ,size))
(inst li temp
`((inst li temp
,(logior (ash (1- size) type-bits)
(symbol-value header)))
(storew temp result 0 ,lowtag)))
(t
`((inst addu alloc-tn alloc-tn
(pad-data-block ,size)))))
(storew temp result 0 ,lowtag))))
,@(when need-unbound-marker
`((inst li temp unbound-marker-type)))
,@(init-forms)
......
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