summaryrefslogtreecommitdiff
path: root/src/id.cc
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-04-22 23:39:14 -0400
committerbd <bdunahu@operationnull.com>2025-04-22 23:39:14 -0400
commit302bbdc7ac18cd355f9f081cae202f5434427262 (patch)
treea80693956999a39deece3130bbdee9a553babbb1 /src/id.cc
parent74b24d15eb1fe48a8e221a0bc061107d6b85d659 (diff)
Use a struct for InstrDTO
Diffstat (limited to 'src/id.cc')
-rw-r--r--src/id.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/id.cc b/src/id.cc
index 97bd844..14fe595 100644
--- a/src/id.cc
+++ b/src/id.cc
@@ -57,7 +57,7 @@ void ID::write_guard(signed int &v)
// keep track in the instrDTO for displaying to user and writeback
// keep track in checked_out so we can still access this information!
this->checked_out.push_back(v);
- this->curr_instr->set_checked_out(v);
+ this->curr_instr->checked_out = v;
}
v = this->dereference_register(v);
}
@@ -68,17 +68,17 @@ void ID::advance_helper()
Mnemonic m;
Type t;
- if (curr_instr->get_mnemonic() == NOP)
+ if (curr_instr->mnemonic == NOP)
this->status = OK;
else {
- s1 = curr_instr->get_instr_bits();
+ s1 = curr_instr->slot_A;
get_instr_fields(s1, s2, s3, m, t);
if (this->status == OK) {
- curr_instr->set_s1(s1);
- curr_instr->set_s2(s2);
- curr_instr->set_s3(s3);
- curr_instr->set_mnemonic(m);
- curr_instr->set_type(t);
+ curr_instr->operands.integer.slot_one = s1;
+ curr_instr->operands.integer.slot_two = s2;
+ curr_instr->operands.integer.slot_three = s3;
+ curr_instr->mnemonic = m;
+ curr_instr->type = t;
}
}
}
@@ -221,8 +221,8 @@ std::vector<int> ID::stage_info()
{
std::vector<int> info;
if (this->curr_instr) {
- info.push_back(this->curr_instr->is_squashed());
- info.push_back(this->curr_instr->get_instr_bits());
+ info.push_back(this->curr_instr->is_squashed);
+ info.push_back(this->curr_instr->slot_A);
}
return info;
}