Mercurial > repos > blastem
changeset 254:64feb6b67244
Fix bug in end condition inside translate_z80_stream.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 29 Apr 2013 22:37:47 -0700 |
parents | 3b34deba4ca0 |
children | 572b935dd030 |
files | z80_to_x86.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/z80_to_x86.c Mon Apr 29 22:32:21 2013 -0700 +++ b/z80_to_x86.c Mon Apr 29 22:37:47 2013 -0700 @@ -1290,14 +1290,14 @@ } else { z80_map_native_address(context, address, dst, after-inst, ZMAX_NATIVE_SIZE); opts->code_end = dst+ZMAX_NATIVE_SIZE; - if(!(instbuf.op == Z80_RET || instbuf.op == Z80_RETI || instbuf.op == Z80_RETN || instbuf.op == Z80_JP || (instbuf.op = Z80_NOP && instbuf.immed == 42))) { + if(!(instbuf.op == Z80_RET || instbuf.op == Z80_RETI || instbuf.op == Z80_RETN || instbuf.op == Z80_JP || (instbuf.op == Z80_NOP && instbuf.immed == 42))) { jmp(native_end, z80_get_native_address(context, address + after-inst)); } return dst; } } else { dst = translate_z80inst(&instbuf, orig_start, context, address); - if(!(instbuf.op == Z80_RET || instbuf.op == Z80_RETI || instbuf.op == Z80_RETN || instbuf.op == Z80_JP || (instbuf.op = Z80_NOP && instbuf.immed == 42))) { + if(!(instbuf.op == Z80_RET || instbuf.op == Z80_RETI || instbuf.op == Z80_RETN || instbuf.op == Z80_JP || (instbuf.op == Z80_NOP && instbuf.immed == 42))) { dst = jmp(dst, z80_get_native_address(context, address + after-inst)); } return orig_start; @@ -1367,7 +1367,7 @@ opts->cur_code = after; address += next-encoded; encoded = next; - } while (!(inst.op == Z80_RET || inst.op == Z80_RETI || inst.op == Z80_RETN || inst.op == Z80_JP || (inst.op = Z80_NOP && inst.immed == 42))); + } while (!(inst.op == Z80_RET || inst.op == Z80_RETI || inst.op == Z80_RETN || inst.op == Z80_JP || (inst.op == Z80_NOP && inst.immed == 42))); process_deferred(&opts->deferred, context, (native_addr_func)z80_get_native_address); if (opts->deferred) { address = opts->deferred->address;