mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
target/riscv: rvv-1.0: take fractional LMUL into vector max elements calculation
Update vext_get_vlmax() and MAXSZ() to take fractional LMUL into calculation for RVV 1.0. Signed-off-by: Frank Chang <frank.chang@sifive.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20211210075704.23951-27-frank.chang@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
5a9f8e1552
commit
a689a82b7f
3 changed files with 42 additions and 13 deletions
|
@ -1049,7 +1049,17 @@ GEN_LDST_WHOLE_TRANS(vs8r_v, 8, true)
|
|||
/*
|
||||
*** Vector Integer Arithmetic Instructions
|
||||
*/
|
||||
#define MAXSZ(s) (s->vlen >> (3 - s->lmul))
|
||||
|
||||
/*
|
||||
* MAXSZ returns the maximum vector size can be operated in bytes,
|
||||
* which is used in GVEC IR when vl_eq_vlmax flag is set to true
|
||||
* to accerlate vector operation.
|
||||
*/
|
||||
static inline uint32_t MAXSZ(DisasContext *s)
|
||||
{
|
||||
int scale = s->lmul - 3;
|
||||
return scale < 0 ? s->vlen >> -scale : s->vlen << scale;
|
||||
}
|
||||
|
||||
static bool opivv_check(DisasContext *s, arg_rmrr *a)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue