Retrieve Computational Attributes (RETCA)
Instruction Syntax
Bound Program Access |
---|
|
Description:
The right-most byte of selector specifies the computational attributes to retrieve. The format of this byte is as follows:
Bit | Definition |
---|---|
0-3 | Reserved (must be 0) |
4 | Exception mask |
5 | Decimal floating-point rounding mode |
6 | Exception occurrence |
7 | Binary floating-point rounding mode |
All other bytes of selector are reserved (must be 0).
The value returned by RETCA has the following structure:
- Byte 0: Exception mask
Bit Meaning 0-1 Reserved (binary 0) 2 Floating-point overflow 3 Floating-point underflow 4 Floating-point zero divide 5 Floating-point inexact result 6 Floating-point invalid operand 7 Reserved (binary 0) - Byte 1: Reserved (binary 0)
- Byte 2: Exception occurrence
Bit Meaning 0-1 Reserved (binary 0) 2 Floating-point overflow 3 Floating-point underflow 4 Floating-point zero divide 5 Floating-point inexact result 6 Floating-point invalid operand 7 Floating-point invalid conversion - Byte 3: Computational mode
Bit Meaning 0 Reserved (binary 0) 1-2 Binary floating-point rounding mode - 00 - Round toward positive infinity
- 01 - Round toward negative infinity
- 10 - Round toward zero
- 11 - Round to nearest
3-4 Reserved (binary 0) 5-7 Decimal floating-point rounding mode - 000 - Round to nearest, ties to even
- 001 - Round toward zero
- 010 - Round toward positive infinity
- 011 - Round toward negative infinity
- 100 - Round to nearest, ties away from zero
- 101 - Round to nearest, ties toward zero
- 110 - Round away from zero
- 111 - Round to prepare for shorter precision
Note: Any floating-point operations currently on the value stack will be computed prior to retrieving the computational attributes. Therefore, the effect of such floating-point operations on the exception occurrence byte, for example, will be reflected in the value returned by the function.
Authorization Required
- None
Lock Enforcement
- None
Exceptions
- None