comparison m68k_core_x86.c @ 1430:747c779fc137

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
author Michael Pavone <pavone@retrodev.com>
date Fri, 11 Aug 2017 18:43:48 -0700
parents b68732dcbf00
children aa945f1bdd71
comparison
equal deleted inserted replaced
1429:7e67f8a37051 1430:747c779fc137
379 if (reg >= 0) { 379 if (reg >= 0) {
380 ea->mode = MODE_REG_DIRECT; 380 ea->mode = MODE_REG_DIRECT;
381 if (!dst && inst->dst.addr_mode == MODE_AREG && inst->extra.size == OPSIZE_WORD) { 381 if (!dst && inst->dst.addr_mode == MODE_AREG && inst->extra.size == OPSIZE_WORD) {
382 movsx_rr(code, reg, opts->gen.scratch1, SZ_W, SZ_D); 382 movsx_rr(code, reg, opts->gen.scratch1, SZ_W, SZ_D);
383 ea->base = opts->gen.scratch1; 383 ea->base = opts->gen.scratch1;
384 #ifdef X86_32
385 } else if (reg > RBX && inst->extra.size == OPSIZE_BYTE) {
386 mov_rr(code, reg, opts->gen.scratch1, SZ_D);
387 ea->base = opts->gen.scratch1;
388 #endif
384 } else { 389 } else {
385 ea->base = reg; 390 ea->base = reg;
386 } 391 }
387 return 0; 392 return 0;
388 } 393 }