diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-05-11 23:39:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-11 23:39:06 -0400 |
commit | f02bea04284d33a2d014f636baa6a861b73f6c41 (patch) | |
tree | ce89a55af60b01f6b4129d7539d07c08bfaa1b9a /src/wb.cc | |
parent | a35eb451889f0efa99ff7fe1c0a3a76afd5e7ad5 (diff) | |
parent | 43588597069587f6846a7d64a1957435bec5429d (diff) |
Replace LOADV, STOREV, with strided load (SRDL), strided store (SRDS), add vector rotate (ROTV)
Diffstat (limited to 'src/wb.cc')
-rw-r--r-- | src/wb.cc | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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 I_VECT: - this->store_register<std::array<signed int, V_R_LIMIT>>( - reg, this->curr_instr->operands.i_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 == R_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]; |