# HG changeset patch # User Michael Pavone # Date 1502502228 25200 # Node ID 747c779fc13788e86af1d776a5d24c67a03986b6 # Parent 7e67f8a370517cd23ab8b39cd79a782980fe62da 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 diff -r 7e67f8a37051 -r 747c779fc137 m68k_core_x86.c --- a/m68k_core_x86.c Wed Aug 09 23:33:16 2017 -0700 +++ b/m68k_core_x86.c Fri Aug 11 18:43:48 2017 -0700 @@ -381,6 +381,11 @@ 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; }