diff options
-rw-r--r-- | target/m68k/fpu_helper.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/target/m68k/fpu_helper.c b/target/m68k/fpu_helper.c index 76b34b8..5fd094a 100644 --- a/target/m68k/fpu_helper.c +++ b/target/m68k/fpu_helper.c @@ -523,17 +523,16 @@ static void make_quotient(CPUM68KState *env, int sign, uint32_t quotient) void HELPER(fmod)(CPUM68KState *env, FPReg *res, FPReg *val0, FPReg *val1) { - uint32_t quotient; - int sign; + uint64_t quotient; + int sign = extractFloatx80Sign(val1->d) ^ extractFloatx80Sign(val0->d); - res->d = floatx80_mod(val1->d, val0->d, &env->fp_status); + res->d = floatx80_modrem(val1->d, val0->d, true, "ient, + &env->fp_status); if (floatx80_is_any_nan(res->d)) { return; } - sign = extractFloatx80Sign(res->d); - quotient = floatx80_to_int32(floatx80_abs(res->d), &env->fp_status); make_quotient(env, sign, quotient); } |