"int Sx_grd = GET_DSP_GRD (x);",
"",
"res = Sx - 0x10000;",
- "carry = res > Sx;",
+ "carry = Sx < (INT_MIN + 0x10000);",
"res_grd = Sx_grd - carry;",
"COMPUTE_OVERFLOW;",
"ADD_SUB_GE;",
"int Sx_grd = GET_DSP_GRD (x);",
"",
"res = Sx + 0x10000;",
- "carry = res < Sx;",
+ "carry = Sx > (INT_MAX - 0x10000);",
"res_grd = Sx_grd + carry;",
"COMPUTE_OVERFLOW;",
"ADD_SUB_GE;",
"int Sy_grd = SIGN32 (Sy);",
"",
"res = Sy - 0x10000;",
- "carry = res > Sy;",
+ "carry = Sy < (INT_MIN + 0x10000);",
"res_grd = Sy_grd - carry;",
"COMPUTE_OVERFLOW;",
"ADD_SUB_GE;",
"int Sy_grd = SIGN32 (Sy);",
"",
"res = Sy + 0x10000;",
- "carry = res < Sy;",
+ "carry = Sy > (INT_MAX - 0x10000);",
"res_grd = Sy_grd + carry;",
"COMPUTE_OVERFLOW;",
"ADD_SUB_GE;",