[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f-cpu] IEEE FP exceptions



> > 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.

I think so.

> 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).

yes.

> 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.

maybe other SR ? We would have to serialize FPU in any case ..

> Another question is:  What do we do in SIMD mode?  Use a single flag
> for all chunks?

good question. Because max no of chunks is not limited it would
be much simpler to have single flag. Also when one chunk would
overflow you will probably restart whole computation routine
so that it is reasonable to do it this way IMHO.

devik

*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/