Commit 2b82c4e1 authored by Lauric Desauw's avatar Lauric Desauw
Browse files

FPU v2.0

normal and subnormal are handled for all basic instruction except SQRT
parent 2d65dee2
Pipeline #82335 passed with stages
in 38 minutes and 51 seconds
...@@ -515,13 +515,21 @@ public : ...@@ -515,13 +515,21 @@ public :
outputExp = f1Exp - f2Exp + 127; outputExp = f1Exp - f2Exp + 127;
stall = false; stall = false;
if(!quotient[24]) for(i = 47; i >= 0; i--)
if (quotient[i])
break;
if (i > 22) // the result is normal
{
localResult.set_slc(0, quotient.slc<23>(i - 23) );
outputExp += i - 24 ;
}
else // the result is a subnormal
{ {
outputExp--; outputExp = 0;
localResult.set_slc(0, quotient.slc<23>(0)); localResult.set_slc(0,quotient.slc<23>(0));
} }
else
localResult.set_slc(0, quotient.slc<23>(1));
localResult.set_slc(23, outputExp.slc<8>(0)); localResult.set_slc(23, outputExp.slc<8>(0));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment