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

Re: [f-cpu] IEEE FP exceptions



On Mon, Mar 03, 2003 at 11:37:37AM +0100, devik wrote:
> > There is, however, a big problem with FP status:  Since instructions
> > complete out-of-order, it's undefined which instruction the status
> > comes from.  You can only query the status of a series of FP instructions
> > collectively, unless you serialize the instruction stream after every
> > FP operation (which is going to be slooooooooow).
> 
> from what I've understood from the paper, the use is to:
> 
> double compute_krakovian(matrix *x)
> {
> 	clear_fpuflag()
> 	... some heavy numerical math ...
>         if (test_flag_for_error)
> 		return compute_krakovian_precise(x);
> 	return y;
> }
> 
> so that to do block of computation, serialize and check flag. The
> flag could be also "hidden" part of our 96bit FPU word and thus
> it could be copied/preserved during dataflow - one then could
> also check for errors or imprecisions in single result. That
> would allow very nice handling of precision, no extra context,
> no problem with OOC and compiler could simulate IEEE behaviour
> of global status flag by ORing status words obtained from
> all dataflow registers in cross-section at the place of
> "check()" call (yes gcc can handle it easily).
> 
> Yet another "in-pipeline" exception would be over ;-)

Unfortunately, you seem to misunderstand... there is no 96-bit
datapath because there are no 96-bit FP registers.  At the end of
every instruction, the result is rounded to either float or double,
any additional bits will be lost.  Exceptional conditions can only be
marked in a central status register.  The only thing we could do is mark
the result register in the scoreboard and raise an exception when it is
used -- but that may be too late.

-- 
 Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
 "All I wanna do is have a little fun before I die"
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/