Basic block instructions



Class description
An instruction for calling a function in a dynamically linked library. It has the following slots:
dead-outputsA sequence of return values from the function that the compiler.cfg.dce pass has figured out are not used.
reg-inputsRegisters to use for the arguments to the function call. Each sequence item is a 3-tuple consisting of a spill-slot, register representation and a register. When the function is called, the parameter is copied from the spill slot to the given register.
stack-inputsStack slots used for the arguments to the function call.
reg-outputsIf the called function returns a value, then this slot is a one-element sequence containing a 3-tuple describing which register is used for the return value.
symbolsName of the function to call.
dllA dll handle or f.
gc-mapIf the invoked C function calls Factor code which triggers a GC, then a gc-map is necessary to find the roots.

Which function arguments that goes in reg-inputs and which goes in stack-inputs depend on the calling convention. In cdecl on x86.32, all arguments goes in stack-inputs, in x86.64 on unix, the first six arguments are passed in registers and then stack parameters are used for the remainder.

See also
#alien-invoke, %alien-invoke


TUPLE: ##alien-invoke < vreg-insn
varargs? reg-inputs stack-inputs reg-outputs dead-outputs
cleanup stack-size symbols dll gc-map insn# ;