Purpose: | To transfer control from a procedure back to the calling program | |||
Format: | opcode | |||
Operation: |
{restores SP From FP}; {restores registers}; {drop stack alignment}; {restore PSW}; {If CALLS then remove arglist}; |
|||
Condition Codes: |
N <- restored PSW<N> Z <- restored PSW<Z> V <- restored PSW<V> C <- restored PSW<C> |
|||
Exceptions: | Reserved Operand | |||
Opcodes: |
|
|||
Description: | SP is replaced by FP plus 4. A longword containing the stack alignment bits in bits 31:30, a CALLS/CALLG flag in bit 29, the low 12 bits of the procedure entry mask in bits 27:16, and the saved PSW in bits 15:0 is popped from the stack and saved as a temporary. PC, FP and AP are replaced by longwords popped from the stack. A register restore mask is formed from bits 27:16 of the temporary. Scanning from bit 0 to bit 11 of the restore mask, the contents of registers whose number is indicated by set bits in the mask are replaced by longwords popped from the stack. SP is replaced by the sum of SP and bits 31:30 of the temporary. PSW is replaced by bits 15:0 of the temporary. If bit 29 of the temporary is 1 (Indicating that this procedure was called with a CALLS), a longword containing the number of arguments is popped from the stack. Four times the unsigned value of the low byte of this longword is added to SP and SP is replaced by the result. | |||
Notes: |
|