fpu bug fix for fgetmant op
- inserted missing break - use temp variable instead of manipulating dest register fgetexp changed to directly convert int to floatx80
This commit is contained in:
parent
799900f45a
commit
e5da3227d9
|
@ -1267,19 +1267,22 @@ static void fpgen_rm_reg(uint16 w2)
|
|||
|
||||
temp = source.high; // get the exponent
|
||||
temp -= 0x3fff; // take off the bias
|
||||
REG_FP[dst] = double_to_fx80((double)temp);
|
||||
REG_FP[dst] = int32_to_floatx80((int32)temp);
|
||||
SET_CONDITION_CODES(REG_FP[dst]);
|
||||
USE_CYCLES(6);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case 0x1f: // FGETMANT (TBB)
|
||||
{
|
||||
REG_FP[dst] = source;
|
||||
REG_FP[dst].high &= ~0x7fff; // clear the bias, keep sign
|
||||
REG_FP[dst].high |= 0x3fff; // set new bias, 1.0 <= result < 2.0
|
||||
floatx80 temp = source;
|
||||
temp.high &= ~0x7fff; // clear the bias, keep sign
|
||||
temp.high |= 0x3fff; // set new bias, 1.0 <= result < 2.0
|
||||
REG_FP[dst] = temp;
|
||||
SET_CONDITION_CODES(REG_FP[dst]);
|
||||
//USE_CYCLES(6);
|
||||
USE_CYCLES(6);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue