void orc_sse_set_mxcsr (OrcCompiler *compiler) { orc_x86_emit_cpuinsn_load_memoffset (compiler, ORC_X86_stmxcsr, 4, 0, (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]), compiler->exec_reg, 0); orc_x86_emit_mov_memoffset_reg (compiler, 4, (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]), compiler->exec_reg, compiler->gp_tmpreg); orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_C1]), compiler->exec_reg); orc_x86_emit_cpuinsn_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_x86_emit_cpuinsn_load_memoffset (compiler, ORC_X86_ldmxcsr, 4, 0, (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]), compiler->exec_reg, 0); }
void orc_sse_restore_mxcsr (OrcCompiler *compiler) { orc_x86_emit_cpuinsn_load_memoffset (compiler, ORC_X86_ldmxcsr, 4, 0, (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]), compiler->exec_reg, 0); }
void orc_x86_emit_dec_memoffset (OrcCompiler *compiler, int size, int offset, int reg) { if (size == 4) { orc_x86_emit_cpuinsn_imm_memoffset (compiler, ORC_X86_add_imm8_rm, size, -1, offset, reg); } else { orc_x86_emit_cpuinsn_load_memoffset (compiler, ORC_X86_dec, size, 0, offset, reg, -1); } }