From 360e6cbffb3d2c1279ae7c3a02c2850f5523eeb2 Mon Sep 17 00:00:00 2001 From: bd Date: Fri, 18 Apr 2025 00:03:56 -0400 Subject: Keep track of squashed instructions in DTO object --- src/sim/stage.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sim/stage.cc') diff --git a/src/sim/stage.cc b/src/sim/stage.cc index 9528e4b..d65ca87 100644 --- a/src/sim/stage.cc +++ b/src/sim/stage.cc @@ -34,6 +34,8 @@ InstrDTO *Stage::advance(Response p) // for (long unsigned int i = 0; i < this->checked_out.size(); ++i) // std::cout << this->checked_out[i] << " "; // std::cout << std::endl; + if (this->curr_instr && this->curr_instr->is_squashed() == 1) + this->status = OK; if (this->curr_instr && this->status != OK) { this->advance_helper(); } @@ -108,7 +110,7 @@ bool Stage::is_checked_out(signed int r) void Stage::squash() { if (curr_instr) { - this->curr_instr->set_mnemonic(NOP); + this->curr_instr->squash(); this->status = OK; } if (this->next) { -- cgit v1.2.3