From e51040f08071327061219caa1c54d3dcb346b1c7 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 17 May 2015 19:14:41 -0700 Subject: Call z80_handle_deferred after generating an insruction handler so that instructions like rst work correctly --- z80_to_x86.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'z80_to_x86.c') diff --git a/z80_to_x86.c b/z80_to_x86.c index 1f8d477..bef749f 100644 --- a/z80_to_x86.c +++ b/z80_to_x86.c @@ -23,6 +23,7 @@ #endif uint32_t zbreakpoint_patch(z80_context * context, uint16_t address, code_ptr dst); +void z80_handle_deferred(z80_context * context); uint8_t z80_size(z80inst * inst) { @@ -1653,6 +1654,7 @@ uint8_t * z80_interp_handler(uint8_t opcode, z80_context * context) add_ir(code, after - codebuf, opts->gen.scratch1, SZ_W); call(code, opts->native_addr); jmp_r(code, opts->gen.scratch1); + z80_handle_deferred(context); } return context->interp_code[opcode]; } -- cgit v1.2.3