Skip to content

Commit 3ee5f0e

Browse files
rnaxMichael Tokarev
authored andcommitted
target/riscv: rvv: Remove redudant SEW checking for vector fp narrow/widen instructions
If the checking functions check both the single and double width operators at the same time, then the single width operator checking functions (require_rvf[min]) will check whether the SEW is 8. 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 93cb52b) Signed-off-by: Michael Tokarev <[email protected]>
1 parent 9f9cd6b commit 3ee5f0e

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

target/riscv/insn_trans/trans_rvv.c.inc

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2333,7 +2333,6 @@ static bool opfvv_widen_check(DisasContext *s, arg_rmrr *a)
23332333
return require_rvv(s) &&
23342334
require_rvf(s) &&
23352335
require_scale_rvf(s) &&
2336-
(s->sew != MO_8) &&
23372336
vext_check_isa_ill(s) &&
23382337
vext_check_dss(s, a->rd, a->rs1, a->rs2, a->vm);
23392338
}
@@ -2373,7 +2372,6 @@ static bool opfvf_widen_check(DisasContext *s, arg_rmrr *a)
23732372
return require_rvv(s) &&
23742373
require_rvf(s) &&
23752374
require_scale_rvf(s) &&
2376-
(s->sew != MO_8) &&
23772375
vext_check_isa_ill(s) &&
23782376
vext_check_ds(s, a->rd, a->rs2, a->vm);
23792377
}
@@ -2406,7 +2404,6 @@ static bool opfwv_widen_check(DisasContext *s, arg_rmrr *a)
24062404
return require_rvv(s) &&
24072405
require_rvf(s) &&
24082406
require_scale_rvf(s) &&
2409-
(s->sew != MO_8) &&
24102407
vext_check_isa_ill(s) &&
24112408
vext_check_dds(s, a->rd, a->rs1, a->rs2, a->vm);
24122409
}
@@ -2446,7 +2443,6 @@ static bool opfwf_widen_check(DisasContext *s, arg_rmrr *a)
24462443
return require_rvv(s) &&
24472444
require_rvf(s) &&
24482445
require_scale_rvf(s) &&
2449-
(s->sew != MO_8) &&
24502446
vext_check_isa_ill(s) &&
24512447
vext_check_dd(s, a->rd, a->rs2, a->vm);
24522448
}
@@ -2704,8 +2700,7 @@ static bool opffv_widen_check(DisasContext *s, arg_rmr *a)
27042700
{
27052701
return opfv_widen_check(s, a) &&
27062702
require_rvfmin(s) &&
2707-
require_scale_rvfmin(s) &&
2708-
(s->sew != MO_8);
2703+
require_scale_rvfmin(s);
27092704
}
27102705

27112706
#define GEN_OPFV_WIDEN_TRANS(NAME, CHECK, HELPER, FRM) \
@@ -2810,16 +2805,14 @@ static bool opffv_narrow_check(DisasContext *s, arg_rmr *a)
28102805
{
28112806
return opfv_narrow_check(s, a) &&
28122807
require_rvfmin(s) &&
2813-
require_scale_rvfmin(s) &&
2814-
(s->sew != MO_8);
2808+
require_scale_rvfmin(s);
28152809
}
28162810

28172811
static bool opffv_rod_narrow_check(DisasContext *s, arg_rmr *a)
28182812
{
28192813
return opfv_narrow_check(s, a) &&
28202814
require_rvf(s) &&
2821-
require_scale_rvf(s) &&
2822-
(s->sew != MO_8);
2815+
require_scale_rvf(s);
28232816
}
28242817

28252818
#define GEN_OPFV_NARROW_TRANS(NAME, CHECK, HELPER, FRM) \
@@ -2947,8 +2940,7 @@ static bool freduction_widen_check(DisasContext *s, arg_rmrr *a)
29472940
{
29482941
return reduction_widen_check(s, a) &&
29492942
require_rvf(s) &&
2950-
require_scale_rvf(s) &&
2951-
(s->sew != MO_8);
2943+
require_scale_rvf(s);
29522944
}
29532945

29542946
GEN_OPFVV_WIDEN_TRANS(vfwredusum_vs, freduction_widen_check)

0 commit comments

Comments
 (0)