10.19 RTL Representation of Function-Call Insns
(call (mem:fm addr) nbytes)
Here nbytes is an operand that represents the number of bytes of
argument data being passed to the subroutine, fm is a machine mode
(which must equal as the definition of the
FUNCTION_MODE macro in
the machine description) and addr represents the address of the
For a subroutine that returns no value, the
call expression as
shown above is the entire body of the insn, except that the insn might
(set (reg:m r) (call (mem:fm addr) nbytes))
This RTL expression makes it clear (to the optimizer passes) that the appropriate register receives a useful value in this insn.
When a subroutine returns a
BLKmode value, it is handled by
passing to the subroutine the address of a place to store the value.
So the call insn itself does not “return” any value, and it has the
same RTL form as a call that returns nothing.
On some machines, the call instruction itself clobbers some register,
for example to contain the return address.
on these machines should have a body which is a
that contains both the
call expression and
expressions that indicate which registers are destroyed. Similarly,
if the call instruction requires some register other than the stack
pointer that is not explicitly mentioned in its RTL, a
subexpression should mention that register.
Functions that are called are assumed to modify all registers listed in
the configuration macro
CALL_USED_REGISTERS (see Register Basics) and, with the exception of
const functions and library
calls, to modify all of memory.
Insns containing just
use expressions directly precede the
call_insn insn to indicate which registers contain inputs to the
function. Similarly, if registers other than those in
CALL_USED_REGISTERS are clobbered by the called function, insns
containing a single
clobber follow immediately after the call to
indicate which registers.