diff options
author | bd <bdunahu@operationnull.com> | 2025-05-10 15:00:40 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-05-10 15:00:40 -0400 |
commit | a29d974ac8cec5803dd9c9ea66f3ac5d06a1fe2b (patch) | |
tree | 74706d0282b597abae051e611bb7e2b7038b9a00 /src/id.cc | |
parent | b384a584f5feaa05b77d7979cce9dad500bd1e2e (diff) |
Fix other instances of the same bug
Diffstat (limited to 'src/id.cc')
-rw-r--r-- | src/id.cc | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -235,8 +235,8 @@ void ID::decode_I_type(signed int &s1) r1 = this->read_guard(s1); this->curr_instr->operands.integer.slot_one = s1; if (r1 == OK) { - this->write_guard<int>(s2); - this->curr_instr->operands.integer.slot_two = s2; + this->curr_instr->operands.integer.slot_two = + this->write_guard<int>(s2); } this->status = r1; } @@ -264,8 +264,9 @@ void ID::decode_J_type(signed int &s1) r2 = (this->is_checked_out(s3)) ? STALLED : OK; // we read the stack pointer if (r1 == OK && r2 == OK) { - this->write_guard<int>(s3); // we write the stack pointer - this->curr_instr->operands.integer.slot_three = s3; + // we write the stack pointer + this->curr_instr->operands.integer.slot_three = + this->write_guard<int>(s3); } this->status = (r1 == OK && r2 == OK) ? OK : STALLED; break; @@ -277,10 +278,11 @@ void ID::decode_J_type(signed int &s1) r1 = (this->is_checked_out(s3)) ? STALLED : OK; // we read the stack pointer if (r1 == OK) { - this->write_guard<int>(s2); - this->curr_instr->operands.integer.slot_two = s2; - this->write_guard<int>(s3); // we write the stack pointer - this->curr_instr->operands.integer.slot_three = s3; + this->curr_instr->operands.integer.slot_two = + this->write_guard<int>(s2); + // we write the stack pointer + this->curr_instr->operands.integer.slot_three = + this->write_guard<int>(s3); } this->status = r1; break; |