i960 Processor Compiler User's Guide
7-76
7
Parameter Classes
An
asm parameter or return class can be any of the following:
tmpreg places the parameter in a general-purpose
register, of the compiler's choice, that the
asm
function can modify. For a tmpreg parameter
longer than one word, specify the number of
registers needed in parentheses after
tmpreg.
For example,
tmpreg(3) allocates three
consecutive registers. If
tmpreg is specified
without a number of registers, the default is
tmpreg(1).
A
tmpreg return value also occupies the
specified number of registers. If no class is
specified for
return, the default is tmpreg(
n
),
where
n
is the size from 1 to 4 needed to contain
the return value.
The maximum number of parameters that can be
placed in registers is 10.
ftmpreg places the parameter in a floating-point register,
of the compiler's choice, that the
asm function
can modify. You can use
ftmpreg only on
processors with on-chip floating-point support.
When used to declare
return, ftmpreg places
the return value in a floating-point register.
reglit places the parameter in a general-purpose
register, of the compiler's choice. The
asm
function must not modify the register.
If the parameter is a literal, it can be used as is.
Thus, the asm body should use the parameter
only in an assembly language context that allows
a literal.