Mercurial > repos > blastem
diff gen_x86.c @ 560:f9431cb3a39c
Fix x86_rrindex_sizedir. Pass the correct scale to mov_rindexr in gen_mem_fun. BlastEm now sort of works on OS X. Runs reliably from lldb, but only intermittently from the shell
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 23 Jun 2014 11:05:55 -0400 |
parents | 96489fb27dbf |
children | 7ed1dbb48f61 |
line wrap: on
line diff
--- a/gen_x86.c Tue Jun 17 01:50:29 2014 -0400 +++ b/gen_x86.c Mon Jun 23 11:05:55 2014 -0400 @@ -359,13 +359,11 @@ opcode |= BIT_SIZE; } *(out++) = opcode | dir; - *(out++) = MODE_REG_INDIRECT | base | (RSP << 3); - if (base == RSP) { - if (scale == 4) { - scale = 3; - } - *(out++) = scale << 6 | (index << 3) | base; + *(out++) = MODE_REG_INDIRECT | RSP | (reg << 3); + if (scale == 4) { + scale = 3; } + *(out++) = scale << 6 | (index << 3) | base; return out; }