return fmovem_postinc(env, addr, mask, cpu_ld_float64_ra);
}
-static void make_quotient(CPUM68KState *env, floatx80 val)
+static void make_quotient(CPUM68KState *env, int32_t quotient)
{
- int32_t quotient;
int sign;
- if (floatx80_is_any_nan(val)) {
- return;
- }
-
- quotient = floatx80_to_int32(val, &env->fp_status);
sign = quotient < 0;
if (sign) {
quotient = -quotient;
{
res->d = floatx80_mod(val1->d, val0->d, &env->fp_status);
- make_quotient(env, res->d);
+ if (floatx80_is_any_nan(res->d)) {
+ return;
+ }
+
+ make_quotient(env, floatx80_to_int32(res->d, &env->fp_status));
}
void HELPER(frem)(CPUM68KState *env, FPReg *res, FPReg *val0, FPReg *val1)
{
res->d = floatx80_rem(val1->d, val0->d, &env->fp_status);
- make_quotient(env, res->d);
+ if (floatx80_is_any_nan(res->d)) {
+ return;
+ }
+
+ make_quotient(env, floatx80_to_int32(res->d, &env->fp_status));
}
void HELPER(fgetexp)(CPUM68KState *env, FPReg *res, FPReg *val)