mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
target/riscv: rvv-1.0: add vector unit-stride mask load/store insns
Signed-off-by: Frank Chang <frank.chang@sifive.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20211210075704.23951-75-frank.chang@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
5c89e9c096
commit
26086aea0d
4 changed files with 67 additions and 0 deletions
|
@ -345,6 +345,27 @@ GEN_VEXT_ST_US(vse16_v, int16_t, ste_h)
|
|||
GEN_VEXT_ST_US(vse32_v, int32_t, ste_w)
|
||||
GEN_VEXT_ST_US(vse64_v, int64_t, ste_d)
|
||||
|
||||
/*
|
||||
*** unit stride mask load and store, EEW = 1
|
||||
*/
|
||||
void HELPER(vlm_v)(void *vd, void *v0, target_ulong base,
|
||||
CPURISCVState *env, uint32_t desc)
|
||||
{
|
||||
/* evl = ceil(vl/8) */
|
||||
uint8_t evl = (env->vl + 7) >> 3;
|
||||
vext_ldst_us(vd, base, env, desc, lde_b,
|
||||
0, evl, GETPC(), MMU_DATA_LOAD);
|
||||
}
|
||||
|
||||
void HELPER(vsm_v)(void *vd, void *v0, target_ulong base,
|
||||
CPURISCVState *env, uint32_t desc)
|
||||
{
|
||||
/* evl = ceil(vl/8) */
|
||||
uint8_t evl = (env->vl + 7) >> 3;
|
||||
vext_ldst_us(vd, base, env, desc, ste_b,
|
||||
0, evl, GETPC(), MMU_DATA_STORE);
|
||||
}
|
||||
|
||||
/*
|
||||
*** index: access vector element from indexed memory
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue