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

Added translates for get-header-data and set-header-data. Added the zero

SC for the data in set-header-data.  In compute-function, force the offset
to be in either a signed-reg or unsigned-reg, so we don't have to shift
it yourself.
parent 9ef8b9ea
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/mips/system.lisp,v 1.25 1990/06/18 14:47:22 wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/system.lisp,v 1.26 1990/06/25 21:14:24 wlott Exp $
;;;
;;; MIPS VM definitions of various system hacking operations.
;;;
......@@ -106,6 +106,8 @@
(define-vop (get-header-data)
(:translate get-header-data)
(:policy :fast-safe)
(:args (x :scs (descriptor-reg)))
(:results (res :scs (unsigned-reg)))
(:result-types positive-fixnum)
......@@ -114,8 +116,10 @@
(inst srl res res vm:type-bits)))
(define-vop (set-header-data)
(:translate set-header-data)
(:policy :fast-safe)
(:args (x :scs (descriptor-reg) :target res)
(data :scs (any-reg immediate)))
(data :scs (any-reg immediate zero)))
(:arg-types * positive-fixnum)
(:results (res :scs (descriptor-reg)))
(:temporary (:scs (non-descriptor-reg) :type random) t1 t2)
......@@ -127,7 +131,8 @@
(inst sll t2 data (- vm:type-bits 2))
(inst or t1 t2))
(immediate
(inst or t1 (ash (tn-value data) vm:type-bits))))
(inst or t1 (ash (tn-value data) vm:type-bits)))
(zero))
(storew t1 x 0 vm:other-pointer-type)
(move res x)))
......@@ -202,7 +207,8 @@
(define-vop (compute-function)
(:args (code :scs (descriptor-reg))
(offset :scs (any-reg)))
(offset :scs (signed-reg unsigned-reg)))
(:arg-types * positive-fixnum)
(:results (func :scs (descriptor-reg)))
(:temporary (:scs (non-descriptor-reg)) ndescr)
(:generator 10
......
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