|
From: | gaosong |
Subject: | Re: [RFC PATCH 40/43] target/loongarch: Implement vreplve vpack vpick |
Date: | Tue, 21 Mar 2023 19:31:24 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
Hi, Richard 在 2022/12/25 上午5:12, Richard Henderson 写道:
On 12/24/22 00:16, Song Gao wrote:+TRANS(vreplve_b, gen_vvr, gen_helper_vreplve_b) +TRANS(vreplve_h, gen_vvr, gen_helper_vreplve_h) +TRANS(vreplve_w, gen_vvr, gen_helper_vreplve_w) +TRANS(vreplve_d, gen_vvr, gen_helper_vreplve_d) +TRANS(vreplvei_b, gen_vv_i, gen_helper_vreplvei_b) +TRANS(vreplvei_h, gen_vv_i, gen_helper_vreplvei_h) +TRANS(vreplvei_w, gen_vv_i, gen_helper_vreplvei_w) +TRANS(vreplvei_d, gen_vv_i, gen_helper_vreplvei_d)tcg_gen_gvec_dupm. In the case of imm, this will be cpu_env + offsetof.
e.g vreplvei_b vd, vj, imm vd->B(i) = Vj->B(imm);tcg_gen_gvec_dup_mem(MO_8, vreg_full_offset(a->vd), offsetof(CPULoongArchState, fpr[a->vj].vreg.B(a->imm)),
16, 16); this case no problem.
In the case of reg, compute cpu_env + register offset + offsetof.
but for this case. e.g vreplve_b vd vj, rk index = gpr[rk] % (128/8); Vd->B(i) = Vj->B(index);tcg_gen_gvec_dup_mem(MO_8, vreg_full_offset(a->vd), offsetof(CPULoongArchState, fpr[a->vj].vreg.B(index))), 16, 16 );
How can we get the index with cpu_env? or need env->gpr[rk]? The index type is not TCGv. I have no idea. Thanks. Song Gao
+TRANS(vbsll_v, gen_vv_i, gen_helper_vbsll_v) +TRANS(vbsrl_v, gen_vv_i, gen_helper_vbsrl_v)These can use tcg_gen_extract2_i64, with imm * 8 bit shift. r~
[Prev in Thread] | Current Thread | [Next in Thread] |