target/riscv: rvv: Handle mask/source overlap of vector reduction instructions
PATCH 1/1 target/riscv: rvv: Handle mask/source overlap of vector reduction instructions
Masked vector reduction instructions must not use v0 as a source register. Check rs1 and rs2 against the mask register when vm=0.
Signed-off-by Anton Blanchard <[email protected]>
--- target/riscv/insn_trans/trans_rvv.c.inc | 2 ++ 1 file changed, 2 insertions(+)
target/riscv/insn_trans/trans_rvv.c.inc +2 -0
@@ -3046,6 +3046,8 @@ static bool reduction_check(DisasContext *s, arg_rmrr *a) { return require_rvv(s) && vext_check_isa_ill(s) && + require_vm(a->vm, a->rs1) && + require_vm(a->vm, a->rs2) && vext_check_reduction(s, a->rs2); }
Signature · 1 line
2.34.1
Quoted 5 lines · Anton Blanchard
Masked vector reduction instructions must not use v0 as a source register. Check rs1 and rs2 against the mask register when vm=0.
Signed-off-by Anton Blanchard <[email protected]>---
Reviewed-by Daniel Henrique Barboza <[email protected]>
Quoted 16 lines
target/riscv/insn_trans/trans_rvv.c.inc | 2 ++ 1 file changed, 2 insertions(+)target/riscv/insn_trans/trans_rvv.c.inc +2
-0@@ -3046,6 +3046,8 @@ static bool reduction_check(DisasContext *s, arg_rmrr *a) { return require_rvv(s) && vext_check_isa_ill(s) && + require_vm(a->vm, a->rs1) && + require_vm(a->vm, a->rs2) && vext_check_reduction(s, a->rs2); }
Alistair Francis
AppliedQuoted 5 lines · Anton Blanchard
Masked vector reduction instructions must not use v0 as a source register. Check rs1 and rs2 against the mask register when vm=0.
Signed-off-by Anton Blanchard <[email protected]>
Thanks!
Applied to riscv-to-apply.next
Alistair
Quoted 21 lines
--- target/riscv/insn_trans/trans_rvv.c.inc | 2 ++ 1 file changed, 2 insertions(+)target/riscv/insn_trans/trans_rvv.c.inc +2
-1@@ -3046,6 +3046,8 @@ static bool reduction_check(DisasContext *s, arg_rmrr *a) { return require_rvv(s) && vext_check_isa_ill(s) && + require_vm(a->vm, a->rs1) && + require_vm(a->vm, a->rs2) && vext_check_reduction(s, a->rs2); } --2.34.1