mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
target/loongarch: Implement vexth
This patch includes: - VEXTH.{H.B/W.H/D.W/Q.D}; - VEXTH.{HU.BU/WU.HU/DU.WU/QU.DU}. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Song Gao <gaosong@loongson.cn> Message-Id: <20230504122810.4094787-19-gaosong@loongson.cn>
This commit is contained in:
parent
cbe44190cc
commit
3734ad9370
5 changed files with 82 additions and 0 deletions
|
@ -28,6 +28,17 @@ static bool gen_vvv(DisasContext *ctx, arg_vvv *a,
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool gen_vv(DisasContext *ctx, arg_vv *a,
|
||||
void (*func)(TCGv_ptr, TCGv_i32, TCGv_i32))
|
||||
{
|
||||
TCGv_i32 vd = tcg_constant_i32(a->vd);
|
||||
TCGv_i32 vj = tcg_constant_i32(a->vj);
|
||||
|
||||
CHECK_SXE;
|
||||
func(cpu_env, vd, vj);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool gvec_vvv(DisasContext *ctx, arg_vvv *a, MemOp mop,
|
||||
void (*func)(unsigned, uint32_t, uint32_t,
|
||||
uint32_t, uint32_t, uint32_t))
|
||||
|
@ -2794,3 +2805,12 @@ TRANS(vsat_bu, gvec_vv_i, MO_8, do_vsat_u)
|
|||
TRANS(vsat_hu, gvec_vv_i, MO_16, do_vsat_u)
|
||||
TRANS(vsat_wu, gvec_vv_i, MO_32, do_vsat_u)
|
||||
TRANS(vsat_du, gvec_vv_i, MO_64, do_vsat_u)
|
||||
|
||||
TRANS(vexth_h_b, gen_vv, gen_helper_vexth_h_b)
|
||||
TRANS(vexth_w_h, gen_vv, gen_helper_vexth_w_h)
|
||||
TRANS(vexth_d_w, gen_vv, gen_helper_vexth_d_w)
|
||||
TRANS(vexth_q_d, gen_vv, gen_helper_vexth_q_d)
|
||||
TRANS(vexth_hu_bu, gen_vv, gen_helper_vexth_hu_bu)
|
||||
TRANS(vexth_wu_hu, gen_vv, gen_helper_vexth_wu_hu)
|
||||
TRANS(vexth_du_wu, gen_vv, gen_helper_vexth_du_wu)
|
||||
TRANS(vexth_qu_du, gen_vv, gen_helper_vexth_qu_du)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue