quot = num / den;
rem = num % den;
flags = 0;
- if (PARAM1 && quot > 0xffff)
+ /* Avoid using a PARAM1 of zero. This breaks dyngen because it uses
+ the address of a symbol, and gcc knows symbols can't have address
+ zero. */
+ if (PARAM1 == 2 && quot > 0xffff)
flags |= CCF_V;
if (quot == 0)
flags |= CCF_Z;
quot = num / den;
rem = num % den;
flags = 0;
- if (PARAM1 && quot != (int16_t)quot)
+ if (PARAM1 == 2 && quot != (int16_t)quot)
flags |= CCF_V;
if (quot == 0)
flags |= CCF_Z;
den = gen_ea(s, insn, OS_LONG, 0, NULL);
gen_op_mov32(QREG_DIV2, den);
if (ext & 0x0800) {
- gen_op_divs(0);
+ gen_op_divs(2);
} else {
- gen_op_divu(0);
+ gen_op_divu(2);
}
if (num == reg) {
/* div */