diff options
| author | bd <bdunahu@operationnull.com> | 2025-04-17 16:28:36 -0400 | 
|---|---|---|
| committer | bd <bdunahu@operationnull.com> | 2025-04-17 16:28:36 -0400 | 
| commit | f6f2f32b6dbd1b1e60052cb67f40864c3b5bd74b (patch) | |
| tree | 12a68837106fbabd3ee1f9553a7ee4da7031b3d2 /src/sim/wb.cc | |
| parent | 2c94ea91b1c5a0d7c0ebb0ab229950f7c849909a (diff) | |
Functioning PUSH/POP
Diffstat (limited to 'src/sim/wb.cc')
| -rw-r--r-- | src/sim/wb.cc | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sim/wb.cc b/src/sim/wb.cc index 08e5ed3..c62468c 100644 --- a/src/sim/wb.cc +++ b/src/sim/wb.cc @@ -28,16 +28,17 @@ void WB::write_handler()  		throw std::runtime_error("instruction tried to pop a register out of "  								 "an empty queue during writeback."); -	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());  	} + +	this->checked_out.pop_front(); +	reg = this->curr_instr->get_checked_out(); +	this->store_register(reg, this->curr_instr->get_s1()); +  }  void WB::jump_handler()  | 
