mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
target/riscv: rvv: Add tail agnostic for vector integer merge and move instructions
Signed-off-by: eop Chen <eop.chen@sifive.com> Reviewed-by: Frank Chang <frank.chang@sifive.com> Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <165449614532.19704.7000832880482980398-10@git.sr.ht> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
38581e5c9a
commit
89a32de2d5
2 changed files with 28 additions and 4 deletions
|
@ -2086,12 +2086,13 @@ static bool trans_vmv_v_v(DisasContext *s, arg_vmv_v_v *a)
|
|||
vext_check_isa_ill(s) &&
|
||||
/* vmv.v.v has rs2 = 0 and vm = 1 */
|
||||
vext_check_sss(s, a->rd, a->rs1, 0, 1)) {
|
||||
if (s->vl_eq_vlmax) {
|
||||
if (s->vl_eq_vlmax && !(s->vta && s->lmul < 0)) {
|
||||
tcg_gen_gvec_mov(s->sew, vreg_ofs(s, a->rd),
|
||||
vreg_ofs(s, a->rs1),
|
||||
MAXSZ(s), MAXSZ(s));
|
||||
} else {
|
||||
uint32_t data = FIELD_DP32(0, VDATA, LMUL, s->lmul);
|
||||
data = FIELD_DP32(data, VDATA, VTA, s->vta);
|
||||
static gen_helper_gvec_2_ptr * const fns[4] = {
|
||||
gen_helper_vmv_v_v_b, gen_helper_vmv_v_v_h,
|
||||
gen_helper_vmv_v_v_w, gen_helper_vmv_v_v_d,
|
||||
|
@ -2126,7 +2127,7 @@ static bool trans_vmv_v_x(DisasContext *s, arg_vmv_v_x *a)
|
|||
|
||||
s1 = get_gpr(s, a->rs1, EXT_SIGN);
|
||||
|
||||
if (s->vl_eq_vlmax) {
|
||||
if (s->vl_eq_vlmax && !(s->vta && s->lmul < 0)) {
|
||||
tcg_gen_gvec_dup_tl(s->sew, vreg_ofs(s, a->rd),
|
||||
MAXSZ(s), MAXSZ(s), s1);
|
||||
} else {
|
||||
|
@ -2134,6 +2135,7 @@ static bool trans_vmv_v_x(DisasContext *s, arg_vmv_v_x *a)
|
|||
TCGv_i64 s1_i64 = tcg_temp_new_i64();
|
||||
TCGv_ptr dest = tcg_temp_new_ptr();
|
||||
uint32_t data = FIELD_DP32(0, VDATA, LMUL, s->lmul);
|
||||
data = FIELD_DP32(data, VDATA, VTA, s->vta);
|
||||
static gen_helper_vmv_vx * const fns[4] = {
|
||||
gen_helper_vmv_v_x_b, gen_helper_vmv_v_x_h,
|
||||
gen_helper_vmv_v_x_w, gen_helper_vmv_v_x_d,
|
||||
|
@ -2163,7 +2165,7 @@ static bool trans_vmv_v_i(DisasContext *s, arg_vmv_v_i *a)
|
|||
/* vmv.v.i has rs2 = 0 and vm = 1 */
|
||||
vext_check_ss(s, a->rd, 0, 1)) {
|
||||
int64_t simm = sextract64(a->rs1, 0, 5);
|
||||
if (s->vl_eq_vlmax) {
|
||||
if (s->vl_eq_vlmax && !(s->vta && s->lmul < 0)) {
|
||||
tcg_gen_gvec_dup_imm(s->sew, vreg_ofs(s, a->rd),
|
||||
MAXSZ(s), MAXSZ(s), simm);
|
||||
mark_vs_dirty(s);
|
||||
|
@ -2172,6 +2174,7 @@ static bool trans_vmv_v_i(DisasContext *s, arg_vmv_v_i *a)
|
|||
TCGv_i64 s1;
|
||||
TCGv_ptr dest;
|
||||
uint32_t data = FIELD_DP32(0, VDATA, LMUL, s->lmul);
|
||||
data = FIELD_DP32(data, VDATA, VTA, s->vta);
|
||||
static gen_helper_vmv_vx * const fns[4] = {
|
||||
gen_helper_vmv_v_x_b, gen_helper_vmv_v_x_h,
|
||||
gen_helper_vmv_v_x_w, gen_helper_vmv_v_x_d,
|
||||
|
@ -2743,7 +2746,7 @@ static bool trans_vfmv_v_f(DisasContext *s, arg_vfmv_v_f *a)
|
|||
|
||||
TCGv_i64 t1;
|
||||
|
||||
if (s->vl_eq_vlmax) {
|
||||
if (s->vl_eq_vlmax && !(s->vta && s->lmul < 0)) {
|
||||
t1 = tcg_temp_new_i64();
|
||||
/* NaN-box f[rs1] */
|
||||
do_nanbox(s, t1, cpu_fpr[a->rs1]);
|
||||
|
@ -2755,6 +2758,7 @@ static bool trans_vfmv_v_f(DisasContext *s, arg_vfmv_v_f *a)
|
|||
TCGv_ptr dest;
|
||||
TCGv_i32 desc;
|
||||
uint32_t data = FIELD_DP32(0, VDATA, LMUL, s->lmul);
|
||||
data = FIELD_DP32(data, VDATA, VTA, s->vta);
|
||||
static gen_helper_vmv_vx * const fns[3] = {
|
||||
gen_helper_vmv_v_x_h,
|
||||
gen_helper_vmv_v_x_w,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue