diff options
-rw-r--r-- | gen/gen_avx512.cpp | 1 | ||||
-rw-r--r-- | test/misc.cpp | 19 | ||||
-rw-r--r-- | xbyak/xbyak_mnemonic.h | 1 |
3 files changed, 21 insertions, 0 deletions
diff --git a/gen/gen_avx512.cpp b/gen/gen_avx512.cpp index 2769e6a..c97a6c5 100644 --- a/gen/gen_avx512.cpp +++ b/gen/gen_avx512.cpp @@ -202,6 +202,7 @@ void putX_XM() { 0x42, "vgetexpph", T_66 | T_MAP6 | T_MUST_EVEX | T_YMM | T_EW0 | T_B16 | T_SAE_Z }, { 0x7D, "vcvtph2uw", T_MAP5 | T_MUST_EVEX | T_YMM | T_EW0 | T_B16 | T_ER_Z }, + { 0x7D, "vcvtph2w", T_66 | T_MAP5 | T_MUST_EVEX | T_YMM | T_EW0 | T_B16 | T_ER_Z }, }; for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) { const Tbl *p = &tbl[i]; diff --git a/test/misc.cpp b/test/misc.cpp index 188c1d4..4de7c53 100644 --- a/test/misc.cpp +++ b/test/misc.cpp @@ -1235,6 +1235,15 @@ CYBOZU_TEST_AUTO(vaddph) vcvtph2uw(zmm1|k2|T_z|T_rd_sae, zmm5); vcvtph2uw(zmm1, ptr [rax+0x40]); vcvtph2uw(zmm1, ptr_b [rax+0x40]); + + vcvtph2w(xmm1, xmm5); + vcvtph2w(xmm1, ptr [rax+0x40]); + vcvtph2w(xmm1, ptr_b [rax+0x40]); + vcvtph2w(ymm1, ptr [rax+0x40]); + vcvtph2w(ymm1, ptr_b [rax+0x40]); + vcvtph2w(zmm1|k2|T_z|T_rd_sae, zmm5); + vcvtph2w(zmm1, ptr [rax+0x40]); + vcvtph2w(zmm1, ptr_b [rax+0x40]); } } c; const uint8_t tbl[] = { @@ -1663,6 +1672,16 @@ CYBOZU_TEST_AUTO(vaddph) 0x62, 0xf5, 0x7c, 0xba, 0x7d, 0xcd, 0x62, 0xf5, 0x7c, 0x48, 0x7d, 0x48, 0x01, 0x62, 0xf5, 0x7c, 0x58, 0x7d, 0x48, 0x20, + + // vcvtph2w + 0x62, 0xf5, 0x7d, 0x08, 0x7d, 0xcd, + 0x62, 0xf5, 0x7d, 0x08, 0x7d, 0x48, 0x04, + 0x62, 0xf5, 0x7d, 0x18, 0x7d, 0x48, 0x20, + 0x62, 0xf5, 0x7d, 0x28, 0x7d, 0x48, 0x02, + 0x62, 0xf5, 0x7d, 0x38, 0x7d, 0x48, 0x20, + 0x62, 0xf5, 0x7d, 0xba, 0x7d, 0xcd, + 0x62, 0xf5, 0x7d, 0x48, 0x7d, 0x48, 0x01, + 0x62, 0xf5, 0x7d, 0x58, 0x7d, 0x48, 0x20, }; const size_t n = sizeof(tbl) / sizeof(tbl[0]); CYBOZU_TEST_EQUAL(c.getSize(), n); diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h index ef2a835..9401ac3 100644 --- a/xbyak/xbyak_mnemonic.h +++ b/xbyak/xbyak_mnemonic.h @@ -1910,6 +1910,7 @@ void vcvtph2qq(const Xmm& x, const Operand& op) { if (!op.isXMM() && !op.isMEM() void vcvtph2udq(const Xmm& x, const Operand& op) { checkCvt1(x, op); opVex(x, 0, op, T_N8 | T_N_VL | T_MAP5 | T_EW0 | T_YMM | T_ER_Y | T_MUST_EVEX | T_B16, 0x79); } void vcvtph2uqq(const Xmm& x, const Operand& op) { if (!op.isXMM() && !op.isMEM()) XBYAK_THROW(ERR_BAD_MEM_SIZE) opVex(x, 0, op, T_N4 | T_N_VL | T_66 | T_MAP5 | T_EW0 | T_YMM | T_ER_X | T_MUST_EVEX | T_B16, 0x79); } void vcvtph2uw(const Xmm& x, const Operand& op) { opAVX_X_XM_IMM(x, op, T_MAP5 | T_EW0 | T_YMM | T_ER_Z | T_MUST_EVEX | T_B16, 0x7D); } +void vcvtph2w(const Xmm& x, const Operand& op) { opAVX_X_XM_IMM(x, op, T_66 | T_MAP5 | T_EW0 | T_YMM | T_ER_Z | T_MUST_EVEX | T_B16, 0x7D); } void vcvtps2phx(const Xmm& x, const Operand& op) { checkCvt4(x, op); opCvt(x, op, T_N16 | T_N_VL | T_66 | T_MAP5 | T_EW0 | T_ER_Z | T_MUST_EVEX | T_B32, 0x1D); } void vcvtps2qq(const Xmm& x, const Operand& op) { checkCvt1(x, op); opVex(x, 0, op, T_N8 | T_N_VL | T_66 | T_0F | T_EW0 | T_YMM | T_ER_Y | T_MUST_EVEX | T_B32, 0x7B); } void vcvtps2udq(const Xmm& x, const Operand& op) { opAVX_X_XM_IMM(x, op, T_0F | T_EW0 | T_YMM | T_ER_Z | T_MUST_EVEX | T_B32, 0x79); } |