Intel i960 Jx Developer's Manual page 204

Microprocessor
Table of Contents

Advertisement

INSTRUCTION SET REFERENCE
6.2.54
ret
Mnemonic:
ret
Format:
ret
Description:
Returns program control to the calling procedure. The current stack frame
(i.e., that of the called procedure) is deallocated and the FP is changed to
point to the calling procedure's stack frame. Instruction execution is
continued at the instruction pointed to by the RIP in the calling procedure's
stack frame, which is the instruction immediately following the call
instruction.
As shown in the action statement below, the return-status field and
prereturn-trace flag determine the action that the processor takes on the
return. These fields are contained in bits 0 through 3 of register r0 of the
called procedure's local registers.
See
CHAPTER 7, PROCEDURE CALLS
Action:
implicit_syncf();
if(pfp.p && PC.te && TC.p)
{
pfp.p = 0;
generate_fault(TRACE.PRERETURN);
}
switch(return_status_field)
{
case 000
case 001
case 010
6-92
Return
:
#local return
2
get_FP_and_IP();
break;
:
#fault return
2
tempa = memory(FP-16);
tempb = memory(FP-12);
get_FP_and_IP();
AC = tempb;
if(execution_mode == supervisor)
PC = tempa;
break;
:
#supervisor return, trace on return disabled
2
if(execution_mode != supervisor)
get_FP_and_IP();
else
{
PC.te = 0;
execution_mode = user;
get_FP_and_IP();
}
break;
for more on
.
ret

Advertisement

Table of Contents
loading

Table of Contents