arch-riscv: fix vl in mask load/store (i.e vlm.v/vsm.v) (#830)
The vlm.v and vsm.v unit-stride mask load/store instructions are constructed with an incorrect VL when the current one is larger than than VLEN/EEW (i.e. when LMUL > 1). This commit fixes the issue for both instructions.
This commit is contained in:
@@ -464,8 +464,7 @@ def template VlmConstructor {{
|
||||
%(set_reg_idx_arr)s;
|
||||
%(constructor)s;
|
||||
|
||||
const uint32_t micro_vlmax = vlen / width_EEW(_machInst.width);
|
||||
int32_t micro_vl = (std::min(this->vl, micro_vlmax) + 7) / 8;
|
||||
int32_t micro_vl = (this->vl + 7) / 8;
|
||||
StaticInstPtr microop;
|
||||
|
||||
if (micro_vl == 0) {
|
||||
@@ -491,8 +490,7 @@ def template VsmConstructor {{
|
||||
%(set_reg_idx_arr)s;
|
||||
%(constructor)s;
|
||||
|
||||
const uint32_t micro_vlmax = vlen / width_EEW(_machInst.width);
|
||||
int32_t micro_vl = (std::min(this->vl, micro_vlmax) + 7) / 8;
|
||||
int32_t micro_vl = (this->vl + 7) / 8;
|
||||
|
||||
StaticInstPtr microop;
|
||||
if (micro_vl == 0) {
|
||||
|
||||
Reference in New Issue
Block a user