From e33a9d258bb06095c0efce24a2806517a3b2b996 Mon Sep 17 00:00:00 2001 From: Denis Drakhnya Date: Sat, 16 Jan 2021 15:29:55 +0200 Subject: [PATCH] e2k: Add packuswh instr. --- target/e2k/helper.h | 3 ++- target/e2k/helper_vec.c | 1 + target/e2k/translate/alc.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/target/e2k/helper.h b/target/e2k/helper.h index 0f20c9fb16..8181be6a8d 100644 --- a/target/e2k/helper.h +++ b/target/e2k/helper.h @@ -93,8 +93,9 @@ DEF_HELPER_2(pmovmskpd, i64, i64, i64) /* Packed packs */ DEF_HELPER_2(packsshb, i64, i64, i64) -DEF_HELPER_2(packsswh, i64, i64, i64) DEF_HELPER_2(packushb, i64, i64, i64) +DEF_HELPER_2(packsswh, i64, i64, i64) +DEF_HELPER_2(packuswh, i64, i64, i64) /* Packed unpacks */ DEF_HELPER_2(punpcklbh, i64, i64, i64) diff --git a/target/e2k/helper_vec.c b/target/e2k/helper_vec.c index 639a783ce2..d0b9358a22 100644 --- a/target/e2k/helper_vec.c +++ b/target/e2k/helper_vec.c @@ -178,6 +178,7 @@ GEN_HELPER_PACKED(pmovmskpd, sd, MOVMASK(ub, sd)) GEN_HELPER_PACKED(packsshb, sh, PACK(sb, sh, satsb)) GEN_HELPER_PACKED(packushb, uh, PACK(ub, sh, satub)) GEN_HELPER_PACKED(packsswh, sw, PACK(sh, sw, satsh)) +GEN_HELPER_PACKED(packuswh, sw, PACK(uh, sw, satuh)) #define GEN_HELPER_PACKED_UNPACK(name, type, offset) \ GEN_HELPER_PACKED(name, type, { \ diff --git a/target/e2k/translate/alc.c b/target/e2k/translate/alc.c index 4dc9688b70..301c166d6b 100644 --- a/target/e2k/translate/alc.c +++ b/target/e2k/translate/alc.c @@ -3131,6 +3131,7 @@ static void gen_op(DisasContext *ctx, Instr *instr) case OP_PACKSSHB: gen_alopf1_ddd(instr, gen_helper_packsshb); break; case OP_PACKUSHB: gen_alopf1_ddd(instr, gen_helper_packushb); break; case OP_PACKSSWH: gen_alopf1_ddd(instr, gen_helper_packsswh); break; + case OP_PACKUSWH: gen_alopf1_ddd(instr, gen_helper_packuswh); break; case OP_PUNPCKLBH: gen_alopf1_ddd(instr, gen_helper_punpcklbh); break; case OP_PUNPCKLHW: gen_alopf1_ddd(instr, gen_helper_punpcklhw); break; case OP_PUNPCKLWD: gen_alopf1_ddd(instr, gen_helper_punpcklwd); break; @@ -3428,7 +3429,6 @@ static void gen_op(DisasContext *ctx, Instr *instr) case OP_MOVXA: case OP_MOVXC: case OP_MPSADBH: - case OP_PACKUSWH: case OP_PFHADDS: case OP_PFHSUBS: case OP_PFADDSUBS: