aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2021-09-13 14:39:56 +0900
committerMITSUNARI Shigeo <[email protected]>2021-09-13 14:39:56 +0900
commit3ff69a474c7e48646c074a0eb5c7c76970fd1596 (patch)
tree57af91816719611ae36257633d94afcc4795faa1
parent678b5295687dcfa13cc4bd35b46c4994d5a9fc92 (diff)
downloadxbyak-3ff69a474c7e48646c074a0eb5c7c76970fd1596.tar.gz
xbyak-3ff69a474c7e48646c074a0eb5c7c76970fd1596.zip
add vcvtph2pd
-rw-r--r--gen/gen_avx512.cpp5
-rw-r--r--test/misc.cpp22
-rw-r--r--xbyak/xbyak_mnemonic.h1
3 files changed, 28 insertions, 0 deletions
diff --git a/gen/gen_avx512.cpp b/gen/gen_avx512.cpp
index f225097..eca7c7f 100644
--- a/gen/gen_avx512.cpp
+++ b/gen/gen_avx512.cpp
@@ -556,6 +556,8 @@ void putCvt()
{ 0x5B, "vcvtqq2ps", T_0F | T_YMM | T_MUST_EVEX | T_EW1 | T_B64 | T_ER_Z, 2 },
{ 0x78, "vcvttpd2udq", T_0F | T_YMM | T_MUST_EVEX | T_EW1 | T_B64 | T_SAE_Z, 2 },
{ 0x7A, "vcvtuqq2ps", T_F2 | T_0F | T_YMM | T_MUST_EVEX | T_EW1 | T_B64 | T_ER_Z, 2 },
+
+ { 0x5A, "vcvtph2pd", T_MAP5 | T_MUST_EVEX | T_YMM | T_EW0 | T_B16 | T_N4 | T_N_VL | T_SAE_X, 3 },
};
for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) {
const Tbl& p = tbl[i];
@@ -570,6 +572,9 @@ void putCvt()
case 2:
printf("void %s(const Xmm& x, const Operand& op) { opCvt2(x, op, %s, 0x%02X); }\n", p.name, type.c_str(), p.code);
break;
+ case 3:
+ printf("void %s(const Xmm& x, const Operand& op) { if (!op.isXMM() && !op.isMEM()) XBYAK_THROW(ERR_BAD_MEM_SIZE) opVex(x, 0, op, %s, 0x%02X); }\n", p.name, type.c_str(), p.code);
+ break;
}
}
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); }");
diff --git a/test/misc.cpp b/test/misc.cpp
index 043782a..cf07b45 100644
--- a/test/misc.cpp
+++ b/test/misc.cpp
@@ -1129,6 +1129,17 @@ CYBOZU_TEST_AUTO(vaddph)
vcvttph2udq(zmm1|k5|T_z, ptr [rax+0x40]);
vcvttph2udq(zmm1|k5|T_z, ptr_b [rax+0x40]);
+
+ vcvtph2pd(xmm1, xmm5);
+ vcvtph2pd(xmm1, ptr [rax+0x40]);
+ vcvtph2pd(xmm1, ptr_b [rax+0x40]);
+ vcvtph2pd(ymm1|k2|T_z, xmm5);
+ vcvtph2pd(ymm1, ptr [rax+0x40]);
+ vcvtph2pd(ymm1, ptr_b [rax+0x40]);
+ vcvtph2pd(zmm1|k5|T_z|T_sae, xmm3);
+ vcvtph2pd(zmm1|k5|T_z, ptr [rax+0x40]);
+ vcvtph2pd(zmm1|k5|T_z, ptr_b [rax+0x40]);
+
}
} c;
const uint8_t tbl[] = {
@@ -1440,6 +1451,17 @@ CYBOZU_TEST_AUTO(vaddph)
0x62, 0xf5, 0x7c, 0x9d, 0x78, 0xcb,
0x62, 0xf5, 0x7c, 0xcd, 0x78, 0x48, 0x02,
0x62, 0xf5, 0x7c, 0xdd, 0x78, 0x48, 0x20,
+
+ // vcvtph2pd
+ 0x62, 0xf5, 0x7c, 0x08, 0x5a, 0xcd,
+ 0x62, 0xf5, 0x7c, 0x08, 0x5a, 0x48, 0x10,
+ 0x62, 0xf5, 0x7c, 0x18, 0x5a, 0x48, 0x20,
+ 0x62, 0xf5, 0x7c, 0xaa, 0x5a, 0xcd,
+ 0x62, 0xf5, 0x7c, 0x28, 0x5a, 0x48, 0x08,
+ 0x62, 0xf5, 0x7c, 0x38, 0x5a, 0x48, 0x20,
+ 0x62, 0xf5, 0x7c, 0x9d, 0x5a, 0xcb,
+ 0x62, 0xf5, 0x7c, 0xcd, 0x5a, 0x48, 0x04,
+ 0x62, 0xf5, 0x7c, 0xdd, 0x5a, 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 2b7275d..6438fb1 100644
--- a/xbyak/xbyak_mnemonic.h
+++ b/xbyak/xbyak_mnemonic.h
@@ -1902,6 +1902,7 @@ void vcvtpd2qq(const Xmm& x, const Operand& op) { opAVX_X_XM_IMM(x, op, T_66 | T
void vcvtpd2udq(const Xmm& x, const Operand& op) { opCvt2(x, op, T_0F | T_EW1 | T_YMM | T_ER_Z | T_MUST_EVEX | T_B64, 0x79); }
void vcvtpd2uqq(const Xmm& x, const Operand& op) { opAVX_X_XM_IMM(x, op, T_66 | T_0F | T_EW1 | T_YMM | T_ER_Z | T_MUST_EVEX | T_B64, 0x79); }
void vcvtph2dq(const Xmm& x, const Operand& op) { checkCvt1(x, op); opVex(x, 0, op, T_N8 | T_N_VL | T_66 | T_MAP5 | T_EW0 | T_YMM | T_ER_Y | T_MUST_EVEX | T_B16, 0x5B); }
+void vcvtph2pd(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_MAP5 | T_EW0 | T_YMM | T_SAE_X | T_MUST_EVEX | T_B16, 0x5A); }
void vcvtph2psx(const Xmm& x, const Operand& op) { checkCvt1(x, op); opVex(x, 0, op, T_N8 | T_N_VL | T_66 | T_MAP6 | T_EW0 | T_YMM | T_SAE_Y | T_MUST_EVEX | T_B16, 0x13); }
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 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); }