for(i=0;i<(1<<p->insn_shift);i++) {
orc_x86_emit_mov_memoffset_reg (p, 4, offset + 4*i, p->exec_reg, X86_EAX);
- orc_sse_emit_sysinsn_load_memoffset (p, ORC_X86_imul_rm, 0,
+ orc_sse_emit_sysinsn_load_memoffset (p, ORC_X86_imul_rm, 4, 0,
offset + 16 + 4*i, p->exec_reg, -1);
orc_x86_emit_mov_reg_memoffset (p, 4, X86_EDX, offset + 4*i, p->exec_reg);
}
void
orc_sse_set_mxcsr (OrcCompiler *compiler)
{
- orc_sse_emit_sysinsn_load_memoffset (compiler, ORC_X86_stmxcsr, 0,
+ orc_sse_emit_sysinsn_load_memoffset (compiler, ORC_X86_stmxcsr, 4, 0,
(int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]),
- compiler->exec_reg, -1);
+ compiler->exec_reg, 0);
orc_x86_emit_mov_memoffset_reg (compiler, 4,
(int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]),
(int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_C1]),
compiler->exec_reg);
- orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_or_imm32_rm,
+ orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_or_imm32_rm, 4,
0x8040, compiler->gp_tmpreg);
orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg,
(int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]),
compiler->exec_reg);
- orc_sse_emit_sysinsn_load_memoffset (compiler, ORC_X86_ldmxcsr, 0,
+ orc_sse_emit_sysinsn_load_memoffset (compiler, ORC_X86_ldmxcsr, 4, 0,
(int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]),
- compiler->exec_reg, -1);
+ compiler->exec_reg, 0);
}
void
orc_sse_restore_mxcsr (OrcCompiler *compiler)
{
- orc_sse_emit_sysinsn_load_memoffset (compiler, ORC_X86_ldmxcsr, 0,
+ orc_sse_emit_sysinsn_load_memoffset (compiler, ORC_X86_ldmxcsr, 4, 0,
(int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]),
- compiler->exec_reg, -1);
+ compiler->exec_reg, 0);
}
void orc_sse_emit_sysinsn (OrcCompiler *p, int opcode, int src, int dest,
int imm);
-void orc_sse_emit_sysinsn_load_memoffset (OrcCompiler *p, int index, int offset,
- int src, int dest, int imm);
-void orc_sse_emit_sysinsn_store_memoffset (OrcCompiler *p, int index, int src,
- int offset, int dest, int imm);
-void orc_sse_emit_sysinsn_load_memindex (OrcCompiler *p, int index, int imm,
- int offset, int src, int src_index, int shift, int dest);
+void orc_sse_emit_sysinsn_load_memoffset (OrcCompiler *p, int size, int index,
+ int offset, int src, int dest, int imm);
+void orc_sse_emit_sysinsn_store_memoffset (OrcCompiler *p, int size, int index,
+ int src, int offset, int dest, int imm);
+void orc_sse_emit_sysinsn_load_memindex (OrcCompiler *p, int index, int size,
+ int imm, int offset, int src, int src_index, int shift, int dest);
void orc_sse_emit_sysinsn_load_register (OrcCompiler *p, int index, int imm,
int src, int dest);
-void orc_sse_emit_sysinsn_imm_reg (OrcCompiler *p, int index, int imm,
+void orc_sse_emit_sysinsn_imm_reg (OrcCompiler *p, int index, int size, int imm,
int dest);
-void orc_sse_emit_sysinsn_imm_memoffset (OrcCompiler *p, int index, int imm,
- int offset, int dest);
+void orc_sse_emit_sysinsn_imm_memoffset (OrcCompiler *p, int index, int size,
+ int imm, int offset, int dest);
void orc_sse_emit_sysinsn_reg_memoffset (OrcCompiler *p, int index, int src,
int offset, int dest);
-void orc_sse_emit_sysinsn_memoffset_reg (OrcCompiler *p, int index, int offset,
- int src, int dest);
+void orc_sse_emit_sysinsn_memoffset_reg (OrcCompiler *p, int index, int size,
+ int offset, int src, int dest);
void orc_sse_emit_sysinsn_branch (OrcCompiler *p, int index, int label);
void orc_sse_emit_sysinsn_label (OrcCompiler *p, int index, int label);
void orc_sse_emit_sysinsn_none (OrcCompiler *p, int index);
}
}
+const char *
+orc_x86_get_regname_size(int i, int size)
+{
+ switch (size) {
+ case 1:
+ return orc_x86_get_regname_8 (i);
+ case 2:
+ return orc_x86_get_regname_16 (i);
+ case 4:
+ return orc_x86_get_regname (i);
+ case 8:
+ return orc_x86_get_regname_64 (i);
+ }
+ return NULL;
+}
+
void
orc_x86_emit_push (OrcCompiler *compiler, int size, int reg)
{
switch (size) {
case 1:
- orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_movzx_rm_r, offset, reg1, reg2);
+ orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_movzx_rm_r, 4, offset, reg1, reg2);
return;
case 2:
- orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_movw_rm_r, offset, reg1, reg2);
+ orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_movw_rm_r, size, offset, reg1, reg2);
break;
case 4:
- orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_movl_rm_r, offset, reg1, reg2);
+ orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_movl_rm_r, size, offset, reg1, reg2);
break;
case 8:
- orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_mov_rm_r, offset, reg1, reg2);
+ orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_mov_rm_r, size, offset, reg1, reg2);
break;
default:
ORC_COMPILER_ERROR(compiler, "bad size");
void
orc_x86_emit_mov_imm_reg (OrcCompiler *compiler, int size, int value, int reg1)
{
- orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_mov_imm32_r, value, reg1);
+ orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_mov_imm32_r, 4, value, reg1);
}
void orc_x86_emit_mov_reg_reg (OrcCompiler *compiler, int size, int reg1, int reg2)
if (value == 0) return;
if (value == 1) {
- orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_sar, value, reg);
+ orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_sar, 4, value, reg);
} else {
- orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_sar_imm, value, reg);
+ orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_sar_imm, 4, value, reg);
}
}
int offset, int reg)
{
if (value >= -128 && value < 128) {
- orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_and_imm8_rm,
+ orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_and_imm8_rm, size,
value, offset, reg);
} else {
- orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_and_imm32_rm,
+ orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_and_imm32_rm, size,
value, offset, reg);
}
}
orc_x86_emit_and_imm_reg (OrcCompiler *compiler, int size, int value, int reg)
{
if (value >= -128 && value < 128) {
- orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_and_imm8_rm, value, reg);
+ orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_and_imm8_rm, size, value, reg);
} else {
- orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_and_imm32_rm, value, reg);
+ orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_and_imm32_rm, size, value, reg);
}
}
int offset, int reg)
{
if (value >= -128 && value < 128) {
- orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_add_imm8_rm,
+ orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_add_imm8_rm, size,
value, offset, reg);
} else {
- orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_add_imm32_rm,
+ orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_add_imm32_rm, size,
value, offset, reg);
}
}
{
if (!record) {
if (size == 4 && !compiler->is_64bit) {
- orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_leal,
+ orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_leal, size,
value, reg, reg);
return;
}
if (size == 8 && compiler->is_64bit) {
- orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_leaq,
+ orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_leaq, size,
value, reg, reg);
return;
}
}
if (value >= -128 && value < 128) {
- orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_add_imm8_rm,
+ orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_add_imm8_rm, size,
value, reg);
} else {
- orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_add_imm32_rm,
+ orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_add_imm32_rm, size,
value, reg);
}
}
int reg2, int shift)
{
if (size == 4) {
- orc_sse_emit_sysinsn_load_memindex (compiler, ORC_X86_leal, 0,
+ orc_sse_emit_sysinsn_load_memindex (compiler, ORC_X86_leal, size, 0,
0, reg2, reg1, shift, reg2);
} else {
- orc_sse_emit_sysinsn_load_memindex (compiler, ORC_X86_leaq, 0,
+ orc_sse_emit_sysinsn_load_memindex (compiler, ORC_X86_leaq, size, 0,
0, reg2, reg1, shift, reg2);
}
}
orc_x86_emit_imul_memoffset_reg (OrcCompiler *compiler, int size,
int offset, int reg, int destreg)
{
- orc_sse_emit_sysinsn_load_memoffset (compiler, ORC_X86_imul_rm_r, 0,
+ orc_sse_emit_sysinsn_load_memoffset (compiler, ORC_X86_imul_rm_r, size, 0,
offset, reg, destreg);
}
orc_x86_emit_add_memoffset_reg (OrcCompiler *compiler, int size,
int offset, int reg, int destreg)
{
- orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_add_rm_r,
+ orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_add_rm_r, size,
offset, reg, destreg);
}
orc_x86_emit_sub_memoffset_reg (OrcCompiler *compiler, int size,
int offset, int reg, int destreg)
{
- orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_sub_rm_r,
+ orc_sse_emit_sysinsn_memoffset_reg (compiler, ORC_X86_sub_rm_r, size,
offset, reg, destreg);
}
orc_x86_emit_cmp_imm_reg (OrcCompiler *compiler, int size, int value, int reg)
{
if (value >= -128 && value < 128) {
- orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_cmp_imm8_rm, value, reg);
+ orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_cmp_imm8_rm, size, value, reg);
} else {
- orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_cmp_imm32_rm, value, reg);
+ orc_sse_emit_sysinsn_imm_reg (compiler, ORC_X86_cmp_imm32_rm, size, value, reg);
}
}
int offset, int reg)
{
if (value >= -128 && value < 128) {
- orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_cmp_imm8_rm, value, offset, reg);
+ orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_cmp_imm8_rm, size,
+ value, offset, reg);
} else {
- orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_cmp_imm32_rm, value, offset, reg);
+ orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_cmp_imm32_rm, size,
+ value, offset, reg);
}
}
orc_x86_emit_test_imm_memoffset (OrcCompiler *compiler, int size, int value,
int offset, int reg)
{
- orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_test_imm, value, offset, reg);
+ orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_test_imm, size,
+ value, offset, reg);
}
void
int offset, int reg)
{
if (size == 4) {
- orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_add_imm8_rm,
+ orc_sse_emit_sysinsn_imm_memoffset (compiler, ORC_X86_add_imm8_rm, size,
-1, offset, reg);
} else {
- orc_sse_emit_sysinsn_load_memoffset (compiler, ORC_X86_dec,
+ orc_sse_emit_sysinsn_load_memoffset (compiler, ORC_X86_dec, size,
0, offset, reg, -1);
}
}
const char * orc_x86_get_regname_16(int i);
const char * orc_x86_get_regname_64(int i);
const char * orc_x86_get_regname_ptr(OrcCompiler *compiler, int i);
+const char * orc_x86_get_regname_size(int i, int size);
void orc_x86_emit_push (OrcCompiler *compiler, int size, int reg);
void orc_x86_emit_pop (OrcCompiler *compiler, int size, int reg);
ORC_ASSERT(opcode->code != 0);
if (opcode->code & 0xff000000) {
- *p->codeptr++ = (opcode->code >> 24) & 0xff;
- orc_x86_emit_rex (p, size, dest, 0, 0);
+ if ((opcode->code & 0xff000000) == 0x66000000 ||
+ (opcode->code & 0xff000000) == 0xf3000000) {
+ *p->codeptr++ = (opcode->code >> 24) & 0xff;
+ orc_x86_emit_rex (p, size, dest, 0, src);
+ } else {
+ *p->codeptr++ = (opcode->code >> 24) & 0xff;
+ orc_x86_emit_rex (p, size, dest, 0, src);
+ }
*p->codeptr++ = (opcode->code >> 16) & 0xff;
*p->codeptr++ = (opcode->code >> 8) & 0xff;
*p->codeptr++ = (opcode->code >> 0) & 0xff;
} else if (opcode->code & 0xff0000) {
- *p->codeptr++ = (opcode->code >> 16) & 0xff;
- orc_x86_emit_rex (p, size, dest, 0, 0);
+ if ((opcode->code & 0xff0000) == 0x660000 ||
+ (opcode->code & 0xff0000) == 0xf30000) {
+ *p->codeptr++ = (opcode->code >> 16) & 0xff;
+ orc_x86_emit_rex (p, size, dest, 0, src);
+ } else {
+ orc_x86_emit_rex (p, size, dest, 0, src);
+ *p->codeptr++ = (opcode->code >> 16) & 0xff;
+ }
*p->codeptr++ = (opcode->code >> 8) & 0xff;
*p->codeptr++ = (opcode->code >> 0) & 0xff;
} else if (opcode->code & 0xff00) {
- *p->codeptr++ = (opcode->code >> 8) & 0xff;
- orc_x86_emit_rex (p, size, dest, 0, 0);
+ if ((opcode->code & 0xff00) == 0x6600 ||
+ (opcode->code & 0xff00) == 0xf300) {
+ *p->codeptr++ = (opcode->code >> 8) & 0xff;
+ orc_x86_emit_rex (p, size, dest, 0, src);
+ } else {
+ orc_x86_emit_rex (p, size, dest, 0, src);
+ *p->codeptr++ = (opcode->code >> 8) & 0xff;
+ }
*p->codeptr++ = (opcode->code >> 0) & 0xff;
} else {
- orc_x86_emit_rex (p, size, dest, 0, 0);
+ orc_x86_emit_rex (p, size, dest, 0, src);
*p->codeptr++ = (opcode->code >> 0) & 0xff;
}
}
break;
}
- if (opcode->type != ORC_X86_INSN_TYPE_STACK) {
+ if (opcode->type == ORC_X86_INSN_TYPE_SHIFTIMM) {
+ output_opcode (p, opcode, 4, dest, 0);
+ } else if (opcode->type != ORC_X86_INSN_TYPE_STACK) {
output_opcode (p, opcode, 4, src, dest);
}
}
void
-orc_sse_emit_sysinsn_load_memoffset (OrcCompiler *p, int index, int imm, int offset,
- int src, int dest)
+orc_sse_emit_sysinsn_load_memoffset (OrcCompiler *p, int index, int size,
+ int imm, int offset, int src, int dest)
{
const OrcSysOpcode *opcode = orc_x86_opcodes + index;
case ORC_X86_INSN_TYPE_rm_r:
ORC_ASM_CODE(p," %s %d(%%%s), %%%s\n", opcode->name,
offset, orc_x86_get_regname_ptr(p, src),
- orc_x86_get_regname(src));
+ orc_x86_get_regname_size(src,size));
break;
default:
ORC_ASSERT(0);
break;
}
- output_opcode (p, opcode, 4, src, dest);
+ output_opcode (p, opcode, size, src, dest);
switch (opcode->type) {
case ORC_X86_INSN_TYPE_SD:
}
void
-orc_sse_emit_sysinsn_store_memoffset (OrcCompiler *p, int index, int imm, int offset,
- int src, int dest)
+orc_sse_emit_sysinsn_store_memoffset (OrcCompiler *p, int index, int size,
+ int imm, int offset, int src, int dest)
{
const OrcSysOpcode *opcode = orc_x86_opcodes + index;
}
void
-orc_sse_emit_sysinsn_load_memindex (OrcCompiler *p, int index, int imm,
- int offset, int src, int src_index, int shift, int dest)
+orc_sse_emit_sysinsn_load_memindex (OrcCompiler *p, int index, int size,
+ int imm, int offset, int src, int src_index, int shift, int dest)
{
const OrcSysOpcode *opcode = orc_x86_opcodes + index;
offset,
orc_x86_get_regname_ptr(p, src),
orc_x86_get_regname_ptr(p, src_index), 1<<shift,
- orc_x86_get_regname(dest));
+ orc_x86_get_regname_size(dest,size));
break;
default:
ORC_ASSERT(0);
break;
}
- output_opcode (p, opcode, 4, src, dest);
+ output_opcode (p, opcode, size, src, dest);
switch (opcode->type) {
case ORC_X86_INSN_TYPE_SD:
}
void
-orc_sse_emit_sysinsn_imm_reg (OrcCompiler *p, int index, int imm, int dest)
+orc_sse_emit_sysinsn_imm_reg (OrcCompiler *p, int index, int size, int imm,
+ int dest)
{
const OrcSysOpcode *opcode = orc_x86_opcodes + index;
- int size = 4;
switch (opcode->type) {
case ORC_X86_INSN_TYPE_imm8_rm:
}
if (opcode->type != ORC_X86_INSN_TYPE_mov_imm32) {
- output_opcode (p, opcode, size, 0, dest);
+ output_opcode (p, opcode, size, dest, 0);
}
switch (opcode->type) {
}
void
-orc_sse_emit_sysinsn_imm_memoffset (OrcCompiler *p, int index, int imm,
- int offset, int dest)
+orc_sse_emit_sysinsn_imm_memoffset (OrcCompiler *p, int index, int size,
+ int imm, int offset, int dest)
{
const OrcSysOpcode *opcode = orc_x86_opcodes + index;
- int size = 4;
switch (opcode->type) {
case ORC_X86_INSN_TYPE_imm8_rm:
case ORC_X86_INSN_TYPE_imm32_rm:
- if (size == 4) {
- ORC_ASM_CODE(p," %s $%d, %d(%%%s)\n", opcode->name,
- imm, offset,
- orc_x86_get_regname(dest));
- } else {
- ORC_ASM_CODE(p," %s $%d, %d(%%%s)\n", opcode->name,
- imm, offset,
- orc_x86_get_regname_64(dest));
- }
+ ORC_ASM_CODE(p," %s $%d, %d(%%%s)\n", opcode->name,
+ imm, offset,
+ orc_x86_get_regname_ptr(p,dest));
break;
default:
ORC_ASSERT(0);
break;
}
- output_opcode (p, opcode, size, 0, dest);
+ output_opcode (p, opcode, size, dest, 0);
switch (opcode->type) {
case ORC_X86_INSN_TYPE_imm8_rm:
if (size == 4) {
ORC_ASM_CODE(p," %s %%%s, %d(%%%s)\n", opcode->name,
orc_x86_get_regname(src), offset,
- orc_x86_get_regname(dest));
+ orc_x86_get_regname_ptr(p,dest));
} else {
ORC_ASM_CODE(p," %s %%%s, %d(%%%s)\n", opcode->name,
- orc_x86_get_regname(src), offset,
- orc_x86_get_regname_64(dest));
+ orc_x86_get_regname_64(src), offset,
+ orc_x86_get_regname_ptr(p,dest));
}
break;
case ORC_X86_INSN_TYPE_r_rm_byte:
ORC_ASM_CODE(p," %s %%%s, %d(%%%s)\n", opcode->name,
orc_x86_get_regname_8(src), offset,
- orc_x86_get_regname(dest));
+ orc_x86_get_regname_ptr(p,dest));
break;
case ORC_X86_INSN_TYPE_r_rm_word:
ORC_ASM_CODE(p," %s %%%s, %d(%%%s)\n", opcode->name,
orc_x86_get_regname_16(src), offset,
- orc_x86_get_regname(dest));
+ orc_x86_get_regname_ptr(p,dest));
break;
default:
ORC_ASSERT(0);
}
void
-orc_sse_emit_sysinsn_memoffset_reg (OrcCompiler *p, int index, int offset,
- int src, int dest)
+orc_sse_emit_sysinsn_memoffset_reg (OrcCompiler *p, int index, int size,
+ int offset, int src, int dest)
{
const OrcSysOpcode *opcode = orc_x86_opcodes + index;
- int size = 4;
switch (opcode->type) {
case ORC_X86_INSN_TYPE_rm_r:
- if (size == 4) {
- ORC_ASM_CODE(p," %s %d(%%%s), %%%s\n", opcode->name,
- offset, orc_x86_get_regname(src),
- orc_x86_get_regname(dest));
- } else {
- ORC_ASM_CODE(p," %s %d(%%%s), %%%s\n", opcode->name,
- offset, orc_x86_get_regname(src),
- orc_x86_get_regname_64(dest));
- }
+ ORC_ASM_CODE(p," %s %d(%%%s), %%%s\n", opcode->name,
+ offset, orc_x86_get_regname_ptr(p,src),
+ orc_x86_get_regname_size(dest,size));
break;
default:
ORC_ASSERT(0);
#define orc_sse_emit_palignr(p,imm,a,b) orc_sse_emit_sysinsn(p, ORC_X86_psalignr, imm, a, b)
#define orc_sse_emit_movdqu(p,offset,a,b) orc_sse_emit_sysinsn(p, ORC_X86_movdqu_load, 0, a, b)
-#define orc_sse_emit_pinsrw_memoffset(p,imm,offset,a,b) orc_sse_emit_sysinsn_load_memoffset(p, ORC_X86_pinsrw, imm, offset, a, b)
-#define orc_sse_emit_movd_load_memoffset(p,offset,a,b) orc_sse_emit_sysinsn_load_memoffset(p, ORC_X86_movd_load, 0, offset, a, b)
-#define orc_sse_emit_movq_load_memoffset(p,offset,a,b) orc_sse_emit_sysinsn_load_memoffset(p, ORC_X86_movq_load, 0, offset, a, b)
-#define orc_sse_emit_movdqa_load_memoffset(p,offset,a,b) orc_sse_emit_sysinsn_load_memoffset(p, ORC_X86_movdqa_load, 0, offset, a, b)
-#define orc_sse_emit_movdqu_load_memoffset(p,offset,a,b) orc_sse_emit_sysinsn_load_memoffset(p, ORC_X86_movdqu_load, 0, offset, a, b)
-#define orc_sse_emit_movhps_load_memoffset(p,offset,a,b) orc_sse_emit_sysinsn_load_memoffset(p, ORC_X86_movhps_load, 0, offset, a, b)
+#define orc_sse_emit_pinsrw_memoffset(p,imm,offset,a,b) orc_sse_emit_sysinsn_load_memoffset(p, ORC_X86_pinsrw, 4, imm, offset, a, b)
+#define orc_sse_emit_movd_load_memoffset(p,offset,a,b) orc_sse_emit_sysinsn_load_memoffset(p, ORC_X86_movd_load, 4, 0, offset, a, b)
+#define orc_sse_emit_movq_load_memoffset(p,offset,a,b) orc_sse_emit_sysinsn_load_memoffset(p, ORC_X86_movq_load, 4, 0, offset, a, b)
+#define orc_sse_emit_movdqa_load_memoffset(p,offset,a,b) orc_sse_emit_sysinsn_load_memoffset(p, ORC_X86_movdqa_load, 4, 0, offset, a, b)
+#define orc_sse_emit_movdqu_load_memoffset(p,offset,a,b) orc_sse_emit_sysinsn_load_memoffset(p, ORC_X86_movdqu_load, 4, 0, offset, a, b)
+#define orc_sse_emit_movhps_load_memoffset(p,offset,a,b) orc_sse_emit_sysinsn_load_memoffset(p, ORC_X86_movhps_load, 4, 0, offset, a, b)
-#define orc_sse_emit_pextrw_memoffset(p,imm,a,offset,b) orc_sse_emit_sysinsn_store_memoffset(p, ORC_X86_pextrw, imm, a, offset, b)
-#define orc_sse_emit_movd_store_memoffset(p,a,offset,b) orc_sse_emit_sysinsn_store_memoffset(p, ORC_X86_movd_store, 0, a, offset, b)
-#define orc_sse_emit_movq_store_memoffset(p,a,offset,b) orc_sse_emit_sysinsn_store_memoffset(p, ORC_X86_movq_store, 0, a, offset, b)
-#define orc_sse_emit_movdqa_store_memoffset(p,a,offset,b) orc_sse_emit_sysinsn_store_memoffset(p, ORC_X86_movdqa_store, 0, a, offset, b)
-#define orc_sse_emit_movdqu_store_memoffset(p,a,offset,b) orc_sse_emit_sysinsn_store_memoffset(p, ORC_X86_movdqu_store, 0, a, offset, b)
-#define orc_sse_emit_movntdq_store_memoffset(p,a,offset,b) orc_sse_emit_sysinsn_store_memoffset(p, ORC_X86_movntdq_store, 0, a, offset, b)
+#define orc_sse_emit_pextrw_memoffset(p,imm,a,offset,b) orc_sse_emit_sysinsn_store_memoffset(p, ORC_X86_pextrw, 16, imm, a, offset, b)
+#define orc_sse_emit_movd_store_memoffset(p,a,offset,b) orc_sse_emit_sysinsn_store_memoffset(p, ORC_X86_movd_store, 16, 0, a, offset, b)
+#define orc_sse_emit_movq_store_memoffset(p,a,offset,b) orc_sse_emit_sysinsn_store_memoffset(p, ORC_X86_movq_store, 16, 0, a, offset, b)
+#define orc_sse_emit_movdqa_store_memoffset(p,a,offset,b) orc_sse_emit_sysinsn_store_memoffset(p, ORC_X86_movdqa_store, 16, 0, a, offset, b)
+#define orc_sse_emit_movdqu_store_memoffset(p,a,offset,b) orc_sse_emit_sysinsn_store_memoffset(p, ORC_X86_movdqu_store, 16, 0, a, offset, b)
+#define orc_sse_emit_movntdq_store_memoffset(p,a,offset,b) orc_sse_emit_sysinsn_store_memoffset(p, ORC_X86_movntdq_store, 16, 0, a, offset, b)
-#define orc_sse_emit_pinsrw_memindex(p,imm,offset,a,a_index,shift,b) orc_sse_emit_sysinsn_load_memindex(p, ORC_X86_pinsrw, imm, offset, a, a_index, shift, b)
-#define orc_sse_emit_movd_load_memindex(p,offset,a,a_index,shift,b) orc_sse_emit_sysinsn_load_memindex(p, ORC_X86_movd_load, 0, offset, a, a_index, shift, b)
-#define orc_sse_emit_movq_load_memindex(p,offset,a,a_index,shift,b) orc_sse_emit_sysinsn_load_memindex(p, ORC_X86_movq_load, 0, offset, a, a_index, shift, b)
-#define orc_sse_emit_movdqa_load_memindex(p,offset,a,a_index,shift,b) orc_sse_emit_sysinsn_load_memindex(p, ORC_X86_movdqa_load, 0, offset, a, a_index, shift, b)
-#define orc_sse_emit_movdqu_load_memindex(p,offset,a,a_index,shift,b) orc_sse_emit_sysinsn_load_memindex(p, ORC_X86_movdqu_load, 0, offset, a, a_index, shift, b)
-#define orc_sse_emit_movhps_load_memindex(p,offset,a,a_index,shift,b) orc_sse_emit_sysinsn_load_memindex(p, ORC_X86_movhps_load, 0, offset, a, a_index, shift, b)
+#define orc_sse_emit_pinsrw_memindex(p,imm,offset,a,a_index,shift,b) orc_sse_emit_sysinsn_load_memindex(p, ORC_X86_pinsrw, 4, imm, offset, a, a_index, shift, b)
+#define orc_sse_emit_movd_load_memindex(p,offset,a,a_index,shift,b) orc_sse_emit_sysinsn_load_memindex(p, ORC_X86_movd_load, 4, 0, offset, a, a_index, shift, b)
+#define orc_sse_emit_movq_load_memindex(p,offset,a,a_index,shift,b) orc_sse_emit_sysinsn_load_memindex(p, ORC_X86_movq_load, 4, 0, offset, a, a_index, shift, b)
+#define orc_sse_emit_movdqa_load_memindex(p,offset,a,a_index,shift,b) orc_sse_emit_sysinsn_load_memindex(p, ORC_X86_movdqa_load, 4, 0, offset, a, a_index, shift, b)
+#define orc_sse_emit_movdqu_load_memindex(p,offset,a,a_index,shift,b) orc_sse_emit_sysinsn_load_memindex(p, ORC_X86_movdqu_load, 4, 0, offset, a, a_index, shift, b)
+#define orc_sse_emit_movhps_load_memindex(p,offset,a,a_index,shift,b) orc_sse_emit_sysinsn_load_memindex(p, ORC_X86_movhps_load, 4, 0, offset, a, a_index, shift, b)
#define orc_sse_emit_pextrw_memindex(p,imm,a,offset,b,b_index,shift) orc_sse_emit_sysinsn_store_memindex(p, ORC_X86_pextrw, imm, a, offset, b, b_index, shift)
#define orc_sse_emit_movd_store_memindex(p,a,offset,b,b_index,shift) orc_sse_emit_sysinsn_store_memindex(p, ORC_X86_movd_store, 0, a, offset, b, b_index, shift)