Commit 2d37be61e3a377843f4e8b8fcc837838294b8b3f

Authored by pbrook
1 parent 483dcf53

M68k build fix.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2212 c046a42c-6fe2-441c-8c8c-71466251a162
target-m68k/op.c
... ... @@ -412,7 +412,10 @@ OP(divu)
412 412 quot = num / den;
413 413 rem = num % den;
414 414 flags = 0;
415   - if (PARAM1 && quot > 0xffff)
  415 + /* Avoid using a PARAM1 of zero. This breaks dyngen because it uses
  416 + the address of a symbol, and gcc knows symbols can't have address
  417 + zero. */
  418 + if (PARAM1 == 2 && quot > 0xffff)
416 419 flags |= CCF_V;
417 420 if (quot == 0)
418 421 flags |= CCF_Z;
... ... @@ -439,7 +442,7 @@ OP(divs)
439 442 quot = num / den;
440 443 rem = num % den;
441 444 flags = 0;
442   - if (PARAM1 && quot != (int16_t)quot)
  445 + if (PARAM1 == 2 && quot != (int16_t)quot)
443 446 flags |= CCF_V;
444 447 if (quot == 0)
445 448 flags |= CCF_Z;
... ...
target-m68k/translate.c
... ... @@ -747,9 +747,9 @@ DISAS_INSN(divl)
747 747 den = gen_ea(s, insn, OS_LONG, 0, NULL);
748 748 gen_op_mov32(QREG_DIV2, den);
749 749 if (ext & 0x0800) {
750   - gen_op_divs(0);
  750 + gen_op_divs(2);
751 751 } else {
752   - gen_op_divu(0);
  752 + gen_op_divu(2);
753 753 }
754 754 if (num == reg) {
755 755 /* div */
... ...