mirror of
https://github.com/reactos/reactos.git
synced 2025-06-13 11:48:32 +00:00
[FAST486]
No underflows will occur in Fast486FpuAdd when the signs are different, since the exponent won't be reduced. svn path=/trunk/; revision=67840
This commit is contained in:
parent
4e457245b2
commit
1e5d331ec6
1 changed files with 2 additions and 21 deletions
|
@ -728,30 +728,11 @@ Fast486FpuAdd(PFAST486_STATE State,
|
||||||
{
|
{
|
||||||
if (TempResult.Mantissa >= FirstAdjusted.Mantissa
|
if (TempResult.Mantissa >= FirstAdjusted.Mantissa
|
||||||
&& TempResult.Mantissa >= SecondAdjusted.Mantissa)
|
&& TempResult.Mantissa >= SecondAdjusted.Mantissa)
|
||||||
{
|
|
||||||
if (TempResult.Exponent == 0)
|
|
||||||
{
|
|
||||||
/* Raise the underflow exception */
|
|
||||||
State->FpuStatus.Ue = TRUE;
|
|
||||||
|
|
||||||
if (State->FpuControl.Um)
|
|
||||||
{
|
|
||||||
/* Total overflow, return zero */
|
|
||||||
TempResult.Mantissa = 0ULL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Fast486FpuException(State);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
/* Reverse the mantissa */
|
/* Reverse the mantissa */
|
||||||
TempResult.Mantissa = -(LONGLONG)TempResult.Mantissa;
|
TempResult.Mantissa = -(LONGLONG)TempResult.Mantissa;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Normalize the result and return it */
|
/* Normalize the result and return it */
|
||||||
if (!Fast486FpuNormalize(State, &TempResult))
|
if (!Fast486FpuNormalize(State, &TempResult))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue