diff options
author | bd <bdunahu@operationnull.com> | 2025-04-27 23:26:40 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-27 23:26:40 -0400 |
commit | a5366c56469bdec480c7eb463f9f71d7a3e3b2d2 (patch) | |
tree | 0e66c059b00e66297d4bd06a553b4721ff9eacc0 /src/id.cc | |
parent | b50cb7048275f5b9255dea7f3ac1362aaa09fe83 (diff) |
Fix push/pop instruction
Diffstat (limited to 'src/id.cc')
-rw-r--r-- | src/id.cc | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -285,6 +285,7 @@ void ID::decode_J_type(signed int &s1) s3 = 2; // stack pointer s1 = -1; // increment amount r1 = this->read_guard(s2); + this->curr_instr->operands.integer.slot_one = s1; this->curr_instr->operands.integer.slot_two = s2; r2 = (this->is_checked_out(s3)) ? STALLED : OK; // we read the stack pointer @@ -298,6 +299,7 @@ void ID::decode_J_type(signed int &s1) s2 = s1; // destination s3 = 2; // stack pointer s1 = 1; // increment amount + this->curr_instr->operands.integer.slot_one = s1; r1 = (this->is_checked_out(s3)) ? STALLED : OK; // we read the stack pointer if (r1 == OK) { @@ -316,7 +318,7 @@ void ID::decode_J_type(signed int &s1) if(this->status == OK){ this->curr_instr->operands.integer.slot_one = s1; this->curr_instr->operands.integer.slot_two = s2; - this->curr_instr->operands.integer.slot_three = s3; + this->curr_instr->operands.integer.slot_three = s3; } } } |