]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/compiler/cfg/instructions/instructions.factor
FFI rewrite part 5: return value boxing and callback parameter boxing now uses vregs...
[factor.git] / basis / compiler / cfg / instructions / instructions.factor
index b46986666885808d3fa19d6c956642d837fcf58a..2c1ac7aadb5434aab361886c350a6e47f056e455 100644 (file)
@@ -641,35 +641,30 @@ INSN: ##store-stack-param
 use: src
 literal: n rep ;
 
-INSN: ##store-return
-use: src
-literal: rep ;
-
-INSN: ##store-struct-return
-use: src/int-rep
-literal: c-type ;
+INSN: ##load-reg-param
+def: dst
+literal: reg rep ;
 
-INSN: ##store-long-long-return
-use: src1/int-rep src2/int-rep ;
+INSN: ##load-stack-param
+def: dst
+literal: n rep ;
 
-INSN: ##prepare-struct-area
+INSN: ##prepare-struct-caller
 def: dst/int-rep ;
 
 INSN: ##box
 def: dst/tagged-rep
-literal: n rep boxer ;
+use: src
+literal: boxer rep ;
 
 INSN: ##box-long-long
 def: dst/tagged-rep
-literal: n boxer ;
-
-INSN: ##box-small-struct
-def: dst/tagged-rep
-literal: c-type ;
+use: src1/int-rep src2/int-rep
+literal: boxer ;
 
-INSN: ##box-large-struct
+INSN: ##allot-byte-array
 def: dst/tagged-rep
-literal: n c-type ;
+literal: size ;
 
 INSN: ##alien-invoke
 literal: symbols dll ;
@@ -683,9 +678,6 @@ use: src/int-rep ;
 INSN: ##alien-assembly
 literal: quot ;
 
-INSN: ##save-param-reg
-literal: offset reg rep ;
-
 INSN: ##begin-callback ;
 
 INSN: ##alien-callback
@@ -849,27 +841,31 @@ UNION: conditional-branch-insn
 UNION: ##read ##slot ##slot-imm ##vm-field ##alien-global ;
 UNION: ##write ##set-slot ##set-slot-imm ##set-vm-field ;
 
-! Instructions that clobber registers
-UNION: clobber-insn
-##call-gc
-##unary-float-function
-##binary-float-function
-##box
-##box-long-long
-##box-small-struct
-##box-large-struct
-##unbox
+! Instructions that clobber registers. They receive inputs and
+! produce outputs in spill slots.
+UNION: hairy-clobber-insn
+##load-reg-param
 ##store-reg-param
-##store-return
-##store-struct-return
-##store-long-long-return
+##call-gc
 ##alien-invoke
 ##alien-indirect
 ##alien-assembly
-##save-param-reg
 ##begin-callback
 ##end-callback ;
 
+! Instructions that clobber registers but are allowed to produce
+! outputs in registers. Inputs are in spill slots, except for
+! inputs coalesced with the output, in which case that input
+! will be in a register.
+UNION: clobber-insn
+hairy-clobber-insn
+##unary-float-function
+##binary-float-function
+##unbox
+##box
+##box-long-long
+##allot-byte-array ;
+
 ! Instructions that have complex expansions and require that the
 ! output registers are not equal to any of the input registers
 UNION: def-is-use-insn