mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
target/riscv: rvv-1.0: whole register move instructions
Add the following instructions: * vmv1r.v * vmv2r.v * vmv4r.v * vmv8r.v Signed-off-by: Frank Chang <frank.chang@sifive.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20211210075704.23951-40-frank.chang@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
5c4eb8fb56
commit
6b85975e11
2 changed files with 29 additions and 0 deletions
|
@ -3259,3 +3259,28 @@ static bool trans_vcompress_vm(DisasContext *s, arg_r *a)
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Whole Vector Register Move Instructions ignore vtype and vl setting.
|
||||
* Thus, we don't need to check vill bit. (Section 16.6)
|
||||
*/
|
||||
#define GEN_VMV_WHOLE_TRANS(NAME, LEN) \
|
||||
static bool trans_##NAME(DisasContext *s, arg_##NAME * a) \
|
||||
{ \
|
||||
if (require_rvv(s) && \
|
||||
QEMU_IS_ALIGNED(a->rd, LEN) && \
|
||||
QEMU_IS_ALIGNED(a->rs2, LEN)) { \
|
||||
/* EEW = 8 */ \
|
||||
tcg_gen_gvec_mov(MO_8, vreg_ofs(s, a->rd), \
|
||||
vreg_ofs(s, a->rs2), \
|
||||
s->vlen / 8 * LEN, s->vlen / 8 * LEN); \
|
||||
mark_vs_dirty(s); \
|
||||
return true; \
|
||||
} \
|
||||
return false; \
|
||||
}
|
||||
|
||||
GEN_VMV_WHOLE_TRANS(vmv1r_v, 1)
|
||||
GEN_VMV_WHOLE_TRANS(vmv2r_v, 2)
|
||||
GEN_VMV_WHOLE_TRANS(vmv4r_v, 4)
|
||||
GEN_VMV_WHOLE_TRANS(vmv8r_v, 8)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue