Mercurial > repos > blastem
comparison m68k_core_x86.c @ 1274:779920729249
Forgot to update flags in the "good" case of the new divu code
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 09 Mar 2017 21:31:31 -0800 |
parents | 462d9770d467 |
children | 2d8b9d40f5ea |
comparison
equal
deleted
inserted
replaced
1273:6dedaa645843 | 1274:779920729249 |
---|---|
1781 call(code, opts->gen.save_context); | 1781 call(code, opts->gen.save_context); |
1782 push_r(code, opts->gen.context_reg); | 1782 push_r(code, opts->gen.context_reg); |
1783 //TODO: inline the functionality of divu so we don't need to dump context to memory | 1783 //TODO: inline the functionality of divu so we don't need to dump context to memory |
1784 call_args(code, (code_ptr)divu, 3, opts->gen.scratch2, opts->gen.context_reg, opts->gen.scratch1); | 1784 call_args(code, (code_ptr)divu, 3, opts->gen.scratch2, opts->gen.context_reg, opts->gen.scratch1); |
1785 pop_r(code, opts->gen.context_reg); | 1785 pop_r(code, opts->gen.context_reg); |
1786 if (dst_op->mode == MODE_REG_DIRECT) { | 1786 mov_rr(code, RAX, opts->gen.scratch1, SZ_D); |
1787 mov_rr(code, RAX, opts->gen.scratch1, SZ_D); | 1787 |
1788 } else { | |
1789 mov_rrdisp(code, RAX, dst_op->base, dst_op->disp, SZ_D); | |
1790 } | |
1791 call(code, opts->gen.load_context); | 1788 call(code, opts->gen.load_context); |
1789 | |
1790 cmp_ir(code, 0, opts->gen.scratch1, SZ_W); | |
1791 update_flags(opts, V0|Z|N); | |
1792 | 1792 |
1793 if (dst_op->mode == MODE_REG_DIRECT) { | 1793 if (dst_op->mode == MODE_REG_DIRECT) { |
1794 mov_rr(code, opts->gen.scratch1, dst_op->base, SZ_D); | 1794 mov_rr(code, opts->gen.scratch1, dst_op->base, SZ_D); |
1795 } else { | |
1796 mov_rrdisp(code, RAX, dst_op->base, dst_op->disp, SZ_D); | |
1795 } | 1797 } |
1796 | 1798 |
1797 *end = code->cur - (end + 1); | 1799 *end = code->cur - (end + 1); |
1798 } | 1800 } |
1799 | 1801 |