From 5d57d08321d7b9fcd9b37ed53144268900ca07db Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 15 Jan 2023 15:02:36 -0800 Subject: Don't stall non-load instructions after a store. --- uarch/core.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'uarch/core.cpp') diff --git a/uarch/core.cpp b/uarch/core.cpp index 76af173..e6fffdd 100644 --- a/uarch/core.cpp +++ b/uarch/core.cpp @@ -100,27 +100,28 @@ void decode_stage::clock() { return; } - if (speculative_stores_sent != c.stores_done) { + inst_bundle i; + + i.inst = decode(c.exec.ctlregs[FLAGS], + pc, + b.data[pc & memory::LINE_BYTE_OFFSET_MASK], + interrupt); + + if ((i.inst.need_indirect_load || i.inst.need_exec_load) && speculative_stores_sent != c.stores_done) { pte(b.tr, "z"); return; } - inst_bundle i; + // Commit point for decode + + interrupt = false; - i.tr = infra::pt::child(b.tr); i.gen = c.gen; i.pc = pc; i.icount = icount++; + i.tr = infra::pt::child(b.tr); - pte(i.tr, "D"); - - i.inst = decode(c.exec.ctlregs[FLAGS], - pc, - b.data[pc & memory::LINE_BYTE_OFFSET_MASK], - interrupt); - interrupt = false; - - pte(i.tr, "", fmt::format("{:05o}: {}", pc, i.inst.disasm())); + pte(i.tr, "D", fmt::format("{:05o}: {}", pc, i.inst.disasm())); pc = i.inst.next_pc; -- cgit v1.2.3