aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/misc.cpp')
-rw-r--r--test/misc.cpp41
1 files changed, 40 insertions, 1 deletions
diff --git a/test/misc.cpp b/test/misc.cpp
index 5fa5ea7..e7db693 100644
--- a/test/misc.cpp
+++ b/test/misc.cpp
@@ -199,5 +199,44 @@ CYBOZU_TEST_AUTO(vpclmulqdq)
CYBOZU_TEST_EQUAL(c.getSize(), n);
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
}
-
+CYBOZU_TEST_AUTO(vcompressb_w)
+{
+ struct Code : Xbyak::CodeGenerator {
+ Code()
+ {
+ vcompressb(ptr[rax + 64], xmm1);
+ vcompressb(xmm30 | k5, xmm1);
+ vcompressb(ptr[rax + 64], ymm1);
+ vcompressb(ymm30 | k3 |T_z, ymm1);
+ vcompressb(ptr[rax + 64], zmm1);
+ vcompressb(zmm30 | k2 |T_z, zmm1);
+
+ vcompressw(ptr[rax + 64], xmm1);
+ vcompressw(xmm30 | k5, xmm1);
+ vcompressw(ptr[rax + 64], ymm1);
+ vcompressw(ymm30 | k3 |T_z, ymm1);
+ vcompressw(ptr[rax + 64], zmm1);
+ vcompressw(zmm30 | k2 |T_z, zmm1);
+ }
+ } c;
+ const uint8_t tbl[] = {
+ 0x62, 0xf2, 0x7d, 0x08, 0x63, 0x48, 0x40,
+ 0x62, 0x92, 0x7d, 0x0d, 0x63, 0xce,
+ 0x62, 0xf2, 0x7d, 0x28, 0x63, 0x48, 0x40,
+ 0x62, 0x92, 0x7d, 0xab, 0x63, 0xce,
+ 0x62, 0xf2, 0x7d, 0x48, 0x63, 0x48, 0x40,
+ 0x62, 0x92, 0x7d, 0xca, 0x63, 0xce,
+
+
+ 0x62, 0xf2, 0xfd, 0x08, 0x63, 0x48, 0x20,
+ 0x62, 0x92, 0xfd, 0x0d, 0x63, 0xce,
+ 0x62, 0xf2, 0xfd, 0x28, 0x63, 0x48, 0x20,
+ 0x62, 0x92, 0xfd, 0xab, 0x63, 0xce,
+ 0x62, 0xf2, 0xfd, 0x48, 0x63, 0x48, 0x20,
+ 0x62, 0x92, 0xfd, 0xca, 0x63, 0xce,
+ };
+ const size_t n = sizeof(tbl) / sizeof(tbl[0]);
+ CYBOZU_TEST_EQUAL(c.getSize(), n);
+ CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
+}
#endif