diff options
author | bd <bdunahu@operationnull.com> | 2025-04-17 15:30:26 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-17 15:30:26 -0400 |
commit | 2c94ea91b1c5a0d7c0ebb0ab229950f7c849909a (patch) | |
tree | c1fe016db8127633f9d14aac696ef9040967228d /src/sim/wb.cc | |
parent | 430986b4b1ee1013db070991ce289176f48fa8e8 (diff) |
The pipeline says some things and there are numbers
Diffstat (limited to 'src/sim/wb.cc')
-rw-r--r-- | src/sim/wb.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sim/wb.cc b/src/sim/wb.cc index 4e6b2b0..08e5ed3 100644 --- a/src/sim/wb.cc +++ b/src/sim/wb.cc @@ -31,6 +31,13 @@ void WB::write_handler() this->checked_out.pop_front(); reg = this->curr_instr->get_checked_out(); this->store_register(reg, this->curr_instr->get_s1()); + + if (this->curr_instr->get_mnemonic() == POP) { + // POP performs a second register write + reg = this->checked_out.front(); + this->checked_out.pop_front(); + this->store_register(reg, this->curr_instr->get_s3()); + } } void WB::jump_handler() |