Revision 306ab3e8 target-mips/op_helper.c

b/target-mips/op_helper.c
230 230
void do_ddiv (void)
231 231
{
232 232
    if (T1 != 0) {
233
        lldiv_t res = lldiv((int64_t)T0, (int64_t)T1);
234
        env->LO[0][env->current_tc] = res.quot;
235
        env->HI[0][env->current_tc] = res.rem;
233
        int64_t arg0 = (int64_t)T0;
234
        int64_t arg1 = (int64_t)T1;
235
        if (arg0 == ((int64_t)-1 << 63) && arg1 == (int64_t)-1) {
236
            env->LO[0][env->current_tc] = arg0;
237
            env->HI[0][env->current_tc] = 0;
238
        } else {
239
            lldiv_t res = lldiv(arg0, arg1);
240
            env->LO[0][env->current_tc] = res.quot;
241
            env->HI[0][env->current_tc] = res.rem;
242
        }
236 243
    }
237 244
}
238 245

  

Also available in: Unified diff