comparison 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
comparison
equal deleted inserted replaced
559:6b248602ab84 560:f9431cb3a39c
357 } 357 }
358 } else { 358 } else {
359 opcode |= BIT_SIZE; 359 opcode |= BIT_SIZE;
360 } 360 }
361 *(out++) = opcode | dir; 361 *(out++) = opcode | dir;
362 *(out++) = MODE_REG_INDIRECT | base | (RSP << 3); 362 *(out++) = MODE_REG_INDIRECT | RSP | (reg << 3);
363 if (base == RSP) { 363 if (scale == 4) {
364 if (scale == 4) { 364 scale = 3;
365 scale = 3; 365 }
366 } 366 *(out++) = scale << 6 | (index << 3) | base;
367 *(out++) = scale << 6 | (index << 3) | base;
368 }
369 return out; 367 return out;
370 } 368 }
371 369
372 uint8_t * x86_r_size(uint8_t * out, uint8_t opcode, uint8_t opex, uint8_t dst, uint8_t size) 370 uint8_t * x86_r_size(uint8_t * out, uint8_t opcode, uint8_t opex, uint8_t dst, uint8_t size)
373 { 371 {