i960 Processor Compiler User's Guide
7-80
7
constant. For example, the expressions x+5-x,
x-7, and x can evaluate to constants during
compilation if the value of
x is a known value at
compile time.
Floating-point is a constant floating-point value. The rules for
constant classifying arguments as floating-point constants
exactly parallel the rules for classifying
arguments as integer constants.
Template Expansion
Once the compiler selects an expansion case, one of the following
sequences occurs:
• If the control line contains the
error control, the compiler reports an
error, using the first line following the
error control line as the text
of the error message. For example, invoking the following
asm
function as traps(1) prints the message Reached trap1:
asm int traps (int i)
{
% const(1) i; error;
Reached trap1
% const(2) i; error;
Reached trap2
% error;
Reached traps without 1 or 2
}
• More than one line of template text following an error control line
results in a compiler syntax error.
• If the control line contains the
call control, the compiler generates a
call to an external function using the
call assembly-language
instruction. You can specify the name of the external function, as in
the following example:
%call my_alt_afn;