Op Code (Hex) | Operand 1 | |||
---|---|---|---|---|
03E1 | Return target |
An internal exception handler subinvocation or an external exception handler invocation is terminated, and control is passed to the specified instruction in the specified invocation. All intervening invocations are marked as cancelled, down to, but not including, the invocation that is being returned to. When each of these invocations are returned to, their return handlers and invocation exit (I-exit) routines/cancel handlers will be found and run.
Note: This instruction is not allowed from a bound program invocation.
The template identified by operand 1 must be 16-byte aligned in the
space. It specifies the target invocation and target
instruction in the invocation where control is to be passed.
The format of operand 1 is as follows:
Offset | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Dec | Hex |
| Field Name |
| Data Type and Length | ||||||||||||
0 | 0 |
| Invocation address/offset |
| Space pointer or Invocation pointer | ||||||||||||
16 | 10 |
| Reserved (binary 0) |
| Char(1) | ||||||||||||
17 | 11 |
| Action |
| Char(2) | ||||||||||||
17 | 11 |
| Reserved (binary 0) |
| Bits 0-4 | ||||||||||||
17 | 11 |
| Use offset option |
| Bit 5 | ||||||||||||
|
|
|
| ||||||||||||||
17 | 11 |
| Unstack option |
| Bit 6 | ||||||||||||
|
|
|
| ||||||||||||||
17 | 11 |
| Action code |
| Bit 7 | ||||||||||||
|
|
|
| ||||||||||||||
18 | 12 |
| Reserved (binary 0) |
| Char(1) | ||||||||||||
19 | 13 |
| --- End --- |
|
|
The invocation address/offset field is a space/invocation pointer that identifies the invocation to which control will be passed.
The target invocation address field can also be an offset value from the current requesting invocation to the invocation to be searched. This is done by setting the use offset option field that follows the invocation address field to 1. If the invocation offset value locates the invocation stack base entry, the invocation offset outside range of current stack (hex 2C1A) exception is signaled. If the invocation offset value is a positive number (which represents newer invocations on the stack) a template value invalid (hex 3801) exception is signaled. The current instruction in an invocation is the one that caused another invocation to be created.
The unstack option is only valid when issued in an internal exception handler subinvocation and is ignored for an external exception handler invocation. This option will cause the internal exception handler subinvocation to be terminated and control will resume at the instruction immediately following the RTNEXCP instruction. In effect, this option will cause the current subinvocation to be unstacked.
If the action code is 0, then the current instruction of the addressed invocation is reexecuted, if it is allowed. If the action code is 1, execution resumes with the instruction following the current instruction of the addressed invocation, if it is allowed. If it is not, a retry/resume invalid (hex 1604) exception will be signaled.
For an action code of 0 the invocation address/offset field must identify the invocation which enabled the current exception handler. Otherwise a template value invalid (hex 3801) exception will be signalled.
The Return From Exception instruction may be issued only from the initial invocation of an external exception handling sequence or from an invocation that has an active internal exception handler.
If the instruction is issued from an invocation that is not an external exception handler and has no internal exception handler subinvocations, the return instruction invalid (hex 2C01) exception is signaled.
The following table shows the actions performed by the
Return From Exception instruction:
Invocation Issuing Instruction | Addressing Own Invocation/Option | Addressing Higher Invocation/Option | |
---|---|---|---|
Not handling exception
|
Error (see note 1)
|
Error (see note 1)
| |
Handling internal exception(s)
|
Allowed (see note 2)
|
Allowed (see note 3)
| |
Handling external exception(s)
|
Error (see note 1)
|
Allowed (see note 3)
| |
Handling external exception(s) and internal exception(s)
|
Allowed (see note 2)
|
Allowed (see note 3)
|
An action code of 1 specifies completion of an instruction rather than execution of the following instruction if the current instruction in the addressed invocation signaled a size (hex 0C0A) exception or a floating-point inexact result (hex 0C0D) exception.
Note: | The previous condition does not apply if any of the above exceptions were explicitly signaled by a Signal Exception (SIGEXCP) instruction. |
06 Addressing
08 Argument/Parameter
10 Damage Encountered
16 Exception Management
1C Machine-Dependent
20 Machine Support
22 Object Access
24 Pointer Specification
2C Program Execution
2E Resource Control Limit
36 Space Management
38 Template Specification
44 Protection Violation