M: ##alien-setter uses-vregs [ src>> ] [ value>> ] bi 2array ;
M: ##fixnum-overflow uses-vregs [ src1>> ] [ src2>> ] bi 2array ;
M: ##phi uses-vregs inputs>> ;
+M: ##gc uses-vregs live-in>> ;
M: _conditional-branch uses-vregs [ src1>> ] [ src2>> ] bi 2array ;
M: _compare-imm-branch uses-vregs src1>> 1array ;
M: _dispatch uses-vregs src>> 1array ;
-M: _gc uses-vregs live-in>> ;
M: insn uses-vregs drop f ;
! Instructions that use vregs
##fixnum-overflow
##conditional-branch
##compare-imm-branch
+##phi
+##gc
_conditional-branch
_compare-imm-branch
-_dispatch
-_gc ;
+_dispatch ;
: insert-gc-check ( basic-block -- )
dup gc? [
dup
- [ swap object-pointer-regs \ _gc new-insn suffix ]
+ [ swap object-pointer-regs \ ##gc new-insn prefix ]
change-instructions drop
] [ drop ] if ;
INSN: ##compare-float-branch < ##conditional-branch ;
INSN: ##compare-float < ##binary cc temp ;
+INSN: ##gc live-in ;
+
! Instructions used by machine IR only.
INSN: _prologue stack-frame ;
INSN: _epilogue stack-frame ;
INSN: _label id ;
-INSN: _gc live-in ;
-
INSN: _branch label ;
INSN: _dispatch src temp ;
frame-required? on
] when ;
-\ _gc t frame-required? set-word-prop
\ _spill t frame-required? set-word-prop
+\ ##gc t frame-required? set-word-prop
\ ##fixnum-add t frame-required? set-word-prop
\ ##fixnum-sub t frame-required? set-word-prop
\ ##fixnum-mul t frame-required? set-word-prop