q_data structure for arithmetic program interruptions
If one of the arithmetic program interruptions shown in Table 1 occurs, and the corresponding condition is signaled, Language Environment builds the q_data structure shown in Figure 1.
Program interruption (see note 1) | Program interruption code | Condition | Message number |
---|---|---|---|
Fixed-point overflow exception | 08 | CEE348 | 3208 |
Fixed-point divide exception | 09 | CEE349 | 3209 |
Exponent-overflow exception | 0C | CEE34C | 3212 |
Exponent-underflow exception | 0D | CEE34D | 3213 |
Floating-point divide exception | 0F | CEE34F | 3215 |
Unnormalized-operand exception | 1E | CEE34U | 3230 |
Notes:
|
Figure 1. q_data Structure
for arithmetic program interruption conditions
The q_data structure shown in Figure 1 is
built by Language Environment for
the conditions of exponent overflow, exponent underflow, floating-point
divide, fixed-point overflow, fixed-point divide, and unnormalized-operand
exceptions. As a result, the q_data structure provides the following
information:
- parm_count (input)
- A 4-byte binary integer containing the value 6, which is the total number of q_data fields in the q_data structure, including parm_count.
- mach_inst_result_desc (input)
- The q_data descriptor for mach_inst_result.
- mach_inst_result (input)
- The value left in the machine register (general register, floating-point
register, or element of a vector register) by the failing machine
instruction. Based on the program interruption, mach_inst_result has
one of the following lengths and types (as reflected in the q_data
descriptor field mach_inst_result_desc):
Program interruption Length and type Fixed-point overflow exception 4- or 8-byte binary integer Fixed-point divide exception 8-byte binary integer Exponent-overflow exception 4-, 8-, or 16-byte floating-point number Exponent-underflow exception 4-, 8-, or 16-byte floating-point number Floating-point divide exception 4-, 8-, or 16-byte floating-point number Unnormalized-operand exception (occurs only on vector instructions) 4- or 8-byte floating-point number This is also the result value with which execution is resumed when the user condition handler requests the resume action (result code 10).
- fixup_resume_value_desc (input)
- The q_data descriptor for fixup_resume_value.
- fixup_resume_value (input/output)
- The fix-up value which, for the exceptions other than the unnormalized-operand
exception, is the result value with which execution is resumed. fixup_resume_value initially
has one of the following values:
- For an exponent-underflow exception, the value 0
- For an unnormalized-operand exception, the value 0
- For one of the other program interruptions, the same value as in mach_inst_result
Based on the program interruption, fixup_resume_value has the following lengths and types (as reflected in the q_data descriptor field fixup_resume_value_desc):Program interruption Length and type Fixed-point overflow exception 4- or 8-byte binary integer Fixed-point divide exception 8-byte binary integer or two 4-byte binary integers (remainder, quotient) Exponent-overflow exception 4-, 8-, or 16-byte floating-point number Exponent-underflow exception 4-, 8-, or 16-byte floating-point number Floating-point divide exception 4-, 8-, or 16-byte floating-point number Unnormalized-operand exception (occurs only on vector instructions) 4- or 8-byte floating-point number - mach_inst_address (input)
- The address of the machine instruction that is causing the program interruption.