| |||
| Home > VFP Exception Handling > Invalid Operation exception | |||
An operation is invalid if the result cannot be represented, or if the result is not defined.
Table 23.4 shows the operand combinations that produce Invalid Operation exceptions. In addition to the conditions in Table 23.4, any CDP instruction other than FCPY, FNEG, or FABS causes an Invalid Operation exception if one or more of its operands is an SNaN (see Table 20.1).
Table 23.4. Possible Invalid Operation exceptions
| Instruction | Invalid Operation exceptions |
|---|---|
| FADD | (+infinity) + (-infinity) or (-infinity) + (+infinity). |
| FSUB | (+infinity) - (+infinity) or (-infinity) - (-infinity). |
| FCMPE/FCMPEZ | Any NaN operand |
| FMUL/FNMUL | Zero ±infinity or ±infinity zero.[1] |
| FDIV | Zero/zero or infinity/infinity.a |
| FMAC/FNMAC | Any condition that can cause an Invalid Operation exception for FMUL or FADD can cause an Invalid Operation exception for FMAC and FNMAC. The product generated by the FMAC or FNMAC multiply operation is considered in the detection of the Invalid Operation exception for the subsequent sum operation. |
| FMSC/FNMSC | Any of the conditions that can cause an Invalid Operation exception for FMUL or FSUB can cause an Invalid Operation exception for FMSC and FNMSC. The product generated by the FMSC or FNMSC multiply operation is considered in the detection of the Invalid Operation exception for the subsequent difference operation. |
| FSQRT | Source is less than 0. |
| FTOUI | Rounded result would lie outside the range 0 ≤ result < 232. |
| FTOSI | Rounded result would lie outside the range -231 ≤ result < 231. |
[1] In flush-to-zero mode, a subnormal input is treated as a positive zero for detecting an Invalid Operation exception. | |