Skip to content

Commit 43a4f23

Browse files
rnaxantonblanchard
authored andcommitted
target/riscv: rvv: Apply vext_check_input_eew to vector indexed load/store instructions
Handle the overlap of source registers with different EEWs. Co-authored-by: Anton Blanchard <[email protected]> Reviewed-by: Daniel Henrique Barboza <[email protected]> Signed-off-by: Max Chou <[email protected]> Message-ID: <[email protected]> Signed-off-by: Alistair Francis <[email protected]> Cc: [email protected] (cherry picked from commit db21c3e) Signed-off-by: Michael Tokarev <[email protected]>
1 parent be6e117 commit 43a4f23

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

target/riscv/insn_trans/trans_rvv.c.inc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,8 @@ static bool ld_index_check(DisasContext *s, arg_rnfvm* a, uint8_t eew)
10431043
{
10441044
return require_rvv(s) &&
10451045
vext_check_isa_ill(s) &&
1046-
vext_check_ld_index(s, a->rd, a->rs2, a->nf, a->vm, eew);
1046+
vext_check_ld_index(s, a->rd, a->rs2, a->nf, a->vm, eew) &&
1047+
vext_check_input_eew(s, -1, 0, a->rs2, eew, a->vm);
10471048
}
10481049

10491050
GEN_VEXT_TRANS(vlxei8_v, MO_8, rnfvm, ld_index_op, ld_index_check)
@@ -1095,7 +1096,8 @@ static bool st_index_check(DisasContext *s, arg_rnfvm* a, uint8_t eew)
10951096
{
10961097
return require_rvv(s) &&
10971098
vext_check_isa_ill(s) &&
1098-
vext_check_st_index(s, a->rd, a->rs2, a->nf, eew);
1099+
vext_check_st_index(s, a->rd, a->rs2, a->nf, eew) &&
1100+
vext_check_input_eew(s, a->rd, s->sew, a->rs2, eew, a->vm);
10991101
}
11001102

11011103
GEN_VEXT_TRANS(vsxei8_v, MO_8, rnfvm, st_index_op, st_index_check)

0 commit comments

Comments
 (0)