diff options
author | MITSUNARI Shigeo <[email protected]> | 2021-06-06 11:53:33 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2021-06-06 11:53:33 +0900 |
commit | 19043cb9acc660f53b08e700d4032af5ebcb0986 (patch) | |
tree | e5a749ce931adc38d50da959ff60681718d6756d | |
parent | b5acb1d1c613decb663f6b0a185e4862c1b1a726 (diff) | |
download | xbyak-19043cb9acc660f53b08e700d4032af5ebcb0986.tar.gz xbyak-19043cb9acc660f53b08e700d4032af5ebcb0986.zip |
add test for gather/scatter
-rw-r--r-- | test/misc.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/misc.cpp b/test/misc.cpp index 2f0413e..740b56a 100644 --- a/test/misc.cpp +++ b/test/misc.cpp @@ -135,6 +135,29 @@ CYBOZU_TEST_AUTO(kmask) } c; } +CYBOZU_TEST_AUTO(gather) +{ + struct Code : Xbyak::CodeGenerator { + Code() + { + CYBOZU_TEST_NO_EXCEPTION(vgatherdpd(xmm1, ptr[eax+xmm2], xmm3)); + CYBOZU_TEST_EXCEPTION(vgatherdpd(xmm1, ptr[eax+xmm1], xmm2), std::exception); + CYBOZU_TEST_EXCEPTION(vgatherdpd(xmm1, ptr[eax+xmm2], xmm1), std::exception); + CYBOZU_TEST_EXCEPTION(vgatherdpd(xmm2, ptr[eax+xmm1], xmm1), std::exception); + + CYBOZU_TEST_NO_EXCEPTION(vgatherdpd(xmm1|k2, ptr[eax+xmm2])); + CYBOZU_TEST_EXCEPTION(vgatherdpd(xmm1, ptr[eax+xmm2]), std::exception); + CYBOZU_TEST_EXCEPTION(vgatherdpd(xmm1|k2, ptr[eax+xmm1]), std::exception); + + CYBOZU_TEST_NO_EXCEPTION(vpscatterdd(ptr[eax+xmm2]|k2, xmm1)); + CYBOZU_TEST_NO_EXCEPTION(vpscatterdd(ptr[eax+xmm2], xmm1|k2)); + CYBOZU_TEST_NO_EXCEPTION(vpscatterdd(ptr[eax+xmm2]|k3, xmm2)); + + CYBOZU_TEST_EXCEPTION(vpscatterdd(ptr[eax+xmm2], xmm1), std::exception); + } + } c; +} + #ifdef XBYAK64 CYBOZU_TEST_AUTO(vfmaddps) { |