Arithmetic program interruptions from vector instructions

When one of the following arithmetic program interruptions occurs during the execution of a vector instruction, the interaction with a condition handler is equivalent to the corresponding exception for a scalar instruction:
  • Fixed-point overflow exception
  • Exponent-overflow exception
  • Exponent-underflow exception
  • Floating-point divide exception
  • Unnormalized-operand exception
  • Square-root exception

The unnormalized-operand exception occurs only for vector instructions, but the same considerations apply. Exceptions caused by vector instructions or scalar instructions are comparable in terms of the information available to the condition handler and the possible resume and fix-up and resume actions that the condition handler can request.

Whenever a condition handler is entered because a vector instruction caused one of the arithmetic program interruptions, the information available to that handler represents an exception for only a single element involved in the vector instruction. Both the condition token provided directly to the user condition handler and the qualifying data that it can use are the same as for the corresponding scalar instruction exception. None of this information reflects anything about a vector instruction. Therefore, the condition handler must treat the condition as though it were a scalar exception in which the equivalent scalar instruction is simply one of the successive elementary operations that comprise the vector instruction.

The same resume and fix-up and resume actions for scalar conditions can be requested when they apply to one of the operations that comprise the vector instruction. For example, when the resume with new input value action (result code 60 with a new condition token of CEE0CE) is allowed for the condition and is requested by the user condition handler to provide a new input value for the failing operation, the new input value is used to reexecute the failing vector instruction. This is identical to providing a new input value for a scalar instruction except that a particular element of a vector register is involved. Similarly, when the resume with new output value action (result code 60 with a new condition token of CEE0CF) is allowed for the condition and is requested by the user condition handler to provide a new result for the failing operation, the new result that the user condition handler provides replaces the appropriate element of the vector register. This is identical to providing a new result for a scalar instruction in that the new result replaces whatever the instruction left in its result position; in the vector case, the result position is a particular element of a vector register. For the vector instruction, resumption then occurs by continuing to execute the failing vector instruction but starting with the next element.

Because a vector instruction is semantically equivalent to a loop of elementary operations, more than one arithmetic program interruption can occur for the same vector instruction but for different elements. When this occurs, each exception is presented one at a time as a condition to any condition handlers that are involved.