summaryrefslogtreecommitdiff
path: root/src/wb.cc
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-05-11 19:40:47 -0400
committerbd <bdunahu@operationnull.com>2025-05-11 19:40:47 -0400
commitc9d4b54150b67e1701a920719ba2c7c03d897d27 (patch)
tree9c4c19ff4b0f7eb53bfae632437eff3a0a42d5e3 /src/wb.cc
parent79a68cabb033530871a1dab259149480584b2586 (diff)
Stride load, stride store
Diffstat (limited to 'src/wb.cc')
-rw-r--r--src/wb.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/wb.cc b/src/wb.cc
index fc714ad..89ee298 100644
--- a/src/wb.cc
+++ b/src/wb.cc
@@ -58,15 +58,11 @@ void WB::write_handler()
this->store_register<signed int>(
reg, this->curr_instr->operands.integer.slot_one);
break;
+ case S_VECT:
case R_VECT:
this->store_register<std::array<signed int, V_R_LIMIT>>(
reg, this->copy_extra_vector_elements());
break;
- // case S_VECT:
- // this->store_register<std::array<signed int, V_R_LIMIT>>(
- // reg, this->curr_instr->operands.s_vector.slot_three);
- // // todo, use copy_extra_vector_elements
- // break;
}
}
@@ -97,6 +93,13 @@ std::array<signed int, V_R_LIMIT> WB::copy_extra_vector_elements()
int i;
std::array<signed int, V_R_LIMIT> v;
+ if (this->curr_instr->type == S_VECT) {
+ if (this->curr_instr->slot_B == 0) {
+ v = {0};
+ return v;
+ }
+ }
+
v = this->curr_instr->operands.vector.slot_one;
for (i = V_R_LIMIT - 1; i >= this->curr_instr->slot_B; --i) {
v[i] = this->curr_instr->operands.vector.slot_three[i];