From 4ffcb8d4ab3b4efff8ee0973466533164132a324 Mon Sep 17 00:00:00 2001 From: Anthony Pesch Date: Fri, 2 Jun 2017 18:14:45 -0400 Subject: [PATCH] remove OP_FLUSH_CONTEXT --- src/jit/backend/x64/x64_backend.cc | 2 -- src/jit/frontend/sh4/sh4_translate.c | 3 --- src/jit/ir/ir.c | 4 ---- src/jit/ir/ir.h | 2 -- src/jit/passes/load_store_elimination_pass.c | 4 ++-- 5 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/jit/backend/x64/x64_backend.cc b/src/jit/backend/x64/x64_backend.cc index f6b48446..9383cb6f 100644 --- a/src/jit/backend/x64/x64_backend.cc +++ b/src/jit/backend/x64/x64_backend.cc @@ -1674,8 +1674,6 @@ EMITTER(CALL_COND) { e.outLocalLabel(); } -EMITTER(FLUSH_CONTEXT) {} - EMITTER(DEBUG_BREAK) { e.db(0xcc); } diff --git a/src/jit/frontend/sh4/sh4_translate.c b/src/jit/frontend/sh4/sh4_translate.c index 7c67610d..2a8b0eae 100644 --- a/src/jit/frontend/sh4/sh4_translate.c +++ b/src/jit/frontend/sh4/sh4_translate.c @@ -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_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) { diff --git a/src/jit/ir/ir.c b/src/jit/ir/ir.c index 5e9e772a..fa870cb2 100644 --- a/src/jit/ir/ir.c +++ b/src/jit/ir/ir.c @@ -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); } -void ir_flush_context(struct ir *ir) { - ir_append_instr(ir, OP_FLUSH_CONTEXT, VALUE_V); -} - void ir_debug_break(struct ir *ir) { ir_append_instr(ir, OP_DEBUG_BREAK, VALUE_V); } diff --git a/src/jit/ir/ir.h b/src/jit/ir/ir.h index 7fad0188..9b4e2eb6 100644 --- a/src/jit/ir/ir.h +++ b/src/jit/ir/ir.h @@ -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, struct ir_value *arg1, struct ir_value *cond); -void ir_flush_context(struct ir *ir); - /* debug */ void ir_debug_break(struct ir *ir); void ir_assert_lt(struct ir *ir, struct ir_value *a, struct ir_value *b); diff --git a/src/jit/passes/load_store_elimination_pass.c b/src/jit/passes/load_store_elimination_pass.c index 2e489027..9542875a 100644 --- a/src/jit/passes/load_store_elimination_pass.c +++ b/src/jit/passes/load_store_elimination_pass.c @@ -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, struct ir_block *block) { 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); } else if (instr->op == OP_BRANCH) { 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) { - if (instr->op == OP_FALLBACK || instr->op == OP_FLUSH_CONTEXT) { + if (instr->op == OP_FALLBACK || instr->op == OP_CALL) { lse_clear_available(lse); } else if (instr->op == OP_BRANCH) { if (instr->arg[0]->type != VALUE_BLOCK) {