diff options
author | bd <bdunahu@operationnull.com> | 2025-03-30 19:42:34 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-30 19:42:34 -0400 |
commit | ebeb29d1b87c533c1e80e86ceed9ddc40e4d2cb2 (patch) | |
tree | 6fb10621af07438e01391f7cb734023e3aaf691a /src/sim/ex.cc | |
parent | 36dabe6183af98b2e3f6d0316436dc3affc3d986 (diff) |
Add tests for EX
Diffstat (limited to 'src/sim/ex.cc')
-rw-r--r-- | src/sim/ex.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/sim/ex.cc b/src/sim/ex.cc index 50882d2..d177bc9 100644 --- a/src/sim/ex.cc +++ b/src/sim/ex.cc @@ -199,4 +199,20 @@ EX::EX(Stage *stage) : Stage(stage) }; } -void EX::advance_helper() {} +void EX::advance_helper() { + signed int s1, s2; + Mnemonic m; + + // it may be good to ensure we are not doing + // work that has already been done + if (this->curr_instr) { + m = this->curr_instr->get_mnemonic(); + s1 = this->curr_instr->get_s1(); + s2 = this->curr_instr->get_s2(); + + this->instr_map[m](s1, s2); + + this->curr_instr->set_s1(s1); + this->status = OK; + } +} |