Intel i960 User Manual page 275

Processor compiler
Hide thumbs Also See for i960:
Table of Contents

Advertisement

7
7-86
i960 Processor Compiler User's Guide
* Send a breakpoint IAC to the processor.
* address is supplied by the routine that calls
* set_bp.
Do not forget to enable breakpoints in the
* trace control.
*/
void set_bp(unsigned int addr1, unsigned int addr2)
{
iac_struct.message_type = 0x8f;
iac_struct.field3
iac_struct.field4
send_iac(&iac_struct);
}
In this example, the first line (
) declares that the function does not return a value and the
*base_msg)
argument is a pointer to a structure of type
base_msg
The second and eighth lines contain braces. These lines begin and end the
function definition, which contains two expansion definitions.
The third line is a control line containing three parameter declarations, as
follows:
%void return; reglit base_msg; tmpreg myreg; spillall;
The
declares that no value is returned by this
void return;
The
reglit base_msg;
either a literal or a register argument. The
the
local variable is a temporary register. The
myreg
informs the optimizer that this template references memory.
The fourth and fifth lines load the IAC address into a temporary register
and issue an IAC message.
The sixth line is a control line containing the
seventh line is the text of the
If the compiler cannot coerce the call arguments into the previous
expansion definition (the declarations in the third line), the compiler
displays the following error message and aborts the compilation:
Incorrect C call to send_iac
Fields 1, 2, and 5 are not used.
= addr1;
= addr2;
asm void send_iac(struct message
declares that the
base_msg
tmpreg myreg;
error
message.
error
The
.
message
function.
asm
parameter matches
declares that
control
spillall
control and the

Advertisement

Table of Contents
loading

Table of Contents