diff --git a/gen/gen_avx512.cpp b/gen/gen_avx512.cpp index 54b589f..216a821 100644 --- a/gen/gen_avx512.cpp +++ b/gen/gen_avx512.cpp @@ -542,6 +542,7 @@ void putCvt() puts("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); }"); puts("void vcvttsd2usi(const Reg32e& r, const Operand& op) { int type = (T_F2 | T_0F | T_MUST_EVEX | T_N8 | T_SAE_X) | (r.isREG(64) ? T_EW1 : T_EW0); opAVX_X_X_XM(Xmm(r.getIdx()), xm0, op, type, 0x78); }"); puts("void vcvttss2usi(const Reg32e& r, const Operand& op) { int type = (T_F3 | T_0F | T_MUST_EVEX | T_N4 | T_SAE_X) | (r.isREG(64) ? T_EW1 : T_EW0); opAVX_X_X_XM(Xmm(r.getIdx()), xm0, op, type, 0x78); }"); + puts("void vcvtsh2si(const Reg32e& r, const Operand& op) { int type = (T_F3 | T_MAP5 | T_MUST_EVEX | T_N2 | T_ER_X) | (r.isREG(64) ? T_EW1 : T_EW0); opVex(r, &xm0, op, type, 0x2D); }"); puts("void vcvtuqq2ps(const Xmm& x, const Operand& op) { opCvt2(x, op, T_F2 | T_0F | T_YMM | T_MUST_EVEX | T_EW1 | T_B64 | T_ER_Z, 0x7A); }"); puts("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); }"); puts("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); }"); diff --git a/test/misc.cpp b/test/misc.cpp index 80317d0..3976f54 100644 --- a/test/misc.cpp +++ b/test/misc.cpp @@ -1074,6 +1074,14 @@ CYBOZU_TEST_AUTO(vaddph) vcvtss2sh(xmm1|k1|T_z|T_rd_sae, xmm2, xmm3); vcvtss2sh(xmm1, xmm2, ptr [rax+0x40]); + vcvtsh2si(edx|T_rd_sae, xmm1); + vcvtsh2si(edx, ptr [rax+0x40]); + vcvtsh2si(rdx|T_rd_sae, xmm1); + vcvtsh2si(r8, ptr [rax+0x40]); + + + + } } c; @@ -1325,6 +1333,12 @@ CYBOZU_TEST_AUTO(vaddph) // vcvtss2sh 0x62, 0xf5, 0x6c, 0xb9, 0x1d, 0xcb, 0x62, 0xf5, 0x6c, 0x08, 0x1d, 0x48, 0x10, + + // vcvtsh2si + 0x62, 0xf5, 0x7e, 0x38, 0x2d, 0xd1, + 0x62, 0xf5, 0x7e, 0x08, 0x2d, 0x50, 0x20, + 0x62, 0xf5, 0xfe, 0x38, 0x2d, 0xd1, + 0x62, 0x75, 0xfe, 0x08, 0x2d, 0x40, 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 2f7367e..cb90f8d 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 vcvtsh2si(const Reg32e& r, const Operand& op) { int type = (T_F3 | T_MAP5 | T_MUST_EVEX | T_N2 | T_ER_X) | (r.isREG(64) ? T_EW1 : T_EW0); opVex(r, &xm0, op, type, 0x2D); } 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 vcvtss2sh(const Xmm& x1, const Xmm& x2, const Operand& op) { opAVX_X_X_XM(x1, x2, op, T_N4 | T_MAP5 | T_EW0 | T_ER_X | T_MUST_EVEX, 0x1D); } 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); }