mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
target/riscv: rvv-1.0: Add ELEN checks for widening and narrowing instructions
SEW has the limitation which cannot exceed ELEN. Widening instructions have a destination group with EEW = 2*SEW and narrowing instructions have a source operand with EEW = 2*SEW. Both of the instructions have the limitation of: 2*SEW <= ELEN. Signed-off-by: Frank Chang <frank.chang@sifive.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20211210075704.23951-78-frank.chang@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
45ca2ca6bd
commit
cc13aa3614
2 changed files with 13 additions and 6 deletions
|
@ -96,6 +96,7 @@ typedef struct DisasContext {
|
|||
int8_t lmul;
|
||||
uint8_t sew;
|
||||
uint16_t vlen;
|
||||
uint16_t elen;
|
||||
target_ulong vstart;
|
||||
bool vl_eq_vlmax;
|
||||
uint8_t ntemp;
|
||||
|
@ -705,6 +706,7 @@ static void riscv_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
|
|||
ctx->ext_zfh = cpu->cfg.ext_zfh;
|
||||
ctx->ext_zfhmin = cpu->cfg.ext_zfhmin;
|
||||
ctx->vlen = cpu->cfg.vlen;
|
||||
ctx->elen = cpu->cfg.elen;
|
||||
ctx->mstatus_hs_fs = FIELD_EX32(tb_flags, TB_FLAGS, MSTATUS_HS_FS);
|
||||
ctx->mstatus_hs_vs = FIELD_EX32(tb_flags, TB_FLAGS, MSTATUS_HS_VS);
|
||||
ctx->hlsx = FIELD_EX32(tb_flags, TB_FLAGS, HLSX);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue