remove OP_FLUSH_CONTEXT

This commit is contained in:
Anthony Pesch 2017-06-02 18:14:45 -04:00
parent df8f4df2d1
commit 4ffcb8d4ab
5 changed files with 2 additions and 13 deletions

View File

@ -1674,8 +1674,6 @@ EMITTER(CALL_COND) {
e.outLocalLabel(); e.outLocalLabel();
} }
EMITTER(FLUSH_CONTEXT) {}
EMITTER(DEBUG_BREAK) { EMITTER(DEBUG_BREAK) {
e.db(0xcc); e.db(0xcc);
} }

View File

@ -59,9 +59,6 @@ static void store_sr(struct sh4_guest *guest, struct ir *ir,
ir_store_context(ir, offsetof(struct sh4_context, sr_s), sr_s); ir_store_context(ir, offsetof(struct sh4_context, sr_s), sr_s);
ir_call_2(ir, sr_updated, data, old_sr); ir_call_2(ir, sr_updated, data, old_sr);
/* force a context flush in case the SR change swaps the GPR banks */
ir_flush_context(ir);
} }
static struct ir_value *load_fpscr(struct ir *ir) { static struct ir_value *load_fpscr(struct ir *ir) {

View File

@ -981,10 +981,6 @@ void ir_call_cond_2(struct ir *ir, struct ir_value *cond, struct ir_value *fn,
ir_set_arg3(ir, instr, arg1); ir_set_arg3(ir, instr, arg1);
} }
void ir_flush_context(struct ir *ir) {
ir_append_instr(ir, OP_FLUSH_CONTEXT, VALUE_V);
}
void ir_debug_break(struct ir *ir) { void ir_debug_break(struct ir *ir) {
ir_append_instr(ir, OP_DEBUG_BREAK, VALUE_V); ir_append_instr(ir, OP_DEBUG_BREAK, VALUE_V);
} }

View File

@ -405,8 +405,6 @@ void ir_call_cond_1(struct ir *ir, struct ir_value *fn, struct ir_value *arg0,
void ir_call_cond_2(struct ir *ir, struct ir_value *fn, struct ir_value *arg0, void ir_call_cond_2(struct ir *ir, struct ir_value *fn, struct ir_value *arg0,
struct ir_value *arg1, struct ir_value *cond); struct ir_value *arg1, struct ir_value *cond);
void ir_flush_context(struct ir *ir);
/* debug */ /* debug */
void ir_debug_break(struct ir *ir); void ir_debug_break(struct ir *ir);
void ir_assert_lt(struct ir *ir, struct ir_value *a, struct ir_value *b); void ir_assert_lt(struct ir *ir, struct ir_value *a, struct ir_value *b);

View File

@ -133,7 +133,7 @@ static void lse_set_available(struct lse *lse, int offset, struct ir_value *v) {
static void lse_eliminate_loads_r(struct lse *lse, struct ir *ir, static void lse_eliminate_loads_r(struct lse *lse, struct ir *ir,
struct ir_block *block) { struct ir_block *block) {
list_for_each_entry_safe(instr, &block->instrs, struct ir_instr, it) { list_for_each_entry_safe(instr, &block->instrs, struct ir_instr, it) {
if (instr->op == OP_FALLBACK || instr->op == OP_FLUSH_CONTEXT) { if (instr->op == OP_FALLBACK || instr->op == OP_CALL) {
lse_clear_available(lse); lse_clear_available(lse);
} else if (instr->op == OP_BRANCH) { } else if (instr->op == OP_BRANCH) {
if (instr->arg[0]->type != VALUE_BLOCK) { if (instr->arg[0]->type != VALUE_BLOCK) {
@ -215,7 +215,7 @@ static void lse_eliminate_stores_r(struct lse *lse, struct ir *ir,
} }
list_for_each_entry_safe_reverse(instr, &block->instrs, struct ir_instr, it) { list_for_each_entry_safe_reverse(instr, &block->instrs, struct ir_instr, it) {
if (instr->op == OP_FALLBACK || instr->op == OP_FLUSH_CONTEXT) { if (instr->op == OP_FALLBACK || instr->op == OP_CALL) {
lse_clear_available(lse); lse_clear_available(lse);
} else if (instr->op == OP_BRANCH) { } else if (instr->op == OP_BRANCH) {
if (instr->arg[0]->type != VALUE_BLOCK) { if (instr->arg[0]->type != VALUE_BLOCK) {