EasyManua.ls Logo

Intel i960 - Page 270

Intel i960
347 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Language Implementation
7-81
7
If you do not specify a name in the call control, the compiler uses the
name of the
asm function. For example, calling the following as
select(3) results in a call to an external function named select:
asm int select (int i)
{
% const(-2:2) i;
. . .
% call select;
}
Any lines of template text following a call control line result in a
compiler error.
If the control line does not contain
call or error, the compiler
inserts the selected template in the assembly-language output in place
of the
asm function call.
Declarations
The control line can declare the following:
parameters, including return
local temporary variables
labels
Parameter declarations and local temporary declarations are syntactically
identical. If the declared name is the same as a parameter declared in the
function prototype, a parameter is declared. Otherwise, the declaration is
of a local temporary variable.
In the template text, the compiler replaces the name of any declared
parameter with the corresponding register or literal argument. The
return keyword becomes the name of the register in which the return
value of the
asm function is expected. The compiler replaces the name of
any local variable with the name of an available register.
You can use a
reglit or tmpreg class parameter or local variable as an
integer aggregate containing up to four general-purpose registers, as
declared on the control line. To select a register, specify an integer in

Table of Contents

Related product manuals