From d9aae215542fb0ef28904f69448cdf56e6b04c2c Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Fri, 11 Aug 2017 18:43:48 -0700 Subject: Avoid generating an instruction that would require a REX prefix when a7 is used as a byte-wide source operand in 32-bit builds. Fixes a fatal error in Dragon's Fury when entering the option menu in a 32-bit build --- m68k_core_x86.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'm68k_core_x86.c') diff --git a/m68k_core_x86.c b/m68k_core_x86.c index 3137bd1..456e317 100644 --- a/m68k_core_x86.c +++ b/m68k_core_x86.c @@ -381,6 +381,11 @@ uint8_t translate_m68k_op(m68kinst * inst, host_ea * ea, m68k_options * opts, ui if (!dst && inst->dst.addr_mode == MODE_AREG && inst->extra.size == OPSIZE_WORD) { movsx_rr(code, reg, opts->gen.scratch1, SZ_W, SZ_D); ea->base = opts->gen.scratch1; +#ifdef X86_32 + } else if (reg > RBX && inst->extra.size == OPSIZE_BYTE) { + mov_rr(code, reg, opts->gen.scratch1, SZ_D); + ea->base = opts->gen.scratch1; +#endif } else { ea->base = reg; } -- cgit v1.2.3