e2k: Add packsshb, packushb and packsswh instrs.
This commit is contained in:
parent
b9d7c5874a
commit
dc9b17e91a
|
@ -91,6 +91,11 @@ DEF_HELPER_2(pmovmskb, i64, i64, i64)
|
|||
DEF_HELPER_2(pmovmskps, i64, i64, i64)
|
||||
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)
|
||||
|
||||
/* Packed uncategorized */
|
||||
DEF_HELPER_2(psadbw, i64, i64, i64)
|
||||
DEF_HELPER_2(pavgusb, i64, i64, i64)
|
||||
|
|
|
@ -233,3 +233,12 @@ GEN_HELPER_PACKED(pmulhuh, uh, { \
|
|||
GEN_HELPER_PACKED(pmovmskb, sb, MOVMASK(uh, sb))
|
||||
GEN_HELPER_PACKED(pmovmskps, sw, MOVMASK(ub, sw))
|
||||
GEN_HELPER_PACKED(pmovmskpd, sd, MOVMASK(ub, sd))
|
||||
|
||||
#define PACK(dst_type, type, op) { \
|
||||
dst.dst_type[i + glue(vec64_, type)] = op(s1.type[i]); \
|
||||
dst.dst_type[i ] = op(s2.type[i]); \
|
||||
}
|
||||
|
||||
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))
|
||||
|
|
|
@ -3108,6 +3108,9 @@ static void gen_op(DisasContext *ctx, Instr *instr)
|
|||
case OP_PMOVMSKB: gen_alopf1_ddd(instr, gen_helper_pmovmskb); break;
|
||||
case OP_PMOVMSKPS: gen_alopf1_ddd(instr, gen_helper_pmovmskps); break;
|
||||
case OP_PMOVMSKPD: gen_alopf1_ddd(instr, gen_helper_pmovmskpd); break;
|
||||
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_STAAB: gen_staa_i32(instr, MO_8); break;
|
||||
case OP_STAAH: gen_staa_i32(instr, MO_16); break;
|
||||
case OP_STAAW: gen_staa_i32(instr, MO_32); break;
|
||||
|
@ -3308,10 +3311,7 @@ static void gen_op(DisasContext *ctx, Instr *instr)
|
|||
case OP_PFCMPNLTD:
|
||||
case OP_PFCMPNLED:
|
||||
case OP_PFCMPODD:
|
||||
case OP_PACKSSHB:
|
||||
case OP_PACKUSHB:
|
||||
case OP_PSHUFW:
|
||||
case OP_PACKSSWH:
|
||||
case OP_PUNPCKHBH:
|
||||
case OP_PUNPCKHHW:
|
||||
case OP_PUNPCKHWD:
|
||||
|
|
Loading…
Reference in New Issue