From 2958a19bbb870eb6206aff40b4f6da99532694ff Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Sun, 12 Sep 2021 12:09:03 +0900 Subject: [PATCH] add vcvtsh2ss --- gen/gen_avx512.cpp | 1 + test/misc.cpp | 9 +++++++++ xbyak/xbyak_mnemonic.h | 1 + 3 files changed, 11 insertions(+) diff --git a/gen/gen_avx512.cpp b/gen/gen_avx512.cpp index e83323e..ba2db99 100644 --- a/gen/gen_avx512.cpp +++ b/gen/gen_avx512.cpp @@ -404,6 +404,7 @@ void putX_X_XM_IMM() { 0x5A, "vcvtsd2sh", T_F2 | T_MAP5 | T_MUST_EVEX | T_EW1 | T_ER_X | T_N8, false }, { 0x5A, "vcvtsh2sd", T_F3 | T_MAP5 | T_MUST_EVEX | T_EW0 | T_SAE_X | T_N2, false }, + { 0x13, "vcvtsh2ss", T_MAP6 | T_MUST_EVEX | T_EW0 | T_SAE_X | T_N2, false }, }; 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 39e6b94..f99b5c0 100644 --- a/test/misc.cpp +++ b/test/misc.cpp @@ -1067,6 +1067,11 @@ CYBOZU_TEST_AUTO(vaddph) vcvtsh2sd(xmm1|k1|T_z|T_sae, xmm2, xmm3); vcvtsh2sd(xmm1, xmm2, ptr [rax+0x40]); + + vcvtsh2ss(xmm1|k1|T_z|T_sae, xmm2, xmm3); + vcvtsh2ss(xmm1, xmm2, ptr [rax+0x40]); + + } } c; const uint8_t tbl[] = { @@ -1309,6 +1314,10 @@ CYBOZU_TEST_AUTO(vaddph) // vcvtsh2sd 0x62, 0xf5, 0x6e, 0x99, 0x5a, 0xcb, 0x62, 0xf5, 0x6e, 0x08, 0x5a, 0x48, 0x20, + + // vcvtsh2ss + 0x62, 0xf6, 0x6c, 0x99, 0x13, 0xcb, + 0x62, 0xf6, 0x6c, 0x08, 0x13, 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 cb3f286..2335ca5 100644 --- a/xbyak/xbyak_mnemonic.h +++ b/xbyak/xbyak_mnemonic.h @@ -1909,6 +1909,7 @@ void vcvtqq2ps(const Xmm& x, const Operand& op) { opCvt2(x, op, T_0F | T_YMM | T void vcvtsd2sh(const Xmm& x1, const Xmm& x2, const Operand& op) { opAVX_X_X_XM(x1, x2, op, T_N8 | T_F2 | T_MAP5 | T_EW1 | T_ER_X | T_MUST_EVEX, 0x5A); } void vcvtsd2usi(const Reg32e& r, const Operand& op) { int type = (T_F2 | T_0F | T_MUST_EVEX | T_N8 | T_ER_X) | (r.isREG(64) ? T_EW1 : T_EW0); opAVX_X_X_XM(Xmm(r.getIdx()), xm0, op, type, 0x79); } void vcvtsh2sd(const Xmm& x1, const Xmm& x2, const Operand& op) { opAVX_X_X_XM(x1, x2, op, T_N2 | T_F3 | T_MAP5 | T_EW0 | T_SAE_X | T_MUST_EVEX, 0x5A); } +void vcvtsh2ss(const Xmm& x1, const Xmm& x2, const Operand& op) { opAVX_X_X_XM(x1, x2, op, T_N2 | T_MAP6 | T_EW0 | T_SAE_X | T_MUST_EVEX, 0x13); } void vcvtss2usi(const Reg32e& r, const Operand& op) { int type = (T_F3 | T_0F | T_MUST_EVEX | T_N4 | T_ER_X) | (r.isREG(64) ? T_EW1 : T_EW0); opAVX_X_X_XM(Xmm(r.getIdx()), xm0, op, type, 0x79); } void vcvttpd2qq(const Xmm& x, const Operand& op) { opAVX_X_XM_IMM(x, op, T_66 | T_0F | T_EW1 | T_YMM | T_SAE_Z | T_MUST_EVEX | T_B64, 0x7A); } void vcvttpd2udq(const Xmm& x, const Operand& op) { opCvt2(x, op, T_0F | T_YMM | T_MUST_EVEX | T_EW1 | T_B64 | T_SAE_Z, 0x78); }