diff options
author | bd <bdunahu@operationnull.com> | 2025-04-17 01:17:48 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-17 01:17:48 -0400 |
commit | 94a0435da91501d2320d6081c552cb5df0c4433d (patch) | |
tree | 13d2528bbe9cdbd391297ddd150414e576cdaa8e /src/sim/id.cc | |
parent | 5e1d59feaa353e7ea4179fd0c8104fc4450a7a16 (diff) |
Keep track of checked out in DTO to simplify wb cond logic (bug)
Diffstat (limited to 'src/sim/id.cc')
-rw-r--r-- | src/sim/id.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sim/id.cc b/src/sim/id.cc index d4b56d2..3d5baef 100644 --- a/src/sim/id.cc +++ b/src/sim/id.cc @@ -38,7 +38,14 @@ Response ID::read_guard(signed int &v) void ID::write_guard(signed int &v) { - this->checked_out.push_back(v); + // zero register shouldn't be written. + if (v != 0) { + // keep track in the instrDTO for displaying to user and writeback + // keep track in checked_out so we can still access this information! + this->checked_out.push_back(v); + this->curr_instr->set_checked_out(v); + std::cout << "checked out: " << v << std::endl; + } v = this->dereference_register(v); } |