diff options
author | bd <bdunahu@operationnull.com> | 2025-04-22 23:39:14 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-22 23:39:14 -0400 |
commit | 302bbdc7ac18cd355f9f081cae202f5434427262 (patch) | |
tree | a80693956999a39deece3130bbdee9a553babbb1 /src/ex.cc | |
parent | 74b24d15eb1fe48a8e221a0bc061107d6b85d659 (diff) |
Use a struct for InstrDTO
Diffstat (limited to 'src/ex.cc')
-rw-r--r-- | src/ex.cc | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -422,15 +422,15 @@ void EX::advance_helper() unsigned int pc; Mnemonic m; - m = this->curr_instr->get_mnemonic(); - s1 = this->curr_instr->get_s1(); - s2 = this->curr_instr->get_s2(); - s3 = this->curr_instr->get_s3(); - pc = this->curr_instr->get_pc(); + m = this->curr_instr->mnemonic; + s1 = this->curr_instr->operands.integer.slot_one; + s2 = this->curr_instr->operands.integer.slot_two; + s3 = this->curr_instr->operands.integer.slot_three; + pc = this->curr_instr->slot_B; this->instr_map[m](s1, s2, s3, pc); - this->curr_instr->set_s1(s1); + this->curr_instr->operands.integer.slot_one = s1; this->status = OK; } @@ -440,7 +440,7 @@ void EX::handle_divide(signed int &s1, signed int s2, bool is_mod) this->set_condition(UF, false); if (s2 == 0) { // handle everything here - this->curr_instr->set_s1(MAX_INT); + this->curr_instr->operands.integer.slot_one = MAX_INT; this->status = OK; throw HaltException(); } else if ((s1 == -(MAX_INT)-1) && s2 == -1) { |