summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--z80_to_x86.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/z80_to_x86.c b/z80_to_x86.c
index bef749f..6d33c14 100644
--- a/z80_to_x86.c
+++ b/z80_to_x86.c
@@ -81,6 +81,9 @@ void translate_z80_reg(z80inst * inst, host_ea * ea, z80_options * opts)
void z80_save_reg(z80inst * inst, z80_options * opts)
{
code_info *code = &opts->gen.code;
+ if (inst->reg == Z80_USE_IMMED || inst->reg == Z80_UNUSED) {
+ return;
+ }
if (inst->reg == Z80_IYH) {
if ((inst->addr_mode & 0x1F) == Z80_REG && inst->ea_reg == Z80_IYL) {
ror_ir(code, 8, opts->regs[Z80_IY], SZ_W);