changeset 715:1c2020d3e275

Call z80_handle_deferred after generating an insruction handler so that instructions like rst work correctly
author Michael Pavone <pavone@retrodev.com>
date Sun, 17 May 2015 19:14:41 -0700
parents e29bc2918f69
children b707a8ddc202
files z80_to_x86.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/z80_to_x86.c	Sun May 17 15:43:20 2015 -0700
+++ b/z80_to_x86.c	Sun May 17 19:14:41 2015 -0700
@@ -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 @@
 		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];
 }