Revision 76e050c2 target-mips/op.c

b/target-mips/op.c
206 206

  
207 207
    tmp = T0;
208 208
    T0 += T1;
209
    if ((T0 >> 31) ^ (T1 >> 31) ^ (tmp >> 31)) {
209
    if (((tmp ^ T1 ^ (-1)) & (T0 ^ T1)) >> 31) {
210
       /* operands of same sign, result different sign */
210 211
        CALL_FROM_TB1(do_raise_exception_direct, EXCP_OVERFLOW);
211 212
    }
212 213
    RETURN();
......
224 225

  
225 226
    tmp = T0;
226 227
    T0 = (int32_t)T0 - (int32_t)T1;
227
    if (!((T0 >> 31) ^ (T1 >> 31) ^ (tmp >> 31))) {
228
    if (((tmp ^ T1) & (tmp ^ T0)) >> 31) {
229
       /* operands of different sign, first operand and result different sign */
228 230
        CALL_FROM_TB1(do_raise_exception_direct, EXCP_OVERFLOW);
229 231
    }
230 232
    RETURN();

Also available in: Unified diff