diff options
author | bd <bdunaisky@umass.edu> | 2025-04-18 04:10:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-18 04:10:49 +0000 |
commit | dbf7e900336214041da8880d6986d59126c35a72 (patch) | |
tree | 5bc5c848ca6b5326480c7b0760087db79c8653f1 /src/sim/if.cc | |
parent | 480181957b3f3dbcf7731023504c2cacc8d181ea (diff) | |
parent | 360e6cbffb3d2c1279ae7c3a02c2850f5523eeb2 (diff) |
Merge pull request #55 from bdunahu/dev-sid
Allow dynamic program loading (by Sid)
Diffstat (limited to 'src/sim/if.cc')
-rw-r--r-- | src/sim/if.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sim/if.cc b/src/sim/if.cc index bab2608..6494912 100644 --- a/src/sim/if.cc +++ b/src/sim/if.cc @@ -12,8 +12,9 @@ InstrDTO *IF::advance(Response p) this->advance_helper(); if (this->curr_instr != nullptr && p == WAIT) { - // mutual consent - ++this->pc; + // don't increment PC if the PC was just set by wb + if (this->curr_instr->is_squashed() != 1) + ++this->pc; r = new InstrDTO(*this->curr_instr); delete curr_instr; curr_instr = nullptr; |