diff options
-rw-r--r-- | gen/gen_avx512.cpp | 1 | ||||
-rw-r--r-- | test/misc.cpp | 11 | ||||
-rw-r--r-- | xbyak/xbyak_mnemonic.h | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/gen/gen_avx512.cpp b/gen/gen_avx512.cpp index 99a5f8d..35960bb 100644 --- a/gen/gen_avx512.cpp +++ b/gen/gen_avx512.cpp @@ -582,6 +582,7 @@ void putCvt() { 0x7A, "vcvtuqq2ph", T_F2 | T_MAP5 | T_MUST_EVEX | T_EW1 | T_B64 | T_ER_Z | T_N16 | T_N_VL, 5 }, { 0x2A, "vcvtsi2sh", T_F3 | T_MAP5 | T_MUST_EVEX | T_ER_R | T_M_K, 6 }, + { 0x7B, "vcvtusi2sh", T_F3 | T_MAP5 | T_MUST_EVEX | T_ER_R | T_M_K, 6 }, }; 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 1f920a8..3b10c99 100644 --- a/test/misc.cpp +++ b/test/misc.cpp @@ -1321,6 +1321,11 @@ CYBOZU_TEST_AUTO(vaddph) vcvtsi2sh(xmm1, xmm2, dword [rax+0x40]); vcvtsi2sh(xmm1|T_rd_sae, xmm2, r9); vcvtsi2sh(xmm1, xmm2, qword [rax+0x40]); + + vcvtusi2sh(xmm1|T_rd_sae, xmm2, eax); + vcvtusi2sh(xmm1, xmm2, dword [rax+0x40]); + vcvtusi2sh(xmm1|T_rd_sae, xmm2, r9); + vcvtusi2sh(xmm1, xmm2, qword [rax+0x40]); } } c; const uint8_t tbl[] = { @@ -1846,6 +1851,12 @@ CYBOZU_TEST_AUTO(vaddph) 0x62, 0xf5, 0x6e, 0x08, 0x2a, 0x48, 0x10, 0x62, 0xd5, 0xee, 0x38, 0x2a, 0xc9, 0x62, 0xf5, 0xee, 0x08, 0x2a, 0x48, 0x08, + + // vcvtusi2sh + 0x62, 0xf5, 0x6e, 0x38, 0x7b, 0xc8, + 0x62, 0xf5, 0x6e, 0x08, 0x7b, 0x48, 0x10, + 0x62, 0xd5, 0xee, 0x38, 0x7b, 0xc9, + 0x62, 0xf5, 0xee, 0x08, 0x7b, 0x48, 0x08, }; 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 8c67a32..f76c2e7 100644 --- a/xbyak/xbyak_mnemonic.h +++ b/xbyak/xbyak_mnemonic.h @@ -1950,6 +1950,7 @@ void vcvtuqq2pd(const Xmm& x, const Operand& op) { opAVX_X_XM_IMM(x, op, T_F3 | void vcvtuqq2ph(const Xmm& x, const Operand& op) { opCvt5(x, op, T_N16 | T_N_VL | T_F2 | T_MAP5 | T_EW1 | T_ER_Z | T_MUST_EVEX | T_B64, 0x7A); } void vcvtuqq2ps(const Xmm& x, const Operand& op) { opCvt2(x, op, T_F2 | T_0F | T_EW1 | T_YMM | T_ER_Z | T_MUST_EVEX | T_B64, 0x7A); } void vcvtusi2sd(const Xmm& x1, const Xmm& x2, const Operand& op) { opCvt3(x1, x2, op, T_F2 | T_0F | T_MUST_EVEX, T_W1 | T_EW1 | T_ER_X | T_N8, T_W0 | T_EW0 | T_N4, 0x7B); } +void vcvtusi2sh(const Xmm& x1, const Xmm& x2, const Operand& op) { if (!(x1.isXMM() && x2.isXMM() && op.isBit(32|64))) XBYAK_THROW(ERR_BAD_COMBINATION) int type = (T_F3 | T_MAP5 | T_ER_R | T_MUST_EVEX | T_M_K) | (op.isBit(32) ? (T_EW0 | T_N4) : (T_EW1 | T_N8)); opVex(x1, &x2, op, type, 0x7B); } void vcvtusi2ss(const Xmm& x1, const Xmm& x2, const Operand& op) { opCvt3(x1, x2, op, T_F3 | T_0F | T_MUST_EVEX | T_ER_X, T_W1 | T_EW1 | T_N8, T_W0 | T_EW0 | T_N4, 0x7B); } void vcvtuw2ph(const Xmm& x, const Operand& op) { opAVX_X_XM_IMM(x, op, T_F2 | T_MAP5 | T_EW0 | T_YMM | T_ER_Z | T_MUST_EVEX | T_B16, 0x7D); } void vcvtw2ph(const Xmm& x, const Operand& op) { opAVX_X_XM_IMM(x, op, T_F3 | T_MAP5 | T_EW0 | T_YMM | T_ER_Z | T_MUST_EVEX | T_B16, 0x7D); } |