From c9d4b54150b67e1701a920719ba2c7c03d897d27 Mon Sep 17 00:00:00 2001 From: bd Date: Sun, 11 May 2025 19:40:47 -0400 Subject: Stride load, stride store --- src/wb.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/wb.cc') 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( reg, this->curr_instr->operands.integer.slot_one); break; + case S_VECT: case R_VECT: this->store_register>( reg, this->copy_extra_vector_elements()); break; - // case S_VECT: - // this->store_register>( - // reg, this->curr_instr->operands.s_vector.slot_three); - // // todo, use copy_extra_vector_elements - // break; } } @@ -97,6 +93,13 @@ std::array WB::copy_extra_vector_elements() int i; std::array 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]; -- cgit v1.2.3