Alternate way is to have clear_fpex & is_bad_fp as global (aby
FP would write to single status register) and then both of
these would need to be FP barrier.
I prefer the non-serializing variant, with the option that the CPU may
trap if the flag is set on any of the input operands of an FP instruction
(just like it will do when the zero flag is set on a divisor). That
means that the flag should go into the scoreboard.
We can also provide some bits in the FPU control register that specify
when the fpex flag will be set (to exclude conditions that aren't
interesting, e.g. inexact result or gradual underflow).
The remaining problem is that the fpex flags must be saved and restored
when a task switch occurs, either automatically or with an explicit
special instruction.
Another question is: What do we do in SIMD mode? Use a single flag
for all chunks?
i think that this question is even more important and challenging than
the condition problem....