Skip to content

Commit

Permalink
fix some uninitialized vars in fpu
Browse files Browse the repository at this point in the history
  • Loading branch information
aquynh committed Jun 7, 2020
1 parent 535143a commit 7ea04ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions qemu/fpu/softfloat.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ static float32 roundAndPackFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig
{
int8 roundingMode;
flag roundNearestEven;
int8 roundIncrement, roundBits;
int8 roundIncrement = 0, roundBits;
flag isTiny;

roundingMode = STATUS(float_rounding_mode);
Expand Down Expand Up @@ -553,7 +553,7 @@ static float64 roundAndPackFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig
{
int8 roundingMode;
flag roundNearestEven;
int_fast16_t roundIncrement, roundBits;
int_fast16_t roundIncrement = 0, roundBits;
flag isTiny;

roundingMode = STATUS(float_rounding_mode);
Expand Down Expand Up @@ -726,7 +726,7 @@ static floatx80
STATUS_PARAM)
{
int8 roundingMode;
flag roundNearestEven, increment, isTiny;
flag roundNearestEven, increment = 0, isTiny;
int64 roundIncrement, roundMask, roundBits;

roundingMode = STATUS(float_rounding_mode);
Expand Down Expand Up @@ -1064,7 +1064,7 @@ static float128
flag zSign, int32 zExp, uint64_t zSig0, uint64_t zSig1, uint64_t zSig2 STATUS_PARAM)
{
int8 roundingMode;
flag roundNearestEven, increment, isTiny;
flag roundNearestEven, increment = 0, isTiny;

roundingMode = STATUS(float_rounding_mode);
roundNearestEven = ( roundingMode == float_round_nearest_even );
Expand Down

0 comments on commit 7ea04ac

Please sign in to comment.