Compares the value in the ST(0) register with 0.0 and sets the condition code flags C0, C2, and C3 in the FPU status word according to the results (see table below).
FTST Results
Condition | C3 | C2 | C0 |
ST(0) > 0.0 | 0 | 0 | 0 |
ST(0) < 0.0 | 0 | 0 | 1 |
ST(0) = 0.0 | 1 | 0 | 0 |
Unordered | 1 | 1 | 1 |
This instruction performs an "unordered comparison." An unordered comparison also checks the class of the numbers being compared (see "FXAM-Examine" in this chapter). If the value in register ST(0) is a NaN or is in an undefined format, the condition flags are set to "unordered" and the invalid operation exception is generated.
The sign of zero is ignored, so that -0.0 = +0.0.
|