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

RE: [fpu] FPU operations





>From: owner-fpu@opencores.org [mailto:owner-fpu@opencores.org]On Behalf
>Of Damjan Lampret
>
>Actually if adding "compare" functionality to standard instructions is
>not a performance penalty then we should do it. GCC can generate code
>for this. It is just like CISC code for integer arithmetics. Same
>applies for FP. So if it is possible to do compare right after result
>is calculated (but for example not yet normalized or something) and
>this doesn't affect perfomance then we should do it. This could speed
>up things quite a bit. But only if this doesn't affect performance.

Hmmmmm, we should explore this further. What I meant with my previous
post was that the compare already runs in parallel to other operations
on the same two operand.

If you want a cmp to be performed on the result of an operation, against
what would you want it to be compared ?

I think we should definitely provide a status signal for "zero", so right 
after an FP OP, a conditional jump could follow. Similar like
you might do with 'unordered' and 'infinity' outputs, which will also
be valid. (*** Need to ensure timing matches other FP OPs ***).

>Not just zero. All would be useful. Imagine in most cases you might not
>even need compare insn in the code to do control (control == compare
>and then do branch if condition true). You would only need to do

Right, you do not check if the 'unordered' bit is set and then set another 
flag and then jump based on that flag. No I imagined that
the jump inst. will have the condition coded in to it. Right ?

>compare when you want to compare when status of operation is already
>overwitten by following operation. You know what I am talking - just
>like in most CISCs.

Ahm, no, I think this is wrong. The status/result, should never be
overwritten. You must latch the output *to* the FPU, and keep it until a
new FP OP is performed. Otherwise it's a nightmare to track the results.
That way you can always look at the status flags from the FPU and know
they are from the last FP OP.

...
>
>--damjan

rudi

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com