Skip to content

Commit a0ea75e

Browse files
rnaxMichael Tokarev
authored andcommitted
target/riscv: rvv: Check single width operator for vector fp widen instructions
The require_scale_rvf function only checks the double width operator for the vector floating point widen instructions, so most of the widen checking functions need to add require_rvf for single width operator. The vfwcvt.f.x.v and vfwcvt.f.xu.v instructions convert single width integer to double width float, so the opfxv_widen_check function doesn’t need require_rvf for the single width operator(integer). Signed-off-by: Max Chou <[email protected]> Reviewed-by: Daniel Henrique Barboza <[email protected]> Cc: qemu-stable <[email protected]> Message-ID: <[email protected]> Signed-off-by: Alistair Francis <[email protected]> (cherry picked from commit 7a999d4) Signed-off-by: Michael Tokarev <[email protected]>
1 parent f3bea96 commit a0ea75e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

target/riscv/insn_trans/trans_rvv.c.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,6 +2331,7 @@ GEN_OPFVF_TRANS(vfrsub_vf, opfvf_check)
23312331
static bool opfvv_widen_check(DisasContext *s, arg_rmrr *a)
23322332
{
23332333
return require_rvv(s) &&
2334+
require_rvf(s) &&
23342335
require_scale_rvf(s) &&
23352336
(s->sew != MO_8) &&
23362337
vext_check_isa_ill(s) &&
@@ -2370,6 +2371,7 @@ GEN_OPFVV_WIDEN_TRANS(vfwsub_vv, opfvv_widen_check)
23702371
static bool opfvf_widen_check(DisasContext *s, arg_rmrr *a)
23712372
{
23722373
return require_rvv(s) &&
2374+
require_rvf(s) &&
23732375
require_scale_rvf(s) &&
23742376
(s->sew != MO_8) &&
23752377
vext_check_isa_ill(s) &&
@@ -2402,6 +2404,7 @@ GEN_OPFVF_WIDEN_TRANS(vfwsub_vf)
24022404
static bool opfwv_widen_check(DisasContext *s, arg_rmrr *a)
24032405
{
24042406
return require_rvv(s) &&
2407+
require_rvf(s) &&
24052408
require_scale_rvf(s) &&
24062409
(s->sew != MO_8) &&
24072410
vext_check_isa_ill(s) &&
@@ -2441,6 +2444,7 @@ GEN_OPFWV_WIDEN_TRANS(vfwsub_wv)
24412444
static bool opfwf_widen_check(DisasContext *s, arg_rmrr *a)
24422445
{
24432446
return require_rvv(s) &&
2447+
require_rvf(s) &&
24442448
require_scale_rvf(s) &&
24452449
(s->sew != MO_8) &&
24462450
vext_check_isa_ill(s) &&
@@ -2941,6 +2945,7 @@ GEN_OPFVV_TRANS(vfredmin_vs, freduction_check)
29412945
static bool freduction_widen_check(DisasContext *s, arg_rmrr *a)
29422946
{
29432947
return reduction_widen_check(s, a) &&
2948+
require_rvf(s) &&
29442949
require_scale_rvf(s) &&
29452950
(s->sew != MO_8);
29462951
}

0 commit comments

Comments
 (0)