Call Operation - Intel i960 Jx Developer's Manual

Microprocessor
Table of Contents

Advertisement

PROCEDURE CALLS
The events for call and return operations are given in a logical order of operation. The i960 Jx
processor can execute independent operations in parallel; therefore, many of these events execute
simultaneously. For example, to improve performance, the processor often begins prefetching of
the target instruction for the call or return before the operation is complete.
7.1.3.1

Call Operation

When a
or
call, calls
callx
1.
The processor stores the instruction pointer for the instruction following the call in the
current stack's RIP register (r2).
2.
The current local registers — including the PFP, SP and RIP registers — are saved, freeing
these for use by the called procedure. The local registers are saved in the on-chip local
register cache when space is available.
3.
The frame pointer (g15) for the calling procedure is stored in the current stack's PFP register
(r0). The return type field in the PFP register is set according to the call type which is
performed. See
section 7.8, "RETURNS" (pg.
4.
For a local or system-local call, a new stack frame is allocated by using the old stack pointer
value saved in step 2. This value is first rounded to the next 16-byte boundary to create a
new frame pointer, then stored in the FP register. Next, 64 bytes are added to create the new
frame's register save area. This value is stored in the SP register.
For an interrupt call from user mode in a non-interrupted state, the current interrupt stack
pointer value is used instead of the SP value saved in step 2.
For a system-supervisor call from user mode, the current Supervisor Stack Pointer (SSP)
value is used instead of the SP value saved in step 2.
5.
The instruction pointer is loaded with the address of the first instruction in the called
procedure. The processor gets the new instruction pointer from the
procedure table, the interrupt table or the fault table, depending on the type of call executed.
Upon completion of these steps, the processor begins executing the called procedure. Sometime
before a return or nested call, the local register set is bound to the allocated stack frame.
7-6
instruction is executed or an implicit call is triggered:
7-20).
call
, the system

Advertisement

Table of Contents
loading

Table of Contents