c926d9f409
9357732aa v6.06 b161a3eb7 update changelog e5453b064 Merge branch 'dev' 2a265d9d9 memfd: keep file descriptor open during allocation lifetime 31ff018ed replace unsigned int with uint32_t in xbyak_util.h e427b2231 move Type into Cpu 8cf41063b refactoring Cpu 66d62968d add -cpuid to test_util cf7cb744c add comments 028112949 add detection of clzero c88007b03 update doc 4cb2e77a9 v6.052 015c27cf6 Merge branch 'dev' d808f9ecb add test of Cpu::has b48a7bb1b add operator== to Type 1a90f456c v6.051 96cb1d660 update changelog 1f5a77f56 Merge branch 'dev' 87e14f02a add test with noexception 30144f809 fix error when XBYAK_NO_EXCEPTION is defined ec15751df Merge branch 'dev' 4831b3fb3 v6.05 9ddf251f3 remove debug code 905b31bab fix typo 72d1ac118 add movdir64b a6665996b add detection of movdir64b 92ddc6dfd remove Type::operator<<() because it's ambiguous 9cdd40f5e add detection of movdiri 379f8bf37 add movdiri 0ad6db138 fix cldemote test for 32-bit 84ab46bb3 add cldemote to Cpu a84ddc12d support cldemote 3a6cc626e add clwb 38c40c02e detection of clflushopt c061ac839 avoid unnecessary replacement in readme.md 095ebbff1 extend Cpu::Type to 128 bit 3ea8e45d3 Merge branch 'dev' f7bfc2634 v6.041 ab4e52d67 update doc 2bef54399 include intrin.h on mingw 621ed0775 Merge branch 'dev' 4f5893e1e memfd_create: disable for ANDROID_API < 30 684d69db0 Merge branch 'dev' ea88b6d85 disable warning on mingw 7e8923fa5 add colon 9914216bd Merge branch 'dev' b335602ff [skip ci] tweak doc 25fbb3996 tweak doc 122054dc4 Formatted Supported OS Section d4fa7e46b Reworked Authors Section 9e4b64a74 Adjusted Spacing ff9fdb45f Use Github Sponsor Widget 893b31d46 Added Quicklinks 2d2adf78b Added License Badge 335b5941b Formatted Header 70603addf Moved Install / Usage Into Dedicated Files 1659d28fe Moved History Into Dedicated File fb953284b Merge branch 'dev' dbd96b277 add news 898c354e6 v6.04 f8e2ad1e9 add waitpkg detection to Cpu a220fd69a add umwait 64ec053e6 add umonitor 764d54f6f add tpause c68646e8d remove warning of vc 4e8214ca2 Merge branch 'dev' 360f4b673 test badSSE only for 32-bit mode a9fddc454 fix typo of readme 250b5dc39 fix typo of readme c46e92756 Merge branch 'dev' 31b7cd350 v6.03 a2f9ed085 rename isValidXMm to isValidSSE 2bc8fcbd3 add tests to badSSE 6de93fb88 add baseSSE test e2eda384c update doc 71a7b1773 fix condition to throw error for SSE instructions when using XMM16-XMM31 615b665cc sample/memfd shows /proc/self/maps 2861517f2 add memfd sample 507b0285e apt update at first 452c07f77 typedef for no-MmapAllocator 8af6e2026 minimize diff 0af3b5d07 Allocator: take optional name parameter and use it with memfd a67e24505 Merge branch 'dev' b3892c15e Merge pull request #138 from Tachi107/make-cxx-cpp-ld-flags b4eddaced build(make): honour CXXFLAGS, CPPFLAGS and LDFLAGS fbe60e590 test generates only a.asm 0a4a7571d Merge branch 'patch-1' of https://github.com/Tachi107/xbyak into Tachi107-patch-1 55b9f131b build(make): fix clean target in test/Makefile 7aef3ff54 Merge branch 'dev' 82e0deb8a v6.02 4d9906a94 fix condition to throw error for invalid displacements c79311a51 fix test_util.cpp 9b2c175b3 Merge branch 'dev' 06d797e33 Allow parallel feature checks 2a85bba3f Merge branch 'dev' 8d5af80a6 v6.01 df39606fe update doc 08f11817c supprt retf 1abfc3465 support call(mem, T_FAR) fb158f901 support jmp(mem, T_FAR) 9be47ceb2 Merge branch 'lioncash-hlt' into dev 3162eb16f add test of hlt bb55725a9 xbyak: Add hlt opcode function 47cf85fdb fix conflict b29e471ea build(meson): fix CMake Config file include dir 2cc21925f delete the sentences translated into Japanese from COPYRIGHT dca3930de remove tabs cecd204a5 Merge pull request #129 from Tachi107/meson-cmake-config 345de8a54 build(meson): generate CMake package config files e831805cc revert change of the type of Pack::util::operator[] fc9d953e5 util::Pack has not pointer but instance of Reg64 0868c54a9 use _WIN32 instead of _MSC_VER for mingw64 894a1b14a use original uint8_t dfc079ca1 add cstrs of Xbyak::util::Pack for 11 or 12 args 06e8f531f Merge branch 'Tachi107-meson' into dev ef90b6bd2 Makefile updates the version of meson.build 0000938f5 build: add Meson support This allows Meson users to use xbyak more easly, while it also provides a pkg-config file generator, useful to Linux distributions 757e4063f v6.00 b3489f548 add vcvtusi2sh 16d9898ab add vcvtsi2sh cfc03cb8f unify T_66, T_F3, T_F2 flags 02fa7057d add vcvttph2qq 4e72a9dc4 add vcvttsh2usi 05d08e05b add vcvttsh2si 621e6548c add vcvtsh2usi 34abda5c5 extend vcvtps2ph facd622b2 add vcvtw2ph 270af1cb2 add vcvtuw2ph 17dc697cd add vcvttph2w 62f022aea vcvttph2uw 836346bfd add vcvtph2w 300edb37b add vcvtph2uw 737904b5a add vcvtuqq2ph 52b2ebf18 add vcvtqq2ph 6761f1e05 add vcvtpd2ph 03f95b7e3 add vcvtudq2ph 64430b2bb add vcvtps2phx 88e426aa4 add vcvtdq2ph bf28a94a5 add vcvttph2uqq 4c4e665d3 add vcvtph2uqq 2b0099b63 add vcvtph2qq 3ff69a474 add vcvtph2pd 678b52956 add vcvttph2udq 72a5717e4 add vcvttph2dq 524d52bf6 add vcvtph2udq d1cf4db97 add vcvtph2psx fccd2c49b add vcvtph2dq 6530f4099 refactor gen-cvt c51e16156 tweak ed9f6c72a add vcvtsh2si ac1407bd1 add vcvtss2sh 2958a19bb add vcvtsh2ss 10d683303 add vcvtsh2sd 3920c950c add vcvtsd2sh 9a1b73932 add vmovw d86e4882f vmovsh xmm, addr 61f85a204 add vmovsh 847166cef add tests of vgetmant{ph,sh} c11a21cf4 add vgetmantph 55ab361f0 add tests of vgetexp{ph,sh} 8653f4152 add vgetexpsh 697eeb627 add vgetexpph ee920a991 add vfpclasssh 7aed436e6 add vfpclassph 56dca14e4 v5.997 b3b1e4e3c fix vrndscale* to support {sae} 681077eb1 add vrndscalesh 2f14eae85 add vrndscaleph f96870a44 add vreducesh 043c94ae9 add vreduceph 37bf3bb49 add vscalefsh c16f91c59 add vscalefph 61ad45935 add vsqrtsh e00b508d5 add vsqrtph 52765d54f add vrsqrtsh 2ec6a7ab4 add vrsqrtph b1ff7891d add vrcpph, vrcpsh 4f543ca0e add vucomish 412b95f02 add vf{,c}mulcph 9fc53baed add vf{,c}maddcph 0098ce98d add vf{,n}m{sub,add}sh 849dffb10 add vfmadd, vfnmadd, vfnmsub for avx512-fp16 eadb93d0b add vfmsubaddcph 9b8802cba add vfmaddsub{132,213,231}ph ab9481b4c add vcomish cd036ea17 fix vcmpsh b494b321a vcmpsh supports ptr_b eb2d63c83 vcmpph uses T_B16 a480b3dd9 v5.996 16d18b1d4 fix v{add,sub,mul,...}{sd,ss} to support T_rd_sae etc. 66c6ca1ab support vaddsh with T_rd_sae 6333ec099 add m16bcst 84053c8e7 add vcmpph 5df23d263 move FP16 to AVX-512 d5c7336f8 fix disp scaling of v{add,sub,mul,div,max,min}sh ebf29542d add vaddsh test f29689d02 add test of vaddph 2c4b6ac16 add v{add,sub,mul,div,min,max}{ph,sh} edf3c2f6f remove mask for mmm 2c561aad6 add T_MAP5 and T_MAP6 acd360c38 add Cpu::tAVX512_FP16 1554f479c remove unused flags(tSSE4a and tSSE5) of Cpu c313a8758 update CMakeLists.txt version 740b39e24 Merge pull request #122 from abouvier/cmake 10a1e5759 v5.995 0a557a099 rename XBYAK_MEMFD_CREATE to XBYAK_USE_MEMFD 0ad9b9bbe Merge branch 'captain5050-master' into dev c7bb66383 fix for mac and enable it if XBYAK_MEMFD_CREATE is defined c1e6569f1 fix cmake config files ccd4130ec Name mmap pages on Linux with memfd_create 2fb843c32 v5.994 413a66b44 add alias of vcmpXX{ps,pd,ss,sd} for mask register 6f4f76890 v5.993 19043cb9a add test for gather/scatter b5acb1d1c gather test does not generate bad combination of regs 67ec1674a check restriction of gather/scatter regs ea9814f4f check bad reg combination of gather a34850b2d add endbr32 and endbr64 git-subtree-dir: externals/xbyak git-subtree-split: 9357732aa2aa3cf97809027596dfa5c61d1515b2
1977 lines
62 KiB
C++
1977 lines
62 KiB
C++
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <string>
|
|
#include <xbyak/xbyak.h>
|
|
#include <xbyak/xbyak_util.h>
|
|
#include <cybozu/inttype.hpp>
|
|
#include <cybozu/test.hpp>
|
|
|
|
using namespace Xbyak;
|
|
|
|
CYBOZU_TEST_AUTO(setSize)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code() : Xbyak::CodeGenerator(4096)
|
|
{
|
|
setSize(4095);
|
|
db(1);
|
|
size_t size = getSize();
|
|
CYBOZU_TEST_EQUAL(size, 4096u);
|
|
CYBOZU_TEST_NO_EXCEPTION(setSize(size));
|
|
CYBOZU_TEST_EXCEPTION(db(1), Xbyak::Error);
|
|
}
|
|
} code;
|
|
}
|
|
|
|
#ifdef XBYAK64
|
|
CYBOZU_TEST_AUTO(badSSE)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
CYBOZU_TEST_EXCEPTION(paddd(xm16, xm1), Xbyak::Error);
|
|
CYBOZU_TEST_EXCEPTION(pslld(xm16, 1), Xbyak::Error);
|
|
CYBOZU_TEST_EXCEPTION(movapd(xm16, xm1), Xbyak::Error);
|
|
CYBOZU_TEST_EXCEPTION(movhpd(xm16, ptr[eax]), Xbyak::Error);
|
|
CYBOZU_TEST_EXCEPTION(pextrb(eax, xm16, 1), Xbyak::Error);
|
|
}
|
|
} code;
|
|
}
|
|
#endif
|
|
|
|
CYBOZU_TEST_AUTO(compOperand)
|
|
{
|
|
using namespace Xbyak::util;
|
|
CYBOZU_TEST_ASSERT(eax == eax);
|
|
CYBOZU_TEST_ASSERT(ecx != xmm0);
|
|
CYBOZU_TEST_ASSERT(ptr[eax] == ptr[eax]);
|
|
CYBOZU_TEST_ASSERT(dword[eax] != ptr[eax]);
|
|
CYBOZU_TEST_ASSERT(ptr[eax] != ptr[eax+3]);
|
|
}
|
|
|
|
CYBOZU_TEST_AUTO(mov_const)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
const struct {
|
|
uint64_t v;
|
|
int bit;
|
|
bool error;
|
|
} tbl[] = {
|
|
{ uint64_t(-1), 8, false },
|
|
{ 0x12, 8, false },
|
|
{ 0x80, 8, false },
|
|
{ 0xff, 8, false },
|
|
{ 0x100, 8, true },
|
|
|
|
{ 1, 16, false },
|
|
{ uint64_t(-1), 16, false },
|
|
{ 0x7fff, 16, false },
|
|
{ 0xffff, 16, false },
|
|
{ 0x10000, 16, true },
|
|
|
|
{ uint64_t(-1), 32, false },
|
|
{ 0x7fffffff, 32, false },
|
|
{ uint64_t(-0x7fffffff), 32, false },
|
|
{ 0xffffffff, 32, false },
|
|
{ 0x100000000ull, 32, true },
|
|
|
|
#ifdef XBYAK64
|
|
{ uint64_t(-1), 64, false },
|
|
{ 0x7fffffff, 64, false },
|
|
{ 0xffffffffffffffffull, 64, false },
|
|
{ 0x80000000, 64, true },
|
|
{ 0xffffffff, 64, true },
|
|
#endif
|
|
};
|
|
for (size_t i = 0; i < CYBOZU_NUM_OF_ARRAY(tbl); i++) {
|
|
const int bit = tbl[i].bit;
|
|
const uint64_t v = tbl[i].v;
|
|
const Xbyak::AddressFrame& af = bit == 8 ? byte : bit == 16 ? word : bit == 32 ? dword : qword;
|
|
if (tbl[i].error) {
|
|
CYBOZU_TEST_EXCEPTION(mov(af[eax], v), Xbyak::Error);
|
|
} else {
|
|
CYBOZU_TEST_NO_EXCEPTION(mov(af[eax], v));
|
|
}
|
|
}
|
|
#ifdef XBYAK64
|
|
CYBOZU_TEST_NO_EXCEPTION(mov(rax, ptr[(void*)0x7fffffff]));
|
|
CYBOZU_TEST_EXCEPTION(mov(rax, ptr[(void*)0x17fffffff]), Xbyak::Error);
|
|
#ifdef XBYAK_OLD_DISP_CHECK
|
|
CYBOZU_TEST_NO_EXCEPTION(mov(rax, ptr[(void*)0x80000000]));
|
|
CYBOZU_TEST_NO_EXCEPTION(mov(rax, ptr[(void*)0xffffffff]));
|
|
#else
|
|
CYBOZU_TEST_EXCEPTION(mov(rax, ptr[(void*)0x80000000ull]), Xbyak::Error);
|
|
CYBOZU_TEST_EXCEPTION(mov(rax, ptr[(void*)0xffffffffull]), Xbyak::Error);
|
|
#endif
|
|
#endif
|
|
}
|
|
} code;
|
|
}
|
|
|
|
CYBOZU_TEST_AUTO(align)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
const size_t alignSize = 16;
|
|
for (int padding = 0; padding < 20; padding++) {
|
|
for (int i = 0; i < padding; i++) {
|
|
db(1);
|
|
}
|
|
align(alignSize);
|
|
CYBOZU_TEST_EQUAL(size_t(getCurr()) % alignSize, 0u);
|
|
}
|
|
align(alignSize);
|
|
const uint8_t *p = getCurr();
|
|
// do nothing if aligned
|
|
align(alignSize);
|
|
CYBOZU_TEST_EQUAL(p, getCurr());
|
|
}
|
|
} c;
|
|
}
|
|
CYBOZU_TEST_AUTO(kmask)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
CYBOZU_TEST_EXCEPTION(kmovb(k1, ax), std::exception);
|
|
CYBOZU_TEST_EXCEPTION(kmovw(k1, ax), std::exception);
|
|
CYBOZU_TEST_EXCEPTION(kmovd(k1, ax), std::exception);
|
|
CYBOZU_TEST_EXCEPTION(kmovq(k1, eax), std::exception);
|
|
#ifdef XBYAK64
|
|
CYBOZU_TEST_EXCEPTION(kmovb(k1, rax), std::exception);
|
|
CYBOZU_TEST_EXCEPTION(kmovw(k1, rax), std::exception);
|
|
CYBOZU_TEST_EXCEPTION(kmovd(k1, rax), std::exception);
|
|
CYBOZU_TEST_NO_EXCEPTION(kmovq(k1, rax));
|
|
#endif
|
|
CYBOZU_TEST_NO_EXCEPTION(vmovaps(xm0|k0, ptr[eax]));
|
|
checkT_z();
|
|
}
|
|
void checkT_z()
|
|
{
|
|
const uint8_t *p1 = getCurr();
|
|
vmovaps(zm0, ptr[eax]);
|
|
const uint8_t *p2 = getCurr();
|
|
vmovaps(zm0|T_z, ptr[eax]);
|
|
const uint8_t *end = getCurr();
|
|
CYBOZU_TEST_EQUAL(p2 - p1, end - p2);
|
|
CYBOZU_TEST_EQUAL_ARRAY(p1, p2, end - p2);
|
|
}
|
|
} 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)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
v4fmaddps(zmm1, zmm8, ptr [rdx + 64]);
|
|
v4fmaddss(xmm15, xmm8, ptr [rax + 64]);
|
|
v4fnmaddps(zmm5 | k5, zmm2, ptr [rcx + 0x80]);
|
|
v4fnmaddss(xmm31, xmm2, ptr [rsp + 0x80]);
|
|
vp4dpwssd(zmm23 | k7 | T_z, zmm1, ptr [rax + 64]);
|
|
vp4dpwssds(zmm10 | k4, zmm3, ptr [rsp + rax * 4 + 64]);
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
0x62, 0xf2, 0x3f, 0x48, 0x9a, 0x4a, 0x04,
|
|
0x62, 0x72, 0x3f, 0x08, 0x9b, 0x78, 0x04,
|
|
0x62, 0xf2, 0x6f, 0x4d, 0xaa, 0x69, 0x08,
|
|
0x62, 0x62, 0x6f, 0x08, 0xab, 0x7c, 0x24, 0x08,
|
|
0x62, 0xe2, 0x77, 0xcf, 0x52, 0x78, 0x04,
|
|
0x62, 0x72, 0x67, 0x4c, 0x53, 0x54, 0x84, 0x04,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
}
|
|
CYBOZU_TEST_AUTO(vaes)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
vaesdec(xmm20, xmm30, ptr [rcx + 64]);
|
|
vaesdec(ymm1, ymm2, ptr [rcx + 64]);
|
|
vaesdec(zmm1, zmm2, ptr [rcx + 64]);
|
|
|
|
vaesdeclast(xmm20, xmm30, ptr [rax + 64]);
|
|
vaesdeclast(ymm20, ymm30, ptr [rax + 64]);
|
|
vaesdeclast(zmm20, zmm30, ptr [rax + 64]);
|
|
|
|
vaesenc(xmm20, xmm30, ptr [rcx + 64]);
|
|
vaesenc(ymm1, ymm2, ptr [rcx + 64]);
|
|
vaesenc(zmm1, zmm2, ptr [rcx + 64]);
|
|
|
|
vaesenclast(xmm20, xmm30, ptr [rax + 64]);
|
|
vaesenclast(ymm20, ymm30, ptr [rax + 64]);
|
|
vaesenclast(zmm20, zmm30, ptr [rax + 64]);
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
0x62, 0xE2, 0x0D, 0x00, 0xDE, 0x61, 0x04,
|
|
0xC4, 0xE2, 0x6D, 0xDE, 0x49, 0x40,
|
|
0x62, 0xF2, 0x6D, 0x48, 0xDE, 0x49, 0x01,
|
|
|
|
0x62, 0xE2, 0x0D, 0x00, 0xDF, 0x60, 0x04,
|
|
0x62, 0xE2, 0x0D, 0x20, 0xDF, 0x60, 0x02,
|
|
0x62, 0xE2, 0x0D, 0x40, 0xDF, 0x60, 0x01,
|
|
|
|
0x62, 0xE2, 0x0D, 0x00, 0xDC, 0x61, 0x04,
|
|
0xC4, 0xE2, 0x6D, 0xDC, 0x49, 0x40,
|
|
0x62, 0xF2, 0x6D, 0x48, 0xDC, 0x49, 0x01,
|
|
|
|
0x62, 0xE2, 0x0D, 0x00, 0xDD, 0x60, 0x04,
|
|
0x62, 0xE2, 0x0D, 0x20, 0xDD, 0x60, 0x02,
|
|
0x62, 0xE2, 0x0D, 0x40, 0xDD, 0x60, 0x01,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
}
|
|
CYBOZU_TEST_AUTO(vpclmulqdq)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
vpclmulqdq(xmm2, xmm3, ptr [rax + 64], 3);
|
|
vpclmulqdq(ymm2, ymm3, ptr [rax + 64], 3);
|
|
vpclmulqdq(zmm2, zmm3, ptr [rax + 64], 3);
|
|
|
|
vpclmulqdq(xmm20, xmm3, ptr [rax + 64], 3);
|
|
vpclmulqdq(ymm20, ymm3, ptr [rax + 64], 3);
|
|
vpclmulqdq(zmm20, zmm3, ptr [rax + 64], 3);
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
0xc4, 0xe3, 0x61, 0x44, 0x50, 0x40, 0x03,
|
|
0xc4, 0xe3, 0x65, 0x44, 0x50, 0x40, 0x03,
|
|
0x62, 0xf3, 0x65, 0x48, 0x44, 0x50, 0x01, 0x03,
|
|
0x62, 0xe3, 0x65, 0x08, 0x44, 0x60, 0x04, 0x03,
|
|
0x62, 0xe3, 0x65, 0x28, 0x44, 0x60, 0x02, 0x03,
|
|
0x62, 0xe3, 0x65, 0x48, 0x44, 0x60, 0x01, 0x03,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
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);
|
|
}
|
|
CYBOZU_TEST_AUTO(shld)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
vpshldw(xmm5|k3|T_z, xmm2, ptr [rax + 0x40], 5);
|
|
vpshldw(ymm5|k3|T_z, ymm2, ptr [rax + 0x40], 5);
|
|
vpshldw(zmm5|k3|T_z, zmm2, ptr [rax + 0x40], 5);
|
|
|
|
vpshldd(xmm5|k3|T_z, xmm2, ptr [rax + 0x40], 5);
|
|
vpshldd(ymm5|k3|T_z, ymm2, ptr [rax + 0x40], 5);
|
|
vpshldd(zmm5|k3|T_z, zmm2, ptr [rax + 0x40], 5);
|
|
|
|
vpshldq(xmm5|k3|T_z, xmm2, ptr [rax + 0x40], 5);
|
|
vpshldq(ymm5|k3|T_z, ymm2, ptr [rax + 0x40], 5);
|
|
vpshldq(zmm5|k3|T_z, zmm2, ptr [rax + 0x40], 5);
|
|
|
|
vpshldvw(xmm5|k3|T_z, xmm2, ptr [rax + 0x40]);
|
|
vpshldvw(ymm5|k3|T_z, ymm2, ptr [rax + 0x40]);
|
|
vpshldvw(zmm5|k3|T_z, zmm2, ptr [rax + 0x40]);
|
|
|
|
vpshldvd(xmm5|k3|T_z, xmm2, ptr [rax + 0x40]);
|
|
vpshldvd(ymm5|k3|T_z, ymm2, ptr [rax + 0x40]);
|
|
vpshldvd(zmm5|k3|T_z, zmm2, ptr [rax + 0x40]);
|
|
|
|
vpshldvq(xmm5|k3|T_z, xmm2, ptr [rax + 0x40]);
|
|
vpshldvq(ymm5|k3|T_z, ymm2, ptr [rax + 0x40]);
|
|
vpshldvq(zmm5|k3|T_z, zmm2, ptr [rax + 0x40]);
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
0x62, 0xf3, 0xed, 0x8b, 0x70, 0x68, 0x04, 0x05,
|
|
0x62, 0xf3, 0xed, 0xab, 0x70, 0x68, 0x02, 0x05,
|
|
0x62, 0xf3, 0xed, 0xcb, 0x70, 0x68, 0x01, 0x05,
|
|
|
|
0x62, 0xf3, 0x6d, 0x8b, 0x71, 0x68, 0x04, 0x05,
|
|
0x62, 0xf3, 0x6d, 0xab, 0x71, 0x68, 0x02, 0x05,
|
|
0x62, 0xf3, 0x6d, 0xcb, 0x71, 0x68, 0x01, 0x05,
|
|
|
|
0x62, 0xf3, 0xed, 0x8b, 0x71, 0x68, 0x04, 0x05,
|
|
0x62, 0xf3, 0xed, 0xab, 0x71, 0x68, 0x02, 0x05,
|
|
0x62, 0xf3, 0xed, 0xcb, 0x71, 0x68, 0x01, 0x05,
|
|
|
|
0x62, 0xf2, 0xed, 0x8b, 0x70, 0x68, 0x04,
|
|
0x62, 0xf2, 0xed, 0xab, 0x70, 0x68, 0x02,
|
|
0x62, 0xf2, 0xed, 0xcb, 0x70, 0x68, 0x01,
|
|
|
|
0x62, 0xf2, 0x6d, 0x8b, 0x71, 0x68, 0x04,
|
|
0x62, 0xf2, 0x6d, 0xab, 0x71, 0x68, 0x02,
|
|
0x62, 0xf2, 0x6d, 0xcb, 0x71, 0x68, 0x01,
|
|
|
|
0x62, 0xf2, 0xed, 0x8b, 0x71, 0x68, 0x04,
|
|
0x62, 0xf2, 0xed, 0xab, 0x71, 0x68, 0x02,
|
|
0x62, 0xf2, 0xed, 0xcb, 0x71, 0x68, 0x01,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
}
|
|
CYBOZU_TEST_AUTO(shrd)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
vpshrdw(xmm5|k3|T_z, xmm2, ptr [rax + 0x40], 5);
|
|
vpshrdw(ymm5|k3|T_z, ymm2, ptr [rax + 0x40], 5);
|
|
vpshrdw(zmm5|k3|T_z, zmm2, ptr [rax + 0x40], 5);
|
|
|
|
vpshrdd(xmm5|k3|T_z, xmm2, ptr [rax + 0x40], 5);
|
|
vpshrdd(ymm5|k3|T_z, ymm2, ptr [rax + 0x40], 5);
|
|
vpshrdd(zmm5|k3|T_z, zmm2, ptr [rax + 0x40], 5);
|
|
|
|
vpshrdq(xmm5|k3|T_z, xmm2, ptr [rax + 0x40], 5);
|
|
vpshrdq(ymm5|k3|T_z, ymm2, ptr [rax + 0x40], 5);
|
|
vpshrdq(zmm5|k3|T_z, zmm2, ptr [rax + 0x40], 5);
|
|
|
|
vpshrdvw(xmm5|k3|T_z, xmm2, ptr [rax + 0x40]);
|
|
vpshrdvw(ymm5|k3|T_z, ymm2, ptr [rax + 0x40]);
|
|
vpshrdvw(zmm5|k3|T_z, zmm2, ptr [rax + 0x40]);
|
|
|
|
vpshrdvd(xmm5|k3|T_z, xmm2, ptr [rax + 0x40]);
|
|
vpshrdvd(ymm5|k3|T_z, ymm2, ptr [rax + 0x40]);
|
|
vpshrdvd(zmm5|k3|T_z, zmm2, ptr [rax + 0x40]);
|
|
|
|
vpshrdvq(xmm5|k3|T_z, xmm2, ptr [rax + 0x40]);
|
|
vpshrdvq(ymm5|k3|T_z, ymm2, ptr [rax + 0x40]);
|
|
vpshrdvq(zmm5|k3|T_z, zmm2, ptr [rax + 0x40]);
|
|
|
|
vpshrdd(xmm5|k3|T_z, xmm2, ptr_b [rax + 0x40], 5);
|
|
vpshrdd(ymm5|k3|T_z, ymm2, ptr_b [rax + 0x40], 5);
|
|
vpshrdd(zmm5|k3|T_z, zmm2, ptr_b [rax + 0x40], 5);
|
|
|
|
vpshrdq(xmm5|k3|T_z, xmm2, ptr_b [rax + 0x40], 5);
|
|
vpshrdq(ymm5|k3|T_z, ymm2, ptr_b [rax + 0x40], 5);
|
|
vpshrdq(zmm5|k3|T_z, zmm2, ptr_b [rax + 0x40], 5);
|
|
|
|
vpshrdvd(xmm5|k3|T_z, xmm2, ptr_b [rax + 0x40]);
|
|
vpshrdvd(ymm5|k3|T_z, ymm2, ptr_b [rax + 0x40]);
|
|
vpshrdvd(zmm5|k3|T_z, zmm2, ptr_b [rax + 0x40]);
|
|
|
|
vpshrdvq(xmm5|k3|T_z, xmm2, ptr_b [rax + 0x40]);
|
|
vpshrdvq(ymm5|k3|T_z, ymm2, ptr_b [rax + 0x40]);
|
|
vpshrdvq(zmm5|k3|T_z, zmm2, ptr_b [rax + 0x40]);
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
0x62, 0xf3, 0xed, 0x8b, 0x72, 0x68, 0x04, 0x05,
|
|
0x62, 0xf3, 0xed, 0xab, 0x72, 0x68, 0x02, 0x05,
|
|
0x62, 0xf3, 0xed, 0xcb, 0x72, 0x68, 0x01, 0x05,
|
|
|
|
0x62, 0xf3, 0x6d, 0x8b, 0x73, 0x68, 0x04, 0x05,
|
|
0x62, 0xf3, 0x6d, 0xab, 0x73, 0x68, 0x02, 0x05,
|
|
0x62, 0xf3, 0x6d, 0xcb, 0x73, 0x68, 0x01, 0x05,
|
|
|
|
0x62, 0xf3, 0xed, 0x8b, 0x73, 0x68, 0x04, 0x05,
|
|
0x62, 0xf3, 0xed, 0xab, 0x73, 0x68, 0x02, 0x05,
|
|
0x62, 0xf3, 0xed, 0xcb, 0x73, 0x68, 0x01, 0x05,
|
|
|
|
0x62, 0xf2, 0xed, 0x8b, 0x72, 0x68, 0x04,
|
|
0x62, 0xf2, 0xed, 0xab, 0x72, 0x68, 0x02,
|
|
0x62, 0xf2, 0xed, 0xcb, 0x72, 0x68, 0x01,
|
|
|
|
0x62, 0xf2, 0x6d, 0x8b, 0x73, 0x68, 0x04,
|
|
0x62, 0xf2, 0x6d, 0xab, 0x73, 0x68, 0x02,
|
|
0x62, 0xf2, 0x6d, 0xcb, 0x73, 0x68, 0x01,
|
|
|
|
0x62, 0xf2, 0xed, 0x8b, 0x73, 0x68, 0x04,
|
|
0x62, 0xf2, 0xed, 0xab, 0x73, 0x68, 0x02,
|
|
0x62, 0xf2, 0xed, 0xcb, 0x73, 0x68, 0x01,
|
|
|
|
0x62, 0xf3, 0x6d, 0x9b, 0x73, 0x68, 0x10, 0x05,
|
|
0x62, 0xf3, 0x6d, 0xbb, 0x73, 0x68, 0x10, 0x05,
|
|
0x62, 0xf3, 0x6d, 0xdb, 0x73, 0x68, 0x10, 0x05,
|
|
|
|
0x62, 0xf3, 0xed, 0x9b, 0x73, 0x68, 0x08, 0x05,
|
|
0x62, 0xf3, 0xed, 0xbb, 0x73, 0x68, 0x08, 0x05,
|
|
0x62, 0xf3, 0xed, 0xdb, 0x73, 0x68, 0x08, 0x05,
|
|
|
|
0x62, 0xf2, 0x6d, 0x9b, 0x73, 0x68, 0x10,
|
|
0x62, 0xf2, 0x6d, 0xbb, 0x73, 0x68, 0x10,
|
|
0x62, 0xf2, 0x6d, 0xdb, 0x73, 0x68, 0x10,
|
|
|
|
0x62, 0xf2, 0xed, 0x9b, 0x73, 0x68, 0x08,
|
|
0x62, 0xf2, 0xed, 0xbb, 0x73, 0x68, 0x08,
|
|
0x62, 0xf2, 0xed, 0xdb, 0x73, 0x68, 0x08,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
}
|
|
CYBOZU_TEST_AUTO(vpopcnt)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
vpopcntb(xmm5|k3|T_z, ptr [rax + 0x40]);
|
|
vpopcntb(ymm5|k3|T_z, ptr [rax + 0x40]);
|
|
vpopcntb(zmm5|k3|T_z, ptr [rax + 0x40]);
|
|
|
|
vpopcntw(xmm5|k3|T_z, ptr [rax + 0x40]);
|
|
vpopcntw(ymm5|k3|T_z, ptr [rax + 0x40]);
|
|
vpopcntw(zmm5|k3|T_z, ptr [rax + 0x40]);
|
|
|
|
vpopcntd(xmm5|k3|T_z, ptr [rax + 0x40]);
|
|
vpopcntd(ymm5|k3|T_z, ptr [rax + 0x40]);
|
|
vpopcntd(zmm5|k3|T_z, ptr [rax + 0x40]);
|
|
|
|
vpopcntd(xmm5|k3|T_z, ptr_b [rax + 0x40]);
|
|
vpopcntd(ymm5|k3|T_z, ptr_b [rax + 0x40]);
|
|
vpopcntd(zmm5|k3|T_z, ptr_b [rax + 0x40]);
|
|
|
|
vpopcntq(xmm5|k3|T_z, ptr [rax + 0x40]);
|
|
vpopcntq(ymm5|k3|T_z, ptr [rax + 0x40]);
|
|
vpopcntq(zmm5|k3|T_z, ptr [rax + 0x40]);
|
|
|
|
vpopcntq(xmm5|k3|T_z, ptr_b [rax + 0x40]);
|
|
vpopcntq(ymm5|k3|T_z, ptr_b [rax + 0x40]);
|
|
vpopcntq(zmm5|k3|T_z, ptr_b [rax + 0x40]);
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
0x62, 0xf2, 0x7d, 0x8b, 0x54, 0x68, 0x04,
|
|
0x62, 0xf2, 0x7d, 0xab, 0x54, 0x68, 0x02,
|
|
0x62, 0xf2, 0x7d, 0xcb, 0x54, 0x68, 0x01,
|
|
|
|
0x62, 0xf2, 0xfd, 0x8b, 0x54, 0x68, 0x04,
|
|
0x62, 0xf2, 0xfd, 0xab, 0x54, 0x68, 0x02,
|
|
0x62, 0xf2, 0xfd, 0xcb, 0x54, 0x68, 0x01,
|
|
|
|
0x62, 0xf2, 0x7d, 0x8b, 0x55, 0x68, 0x04,
|
|
0x62, 0xf2, 0x7d, 0xab, 0x55, 0x68, 0x02,
|
|
0x62, 0xf2, 0x7d, 0xcb, 0x55, 0x68, 0x01,
|
|
|
|
0x62, 0xf2, 0x7d, 0x9b, 0x55, 0x68, 0x10,
|
|
0x62, 0xf2, 0x7d, 0xbb, 0x55, 0x68, 0x10,
|
|
0x62, 0xf2, 0x7d, 0xdb, 0x55, 0x68, 0x10,
|
|
|
|
0x62, 0xf2, 0xfd, 0x8b, 0x55, 0x68, 0x04,
|
|
0x62, 0xf2, 0xfd, 0xab, 0x55, 0x68, 0x02,
|
|
0x62, 0xf2, 0xfd, 0xcb, 0x55, 0x68, 0x01,
|
|
|
|
0x62, 0xf2, 0xfd, 0x9b, 0x55, 0x68, 0x08,
|
|
0x62, 0xf2, 0xfd, 0xbb, 0x55, 0x68, 0x08,
|
|
0x62, 0xf2, 0xfd, 0xdb, 0x55, 0x68, 0x08,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
}
|
|
CYBOZU_TEST_AUTO(vpdpbus)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
vpdpbusd(xmm5|k3|T_z, xmm20, ptr [rax + 0x40]);
|
|
vpdpbusd(ymm5|k3|T_z, ymm20, ptr [rax + 0x40]);
|
|
vpdpbusd(zmm5|k3|T_z, zmm20, ptr [rax + 0x40]);
|
|
|
|
vpdpbusd(xmm5|k3|T_z, xmm20, ptr_b [rax + 0x40]);
|
|
vpdpbusd(ymm5|k3|T_z, ymm20, ptr_b [rax + 0x40]);
|
|
vpdpbusd(zmm5|k3|T_z, zmm20, ptr_b [rax + 0x40]);
|
|
|
|
vpdpbusds(xmm5|k3|T_z, xmm20, ptr [rax + 0x40]);
|
|
vpdpbusds(ymm5|k3|T_z, ymm20, ptr [rax + 0x40]);
|
|
vpdpbusds(zmm5|k3|T_z, zmm20, ptr [rax + 0x40]);
|
|
|
|
vpdpbusds(xmm5|k3|T_z, xmm20, ptr_b [rax + 0x40]);
|
|
vpdpbusds(ymm5|k3|T_z, ymm20, ptr_b [rax + 0x40]);
|
|
vpdpbusds(zmm5|k3|T_z, zmm20, ptr_b [rax + 0x40]);
|
|
|
|
vpdpwssd(xmm5|k3|T_z, xmm20, ptr [rax + 0x40]);
|
|
vpdpwssd(ymm5|k3|T_z, ymm20, ptr [rax + 0x40]);
|
|
vpdpwssd(zmm5|k3|T_z, zmm20, ptr [rax + 0x40]);
|
|
|
|
vpdpwssd(xmm5|k3|T_z, xmm20, ptr_b [rax + 0x40]);
|
|
vpdpwssd(ymm5|k3|T_z, ymm20, ptr_b [rax + 0x40]);
|
|
vpdpwssd(zmm5|k3|T_z, zmm20, ptr_b [rax + 0x40]);
|
|
|
|
vpdpwssds(xmm5|k3|T_z, xmm20, ptr [rax + 0x40]);
|
|
vpdpwssds(ymm5|k3|T_z, ymm20, ptr [rax + 0x40]);
|
|
vpdpwssds(zmm5|k3|T_z, zmm20, ptr [rax + 0x40]);
|
|
|
|
vpdpwssds(xmm5|k3|T_z, xmm20, ptr_b [rax + 0x40]);
|
|
vpdpwssds(ymm5|k3|T_z, ymm20, ptr_b [rax + 0x40]);
|
|
vpdpwssds(zmm5|k3|T_z, zmm20, ptr_b [rax + 0x40]);
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
0x62, 0xf2, 0x5d, 0x83, 0x50, 0x68, 0x04,
|
|
0x62, 0xf2, 0x5d, 0xa3, 0x50, 0x68, 0x02,
|
|
0x62, 0xf2, 0x5d, 0xc3, 0x50, 0x68, 0x01,
|
|
|
|
0x62, 0xf2, 0x5d, 0x93, 0x50, 0x68, 0x10,
|
|
0x62, 0xf2, 0x5d, 0xb3, 0x50, 0x68, 0x10,
|
|
0x62, 0xf2, 0x5d, 0xd3, 0x50, 0x68, 0x10,
|
|
|
|
0x62, 0xf2, 0x5d, 0x83, 0x51, 0x68, 0x04,
|
|
0x62, 0xf2, 0x5d, 0xa3, 0x51, 0x68, 0x02,
|
|
0x62, 0xf2, 0x5d, 0xc3, 0x51, 0x68, 0x01,
|
|
|
|
0x62, 0xf2, 0x5d, 0x93, 0x51, 0x68, 0x10,
|
|
0x62, 0xf2, 0x5d, 0xb3, 0x51, 0x68, 0x10,
|
|
0x62, 0xf2, 0x5d, 0xd3, 0x51, 0x68, 0x10,
|
|
|
|
0x62, 0xf2, 0x5d, 0x83, 0x52, 0x68, 0x04,
|
|
0x62, 0xf2, 0x5d, 0xa3, 0x52, 0x68, 0x02,
|
|
0x62, 0xf2, 0x5d, 0xc3, 0x52, 0x68, 0x01,
|
|
|
|
0x62, 0xf2, 0x5d, 0x93, 0x52, 0x68, 0x10,
|
|
0x62, 0xf2, 0x5d, 0xb3, 0x52, 0x68, 0x10,
|
|
0x62, 0xf2, 0x5d, 0xd3, 0x52, 0x68, 0x10,
|
|
|
|
0x62, 0xf2, 0x5d, 0x83, 0x53, 0x68, 0x04,
|
|
0x62, 0xf2, 0x5d, 0xa3, 0x53, 0x68, 0x02,
|
|
0x62, 0xf2, 0x5d, 0xc3, 0x53, 0x68, 0x01,
|
|
|
|
0x62, 0xf2, 0x5d, 0x93, 0x53, 0x68, 0x10,
|
|
0x62, 0xf2, 0x5d, 0xb3, 0x53, 0x68, 0x10,
|
|
0x62, 0xf2, 0x5d, 0xd3, 0x53, 0x68, 0x10,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
}
|
|
CYBOZU_TEST_AUTO(vexpand_vpshufbitqmb)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
vpexpandb(xmm5|k3|T_z, xmm30);
|
|
vpexpandb(ymm5|k3|T_z, ymm30);
|
|
vpexpandb(zmm5|k3|T_z, zmm30);
|
|
vpexpandb(xmm5|k3|T_z, ptr [rax + 0x40]);
|
|
vpexpandb(ymm5|k3|T_z, ptr [rax + 0x40]);
|
|
vpexpandb(zmm5|k3|T_z, ptr [rax + 0x40]);
|
|
|
|
vpexpandw(xmm5|k3|T_z, xmm30);
|
|
vpexpandw(ymm5|k3|T_z, ymm30);
|
|
vpexpandw(zmm5|k3|T_z, zmm30);
|
|
vpexpandw(xmm5|k3|T_z, ptr [rax + 0x40]);
|
|
vpexpandw(ymm5|k3|T_z, ptr [rax + 0x40]);
|
|
vpexpandw(zmm5|k3|T_z, ptr [rax + 0x40]);
|
|
|
|
vpshufbitqmb(k1|k2, xmm2, ptr [rax + 0x40]);
|
|
vpshufbitqmb(k1|k2, ymm2, ptr [rax + 0x40]);
|
|
vpshufbitqmb(k1|k2, zmm2, ptr [rax + 0x40]);
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
0x62, 0x92, 0x7d, 0x8b, 0x62, 0xee,
|
|
0x62, 0x92, 0x7d, 0xab, 0x62, 0xee,
|
|
0x62, 0x92, 0x7d, 0xcb, 0x62, 0xee,
|
|
0x62, 0xf2, 0x7d, 0x8b, 0x62, 0x68, 0x40,
|
|
0x62, 0xf2, 0x7d, 0xab, 0x62, 0x68, 0x40,
|
|
0x62, 0xf2, 0x7d, 0xcb, 0x62, 0x68, 0x40,
|
|
|
|
0x62, 0x92, 0xfd, 0x8b, 0x62, 0xee,
|
|
0x62, 0x92, 0xfd, 0xab, 0x62, 0xee,
|
|
0x62, 0x92, 0xfd, 0xcb, 0x62, 0xee,
|
|
0x62, 0xf2, 0xfd, 0x8b, 0x62, 0x68, 0x20,
|
|
0x62, 0xf2, 0xfd, 0xab, 0x62, 0x68, 0x20,
|
|
0x62, 0xf2, 0xfd, 0xcb, 0x62, 0x68, 0x20,
|
|
|
|
0x62, 0xf2, 0x6d, 0x0a, 0x8f, 0x48, 0x04,
|
|
0x62, 0xf2, 0x6d, 0x2a, 0x8f, 0x48, 0x02,
|
|
0x62, 0xf2, 0x6d, 0x4a, 0x8f, 0x48, 0x01,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
}
|
|
CYBOZU_TEST_AUTO(gf2)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
///
|
|
gf2p8affineinvqb(xmm1, xmm2, 3);
|
|
gf2p8affineinvqb(xmm1, ptr [rax + 0x40], 3);
|
|
|
|
vgf2p8affineinvqb(xmm1, xmm5, xmm2, 3);
|
|
vgf2p8affineinvqb(ymm1, ymm5, ymm2, 3);
|
|
vgf2p8affineinvqb(xmm1, xmm5, ptr [rax + 0x40], 3);
|
|
vgf2p8affineinvqb(ymm1, ymm5, ptr [rax + 0x40], 3);
|
|
|
|
vgf2p8affineinvqb(xmm30, xmm31, xmm4, 5);
|
|
vgf2p8affineinvqb(ymm30, ymm31, ymm4, 5);
|
|
vgf2p8affineinvqb(zmm30, zmm31, zmm4, 5);
|
|
|
|
vgf2p8affineinvqb(xmm30|k1|T_z, xmm5, ptr [rax + 0x40], 5);
|
|
vgf2p8affineinvqb(ymm30|k1|T_z, ymm5, ptr [rax + 0x40], 5);
|
|
vgf2p8affineinvqb(zmm30|k1|T_z, zmm5, ptr [rax + 0x40], 5);
|
|
|
|
vgf2p8affineinvqb(xmm30|k1|T_z, xmm5, ptr_b [rax + 0x40], 5);
|
|
vgf2p8affineinvqb(ymm30|k1|T_z, ymm5, ptr_b [rax + 0x40], 5);
|
|
vgf2p8affineinvqb(zmm30|k1|T_z, zmm5, ptr_b [rax + 0x40], 5);
|
|
///
|
|
gf2p8affineqb(xmm1, xmm2, 3);
|
|
gf2p8affineqb(xmm1, ptr [rax + 0x40], 3);
|
|
|
|
vgf2p8affineqb(xmm1, xmm5, xmm2, 3);
|
|
vgf2p8affineqb(ymm1, ymm5, ymm2, 3);
|
|
vgf2p8affineqb(xmm1, xmm5, ptr [rax + 0x40], 3);
|
|
vgf2p8affineqb(ymm1, ymm5, ptr [rax + 0x40], 3);
|
|
|
|
vgf2p8affineqb(xmm30, xmm31, xmm4, 5);
|
|
vgf2p8affineqb(ymm30, ymm31, ymm4, 5);
|
|
vgf2p8affineqb(zmm30, zmm31, zmm4, 5);
|
|
|
|
vgf2p8affineqb(xmm30|k1|T_z, xmm5, ptr [rax + 0x40], 5);
|
|
vgf2p8affineqb(ymm30|k1|T_z, ymm5, ptr [rax + 0x40], 5);
|
|
vgf2p8affineqb(zmm30|k1|T_z, zmm5, ptr [rax + 0x40], 5);
|
|
|
|
vgf2p8affineqb(xmm30|k1|T_z, xmm5, ptr_b [rax + 0x40], 5);
|
|
vgf2p8affineqb(ymm30|k1|T_z, ymm5, ptr_b [rax + 0x40], 5);
|
|
vgf2p8affineqb(zmm30|k1|T_z, zmm5, ptr_b [rax + 0x40], 5);
|
|
///
|
|
gf2p8mulb(xmm1, xmm2);
|
|
gf2p8mulb(xmm1, ptr [rax + 0x40]);
|
|
|
|
vgf2p8mulb(xmm1, xmm5, xmm2);
|
|
vgf2p8mulb(ymm1, ymm5, ymm2);
|
|
vgf2p8mulb(xmm1, xmm5, ptr [rax + 0x40]);
|
|
vgf2p8mulb(ymm1, ymm5, ptr [rax + 0x40]);
|
|
|
|
vgf2p8mulb(xmm30, xmm31, xmm4);
|
|
vgf2p8mulb(ymm30, ymm31, ymm4);
|
|
vgf2p8mulb(zmm30, zmm31, zmm4);
|
|
|
|
vgf2p8mulb(xmm30|k1|T_z, xmm5, ptr [rax + 0x40]);
|
|
vgf2p8mulb(ymm30|k1|T_z, ymm5, ptr [rax + 0x40]);
|
|
vgf2p8mulb(zmm30|k1|T_z, zmm5, ptr [rax + 0x40]);
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
0x66, 0x0f, 0x3a, 0xcf, 0xca, 0x03,
|
|
0x66, 0x0f, 0x3a, 0xcf, 0x48, 0x40, 0x03,
|
|
0xc4, 0xe3, 0xd1, 0xcf, 0xca, 0x03,
|
|
0xc4, 0xe3, 0xd5, 0xcf, 0xca, 0x03,
|
|
0xc4, 0xe3, 0xd1, 0xcf, 0x48, 0x40, 0x03,
|
|
0xc4, 0xe3, 0xd5, 0xcf, 0x48, 0x40, 0x03,
|
|
0x62, 0x63, 0x85, 0x00, 0xcf, 0xf4, 0x05,
|
|
0x62, 0x63, 0x85, 0x20, 0xcf, 0xf4, 0x05,
|
|
0x62, 0x63, 0x85, 0x40, 0xcf, 0xf4, 0x05,
|
|
0x62, 0x63, 0xd5, 0x89, 0xcf, 0x70, 0x04, 0x05,
|
|
0x62, 0x63, 0xd5, 0xa9, 0xcf, 0x70, 0x02, 0x05,
|
|
0x62, 0x63, 0xd5, 0xc9, 0xcf, 0x70, 0x01, 0x05,
|
|
0x62, 0x63, 0xd5, 0x99, 0xcf, 0x70, 0x08, 0x05,
|
|
0x62, 0x63, 0xd5, 0xb9, 0xcf, 0x70, 0x08, 0x05,
|
|
0x62, 0x63, 0xd5, 0xd9, 0xcf, 0x70, 0x08, 0x05,
|
|
|
|
0x66, 0x0f, 0x3a, 0xce, 0xca, 0x03,
|
|
0x66, 0x0f, 0x3a, 0xce, 0x48, 0x40, 0x03,
|
|
0xc4, 0xe3, 0xd1, 0xce, 0xca, 0x03,
|
|
0xc4, 0xe3, 0xd5, 0xce, 0xca, 0x03,
|
|
0xc4, 0xe3, 0xd1, 0xce, 0x48, 0x40, 0x03,
|
|
0xc4, 0xe3, 0xd5, 0xce, 0x48, 0x40, 0x03,
|
|
0x62, 0x63, 0x85, 0x00, 0xce, 0xf4, 0x05,
|
|
0x62, 0x63, 0x85, 0x20, 0xce, 0xf4, 0x05,
|
|
0x62, 0x63, 0x85, 0x40, 0xce, 0xf4, 0x05,
|
|
0x62, 0x63, 0xd5, 0x89, 0xce, 0x70, 0x04, 0x05,
|
|
0x62, 0x63, 0xd5, 0xa9, 0xce, 0x70, 0x02, 0x05,
|
|
0x62, 0x63, 0xd5, 0xc9, 0xce, 0x70, 0x01, 0x05,
|
|
0x62, 0x63, 0xd5, 0x99, 0xce, 0x70, 0x08, 0x05,
|
|
0x62, 0x63, 0xd5, 0xb9, 0xce, 0x70, 0x08, 0x05,
|
|
0x62, 0x63, 0xd5, 0xd9, 0xce, 0x70, 0x08, 0x05,
|
|
|
|
0x66, 0x0f, 0x38, 0xcf, 0xca,
|
|
0x66, 0x0f, 0x38, 0xcf, 0x48, 0x40,
|
|
0xc4, 0xe2, 0x51, 0xcf, 0xca,
|
|
0xc4, 0xe2, 0x55, 0xcf, 0xca,
|
|
0xc4, 0xe2, 0x51, 0xcf, 0x48, 0x40,
|
|
0xc4, 0xe2, 0x55, 0xcf, 0x48, 0x40,
|
|
0x62, 0x62, 0x05, 0x00, 0xcf, 0xf4,
|
|
0x62, 0x62, 0x05, 0x20, 0xcf, 0xf4,
|
|
0x62, 0x62, 0x05, 0x40, 0xcf, 0xf4,
|
|
0x62, 0x62, 0x55, 0x89, 0xcf, 0x70, 0x04,
|
|
0x62, 0x62, 0x55, 0xa9, 0xcf, 0x70, 0x02,
|
|
0x62, 0x62, 0x55, 0xc9, 0xcf, 0x70, 0x01,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
}
|
|
|
|
CYBOZU_TEST_AUTO(bf16)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
vcvtne2ps2bf16(xmm0 | k1, xmm1, ptr [rax + 64]);
|
|
vcvtne2ps2bf16(ymm0 | k1 | T_z, ymm0, ptr [rax + 64]);
|
|
vcvtne2ps2bf16(zmm0 | k1, zmm1, ptr [rax + 64]);
|
|
|
|
vcvtneps2bf16(xmm0, xword [rax + 64]);
|
|
vcvtneps2bf16(xmm0 | k1, yword [rax + 64]);
|
|
vcvtneps2bf16(ymm0 | k1, zword [rax + 64]);
|
|
vcvtneps2bf16(ymm0 | k1, ptr [rax + 64]);
|
|
|
|
vdpbf16ps(xmm0 | k1, xmm1, ptr [rax + 64]);
|
|
vdpbf16ps(ymm0 | k1, ymm1, ptr [rax + 64]);
|
|
vdpbf16ps(zmm0 | k1, zmm1, ptr [rax + 64]);
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
0x62, 0xf2, 0x77, 0x09, 0x72, 0x40, 0x04,
|
|
0x62, 0xf2, 0x7f, 0xa9, 0x72, 0x40, 0x02,
|
|
0x62, 0xf2, 0x77, 0x49, 0x72, 0x40, 0x01,
|
|
|
|
0x62, 0xf2, 0x7e, 0x08, 0x72, 0x40, 0x04,
|
|
0x62, 0xf2, 0x7e, 0x29, 0x72, 0x40, 0x02,
|
|
0x62, 0xf2, 0x7e, 0x49, 0x72, 0x40, 0x01,
|
|
0x62, 0xf2, 0x7e, 0x49, 0x72, 0x40, 0x01,
|
|
|
|
0x62, 0xf2, 0x76, 0x09, 0x52, 0x40, 0x04,
|
|
0x62, 0xf2, 0x76, 0x29, 0x52, 0x40, 0x02,
|
|
0x62, 0xf2, 0x76, 0x49, 0x52, 0x40, 0x01,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
}
|
|
|
|
CYBOZU_TEST_AUTO(AMX)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
ldtilecfg(ptr[rax + rcx * 4 + 64]);
|
|
sttilecfg(ptr[rsp + rax * 8 + 128]);
|
|
tileloadd(tmm3, ptr[rdi + rdx * 2 + 8]);
|
|
tileloaddt1(tmm4, ptr[r8 + r9 + 32]);
|
|
tilerelease();
|
|
tilestored(ptr[r10 + r11 * 2 + 32], tmm2);
|
|
tilezero(tmm7);
|
|
tdpbssd(tmm1, tmm2, tmm3);
|
|
tdpbsud(tmm2, tmm3, tmm4);
|
|
tdpbusd(tmm3, tmm4, tmm5);
|
|
tdpbuud(tmm4, tmm5, tmm6);
|
|
tdpbf16ps(tmm5, tmm6, tmm7);
|
|
}
|
|
} c;
|
|
// generated code by patch
|
|
const uint8_t tbl[] = {
|
|
0xc4, 0xe2, 0x78, 0x49, 0x44, 0x88, 0x40, 0xc4, 0xe2, 0x79, 0x49, 0x84, 0xc4, 0x80, 0x00, 0x00,
|
|
0x00, 0xc4, 0xe2, 0x7b, 0x4b, 0x5c, 0x57, 0x08, 0xc4, 0x82, 0x79, 0x4b, 0x64, 0x08, 0x20, 0xc4,
|
|
0xe2, 0x78, 0x49, 0xc0, 0xc4, 0x82, 0x7a, 0x4b, 0x54, 0x5a, 0x20, 0xc4, 0xe2, 0x7b, 0x49, 0xf8,
|
|
0xc4, 0xe2, 0x63, 0x5e, 0xca, 0xc4, 0xe2, 0x5a, 0x5e, 0xd3, 0xc4, 0xe2, 0x51, 0x5e, 0xdc, 0xc4,
|
|
0xe2, 0x48, 0x5e, 0xe5, 0xc4, 0xe2, 0x42, 0x5c, 0xee,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
}
|
|
|
|
CYBOZU_TEST_AUTO(tileloadd)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
tileloadd(tmm1, ptr[r8+r8]);
|
|
tileloadd(tmm1, ptr[rax+rcx*4]);
|
|
tileloadd(tmm1, ptr[r8+r9*1+0x40]);
|
|
}
|
|
void notSupported()
|
|
{
|
|
tileloadd(tmm1, ptr[r8]);
|
|
}
|
|
void notSupported2()
|
|
{
|
|
tileloadd(tmm1, ptr[r8*2]);
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
0xC4, 0x82, 0x7B, 0x4B, 0x0C, 0x00,
|
|
0xC4, 0xE2, 0x7B, 0x4B, 0x0C, 0x88,
|
|
0xC4, 0x82, 0x7B, 0x4B, 0x4C, 0x08, 0x40,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
|
|
// current version does not support this sibmem format
|
|
CYBOZU_TEST_EXCEPTION(c.notSupported(), std::exception);
|
|
CYBOZU_TEST_EXCEPTION(c.notSupported2(), std::exception);
|
|
}
|
|
|
|
CYBOZU_TEST_AUTO(vnni)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
// default encoding is EVEX
|
|
vpdpbusd(xm0, xm1, xm2);
|
|
vpdpbusd(xm0, xm1, xm2, EvexEncoding); // EVEX
|
|
vpdpbusd(xm0, xm1, xm2, VexEncoding); // VEX
|
|
}
|
|
void badVex()
|
|
{
|
|
vpdpbusd(xm0, xm1, xm31, VexEncoding);
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
0x62, 0xF2, 0x75, 0x08, 0x50, 0xC2,
|
|
0x62, 0xF2, 0x75, 0x08, 0x50, 0xC2,
|
|
0xC4, 0xE2, 0x71, 0x50, 0xC2,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
|
|
CYBOZU_TEST_EXCEPTION(c.badVex(), std::exception);
|
|
}
|
|
|
|
CYBOZU_TEST_AUTO(vaddph)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
vaddph(zmm0, zmm1, ptr[rax+64]);
|
|
vaddph(ymm0, ymm1, ptr[rax+64]);
|
|
vaddph(xmm0, xmm1, ptr[rax+64]);
|
|
|
|
vaddph(zmm0, zmm1, ptr_b[rax+64]);
|
|
vaddph(ymm0, ymm1, ptr_b[rax+64]);
|
|
vaddph(xmm0, xmm1, ptr_b[rax+64]);
|
|
|
|
vaddsh(xmm0, xmm15, ptr[rax+64]);
|
|
vaddsh(xmm0|k5|T_z|T_rd_sae, xmm15, xmm3);
|
|
|
|
vcmpph(k1, xm15, ptr[rax+64], 1);
|
|
vcmpph(k2, ym15, ptr[rax+64], 2);
|
|
vcmpph(k3, zm15, ptr[rax+64], 3);
|
|
vcmpph(k1, xm15, ptr_b[rax+64], 1);
|
|
vcmpph(k2, ym15, ptr_b[rax+64], 2);
|
|
vcmpph(k3, zm15, ptr_b[rax+64], 3);
|
|
|
|
vcmpsh(k1, xm15, ptr[rax+64], 1);
|
|
vcmpsh(k3|k5, xmm1, xmm25|T_sae, 4);
|
|
|
|
vcomish(xmm1, ptr[rax+64]);
|
|
vcomish(xmm1|T_sae, xmm15);
|
|
|
|
vucomish(xmm1, ptr [rax+0x40]);
|
|
vucomish(xmm1|T_sae, xmm15);
|
|
|
|
vfmaddsub213ph(xmm1, xmm2, ptr [rax+0x40]);
|
|
vfmaddsub213ph(xmm1, xmm2, ptr_b [rax+0x40]);
|
|
vfmaddsub213ph(xmm1|k3, xmm2, xmm5);
|
|
vfmaddsub213ph(ymm1, ymm2, ptr [rax+0x40]);
|
|
vfmaddsub213ph(ymm1, ymm2, ptr_b[rax+0x40]);
|
|
vfmaddsub213ph(ymm1|k3, ymm2, ymm5);
|
|
vfmaddsub213ph(zmm1, zmm2, ptr [rax+0x40]);
|
|
vfmaddsub213ph(zmm1, zmm2, ptr_b [rax+0x40]);
|
|
vfmaddsub213ph(zmm1|T_ru_sae, zmm2, zmm5);
|
|
|
|
vfmsubadd132ph(xmm1, xmm2, ptr [rax+0x40]);
|
|
vfmsubadd132ph(xmm1, xmm2, ptr_b [rax+0x40]);
|
|
vfmsubadd132ph(ymm1, ymm2, ptr [rax+0x40]);
|
|
vfmsubadd132ph(ymm1, ymm2, ptr_b [rax+0x40]);
|
|
vfmsubadd132ph(zmm1, zmm2, ptr [rax+0x40]);
|
|
vfmsubadd132ph(zmm1, zmm2, ptr_b [rax+0x40]);
|
|
vfmsubadd132ph(zmm1|T_ru_sae, zmm2, zmm5);
|
|
|
|
vfmadd132ph(xmm1, xmm2, ptr [rax+0x40]);
|
|
vfmadd132ph(xmm1, xmm2, ptr_b [rax+0x40]);
|
|
vfmadd132ph(ymm1, ymm2, ptr [rax+0x40]);
|
|
vfmadd132ph(ymm1, ymm2, ptr_b [rax+0x40]);
|
|
vfmadd132ph(zmm1, zmm2, ptr [rax+0x40]);
|
|
vfmadd132ph(zmm1, zmm2, ptr_b [rax+0x40]);
|
|
vfmadd132ph(zmm1|T_rd_sae, zmm2, zmm5);
|
|
|
|
vfmsub231ph(xmm1, xmm2, ptr [rax+0x40]);
|
|
vfmsub231ph(xmm1, xmm2, ptr_b [rax+0x40]);
|
|
vfmsub231ph(ymm1, ymm2, ptr [rax+0x40]);
|
|
vfmsub231ph(ymm1, ymm2, ptr_b [rax+0x40]);
|
|
vfmsub231ph(zmm1, zmm2, ptr [rax+0x40]);
|
|
vfmsub231ph(zmm1, zmm2, ptr_b [rax+0x40]);
|
|
vfmsub231ph(zmm1|T_rd_sae, zmm2, zmm5);
|
|
|
|
vfnmsub231ph(xmm1, xmm2, ptr [rax+0x40]);
|
|
vfnmsub231ph(ymm1, ymm2, ptr_b [rax+0x40]);
|
|
vfnmsub231ph(zmm1, zmm2, ptr_b [rax+0x40]);
|
|
vfnmsub231ph(zmm1|T_rd_sae, zmm2, zmm5);
|
|
|
|
vfmadd132sh(xmm1|k1|T_z|T_rd_sae, xmm2, xmm3);
|
|
vfmadd132sh(xmm1, xmm2, ptr [rax+0x40]);
|
|
|
|
vfnmadd132sh(xmm1|k1|T_z|T_rd_sae, xmm2, xmm3);
|
|
vfnmadd132sh(xmm1, xmm2, ptr [rax+0x40]);
|
|
|
|
vfmsub132sh(xmm1|k1|T_z|T_rd_sae, xmm2, xmm3);
|
|
vfmsub132sh(xmm1, xmm2, ptr [rax+0x40]);
|
|
vfnmsub132sh(xmm1|k1|T_z|T_rd_sae, xmm2, xmm3);
|
|
vfnmsub132sh(xmm1, xmm2, ptr [rax+0x40]);
|
|
|
|
vfcmaddcph(xmm1|k1|T_z, xmm2, ptr [rax+0x40]);
|
|
vfcmaddcph(ymm1|k1|T_z, ymm2, ptr [rax+0x40]);
|
|
vfcmaddcph(zmm1|k1, zmm2, ptr [rax+0x40]);
|
|
vfcmaddcph(zmm1|k1|T_rd_sae, zmm2, zmm5);
|
|
vfcmaddcph(xmm1|k1|T_z, xmm2, ptr_b [rax+0x40]);
|
|
vfcmaddcph(ymm1|k1|T_z, ymm2, ptr_b [rax+0x40]);
|
|
vfcmaddcph(zmm1|k1|T_z, zmm2, ptr_b [rax+0x40]);
|
|
|
|
vfmaddcph(xm1, xm2, ptr[rax+0x40]);
|
|
vfmaddcph(ym1|k1|T_z, ym2, ptr_b[rax+0x40]);
|
|
vfmaddcph(zm1, zm2, ptr_b[rax+0x40]);
|
|
|
|
vfcmulcph(xmm1, xmm2, ptr [rax+0x40]);
|
|
vfcmulcph(ymm1|k1|T_z, ymm2, ptr_b [rax+0x40]);
|
|
vfcmulcph(zmm1, zmm2, ptr_b [rax+0x40]);
|
|
|
|
vfmulcph(xmm1, xmm2, ptr [rax+0x40]);
|
|
vfmulcph(ymm1|k1|T_z, ymm2, ptr_b [rax+0x40]);
|
|
vfmulcph(zmm1, zmm2, ptr_b [rax+0x40]);
|
|
|
|
vrcpph(xmm1, ptr [rax+0x40]);
|
|
vrcpph(xmm1, ptr_b [rax+0x40]);
|
|
vrcpph(ymm1, ptr [rax+0x40]);
|
|
vrcpph(ymm1, ptr_b [rax+0x40]);
|
|
vrcpph(zmm1, ptr [rax+0x40]);
|
|
vrcpph(zmm1, ptr_b [rax+0x40]);
|
|
|
|
vrcpsh(xmm1, xmm3, ptr [rax+0x40]);
|
|
|
|
vrsqrtph(xmm1, ptr [rax+0x40]);
|
|
vrsqrtph(xmm1, ptr_b [rax+0x40]);
|
|
vrsqrtph(ymm2, ptr [rax+0x40]);
|
|
vrsqrtph(ymm2, ptr_b [rax+0x40]);
|
|
vrsqrtph(zmm2, ptr [rax+0x40]);
|
|
vrsqrtph(zmm2, ptr_b [rax+0x40]);
|
|
|
|
vrsqrtsh(xmm1|k5|T_z, xmm7, ptr [rax+0x40]);
|
|
|
|
vsqrtph(xmm1|k4|T_z, ptr [rax+0x40]);
|
|
vsqrtph(xmm1|k4|T_z, ptr_b [rax+0x40]);
|
|
vsqrtph(ymm1|k4|T_z, ptr_b [rax+0x40]);
|
|
vsqrtph(zmm1|k4|T_z, ptr [rax+0x40]);
|
|
vsqrtph(zmm1|k4|T_z, ptr_b [rax+0x40]);
|
|
|
|
vsqrtsh(xmm1|k4|T_z, xmm5, ptr [rax+0x40]);
|
|
vsqrtsh(xmm1|k4|T_z|T_rd_sae, xmm5, xmm7);
|
|
|
|
vscalefph(xmm1, xmm5, ptr [rax+0x40]);
|
|
vscalefph(xmm1, xmm5, ptr_b [rax+0x40]);
|
|
vscalefph(ymm1, ymm5, ptr [rax+0x40]);
|
|
vscalefph(ymm1, ymm5, ptr_b [rax+0x40]);
|
|
vscalefph(zmm1, zmm5, ptr [rax+0x40]);
|
|
vscalefph(zmm1, zmm5, ptr_b [rax+0x40]);
|
|
vscalefph(zmm1|k1|T_z|T_rd_sae, zmm5, zmm7);
|
|
|
|
vscalefsh(xmm1, xmm5, ptr [rax+0x40]);
|
|
vscalefsh(xmm1|k1|T_z|T_rd_sae, xmm5, xmm7);
|
|
|
|
vreduceph(xmm1, ptr [rax+0x40], 0x1);
|
|
vreduceph(xmm1, ptr_b [rax+0x40], 0x2);
|
|
vreduceph(ymm1, ptr [rax+0x40], 0x3);
|
|
vreduceph(ymm1, ptr_b [rax+0x40], 0x4);
|
|
vreduceph(zmm1, ptr [rax+0x40], 0x5);
|
|
vreduceph(zmm1, ptr_b [rax+0x40], 0x6);
|
|
vreduceph(zmm1|k1|T_z|T_sae, zmm5, 0x7);
|
|
|
|
vreducesh(xmm1, xmm3, ptr [rax+0x40], 0x1);
|
|
vreducesh(xmm1|k1|T_z|T_sae, xmm5, xmm4, 0x2);
|
|
|
|
vrndscaleph(xmm1, ptr [rax+0x40], 0x1);
|
|
vrndscaleph(xmm1, ptr_b [rax+0x40], 0x2);
|
|
vrndscaleph(ymm1, ptr [rax+0x40], 0x3);
|
|
vrndscaleph(ymm1, ptr_b [rax+0x40], 0x4);
|
|
vrndscaleph(zmm1, ptr [rax+0x40], 0x5);
|
|
vrndscaleph(zmm1, ptr_b [rax+0x40], 0x6);
|
|
vrndscaleph(zmm1|k1|T_z|T_sae, zmm5, 0x7);
|
|
|
|
vrndscalesh(xmm1, xmm3, ptr [rax+0x40], 0x1);
|
|
vrndscalesh(xmm1|k1|T_z|T_sae, xmm5, xmm4, 0x2);
|
|
|
|
vfpclassph(k1, xword [rax+0x40], 0x1);
|
|
vfpclassph(k1, xword_b[rax+0x40], 0x2);
|
|
vfpclassph(k1, yword [rax+0x40], 0x3);
|
|
vfpclassph(k1, yword_b[rax+0x40], 0x4);
|
|
vfpclassph(k1, zword [rax+0x40], 0x5);
|
|
vfpclassph(k1, zword_b[rax+0x40], 0x6);
|
|
|
|
vfpclasssh(k1|k2, xmm3, 0x5);
|
|
vfpclasssh(k1|k2, ptr [rax+0x40], 0x5);
|
|
|
|
vgetexpph(xmm1, ptr [rax+0x40]);
|
|
vgetexpph(ymm1, ptr_b [rax+0x40]);
|
|
vgetexpph(zmm1, ptr [rax+0x40]);
|
|
vgetexpph(zmm1|k1|T_z|T_sae, zmm5);
|
|
vgetexpsh(xmm1, xmm5, ptr [rax+0x40]);
|
|
vgetexpsh(xmm1|k1|T_z|T_sae, xmm3, xmm5);
|
|
|
|
vgetmantph(xmm1, ptr [rax+0x40], 0x1);
|
|
vgetmantph(ymm1, ptr_b [rax+0x40], 0x2);
|
|
vgetmantph(zmm1, ptr [rax+0x40], 0x3);
|
|
vgetmantph(zmm1|k1|T_z|T_sae, zmm5, 0x4);
|
|
|
|
vgetmantsh(xmm1, xmm5, ptr [rax+0x40], 0x5);
|
|
vgetmantsh(xmm1|k1|T_z|T_sae, xmm3, xmm5, 0x6);
|
|
|
|
vmovsh(xmm1|k1|T_z, ptr [rax+0x40]);
|
|
vmovsh(ptr [rax+0x40]|k1, xmm1);
|
|
vmovsh(xmm1|k2|T_z, xmm3, xmm5);
|
|
|
|
vmovw(xmm1, r13d);
|
|
vmovw(xmm3, ptr [rax+0x40]);
|
|
vmovw(r9d, xmm1);
|
|
vmovw(ptr [rax+0x40], xmm7);
|
|
|
|
vcvtsd2sh(xmm1|k1|T_z|T_rd_sae, xmm2, xmm3);
|
|
vcvtsd2sh(xmm1, xmm2, ptr [rax+0x40]);
|
|
|
|
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]);
|
|
|
|
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]);
|
|
|
|
vcvtph2dq(xmm1, xmm5);
|
|
vcvtph2dq(xmm1, ptr [rax+0x40]);
|
|
vcvtph2dq(xmm1, ptr_b [rax+0x40]);
|
|
vcvtph2dq(ymm1|k2|T_z, xmm5);
|
|
vcvtph2dq(ymm1, ptr [rax+0x40]);
|
|
vcvtph2dq(ymm1, ptr_b [rax+0x40]);
|
|
vcvtph2dq(zmm1|k5|T_z|T_rd_sae, ymm3);
|
|
vcvtph2dq(zmm1|k5|T_z, ptr [rax+0x40]);
|
|
vcvtph2dq(zmm1|k5|T_z, ptr_b [rax+0x40]);
|
|
|
|
vcvtph2psx(xmm1, xmm5);
|
|
vcvtph2psx(xmm1, ptr [rax+0x40]);
|
|
vcvtph2psx(xmm1, ptr_b [rax+0x40]);
|
|
vcvtph2psx(ymm1|k2|T_z, xmm5);
|
|
vcvtph2psx(ymm1, ptr [rax+0x40]);
|
|
vcvtph2psx(ymm1, ptr_b [rax+0x40]);
|
|
vcvtph2psx(zmm1|k5|T_z|T_sae, ymm3);
|
|
vcvtph2psx(zmm1|k5|T_z, ptr [rax+0x40]);
|
|
vcvtph2psx(zmm1|k5|T_z, ptr_b [rax+0x40]);
|
|
|
|
vcvtph2udq(xmm1, xmm5);
|
|
vcvtph2udq(xmm1, ptr [rax+0x40]);
|
|
vcvtph2udq(xmm1, ptr_b [rax+0x40]);
|
|
vcvtph2udq(ymm1|k2|T_z, xmm5);
|
|
vcvtph2udq(ymm1, ptr [rax+0x40]);
|
|
vcvtph2udq(ymm1, ptr_b [rax+0x40]);
|
|
vcvtph2udq(zmm1|k5|T_z|T_rd_sae, ymm3);
|
|
vcvtph2udq(zmm1|k5|T_z, ptr [rax+0x40]);
|
|
vcvtph2udq(zmm1|k5|T_z, ptr_b [rax+0x40]);
|
|
|
|
vcvttph2dq(xmm1, xmm5);
|
|
vcvttph2dq(xmm1, ptr [rax+0x40]);
|
|
vcvttph2dq(xmm1, ptr_b [rax+0x40]);
|
|
vcvttph2dq(ymm1|k2|T_z, xmm5);
|
|
vcvttph2dq(ymm1, ptr [rax+0x40]);
|
|
vcvttph2dq(ymm1, ptr_b [rax+0x40]);
|
|
vcvttph2dq(zmm1|k5|T_z|T_sae, ymm3);
|
|
vcvttph2dq(zmm1|k5|T_z, ptr [rax+0x40]);
|
|
vcvttph2dq(zmm1|k5|T_z, ptr_b [rax+0x40]);
|
|
|
|
vcvttph2udq(xmm1, xmm5);
|
|
vcvttph2udq(xmm1, ptr [rax+0x40]);
|
|
vcvttph2udq(xmm1, ptr_b [rax+0x40]);
|
|
vcvttph2udq(ymm1|k2|T_z, xmm5);
|
|
vcvttph2udq(ymm1, ptr [rax+0x40]);
|
|
vcvttph2udq(ymm1, ptr_b [rax+0x40]);
|
|
vcvttph2udq(zmm1|k5|T_z|T_sae, ymm3);
|
|
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]);
|
|
|
|
vcvtph2qq(xmm1, xmm5);
|
|
vcvtph2qq(xmm1, ptr [rax+0x40]);
|
|
vcvtph2qq(xmm1, ptr_b [rax+0x40]);
|
|
vcvtph2qq(ymm1|k2|T_z, xmm5);
|
|
vcvtph2qq(ymm1, ptr [rax+0x40]);
|
|
vcvtph2qq(ymm1, ptr_b [rax+0x40]);
|
|
vcvtph2qq(zmm1|k5|T_z|T_rd_sae, xmm3);
|
|
vcvtph2qq(zmm1|k5|T_z, ptr [rax+0x40]);
|
|
vcvtph2qq(zmm1|k5|T_z, ptr_b [rax+0x40]);
|
|
|
|
vcvtph2uqq(xmm1, xmm5);
|
|
vcvtph2uqq(xmm1, ptr [rax+0x40]);
|
|
vcvtph2uqq(xmm1, ptr_b [rax+0x40]);
|
|
vcvtph2uqq(ymm1|k2|T_z, xmm5);
|
|
vcvtph2uqq(ymm1, ptr [rax+0x40]);
|
|
vcvtph2uqq(ymm1, ptr_b [rax+0x40]);
|
|
vcvtph2uqq(zmm1|k5|T_z|T_rd_sae, xmm3);
|
|
vcvtph2uqq(zmm1|k5|T_z, ptr [rax+0x40]);
|
|
vcvtph2uqq(zmm1|k5|T_z, ptr_b [rax+0x40]);
|
|
|
|
vcvttph2uqq(xmm1, xmm5);
|
|
vcvttph2uqq(xmm1, ptr [rax+0x40]);
|
|
vcvttph2uqq(xmm1, ptr_b [rax+0x40]);
|
|
vcvttph2uqq(ymm1|k2|T_z, xmm5);
|
|
vcvttph2uqq(ymm1, ptr [rax+0x40]);
|
|
vcvttph2uqq(ymm1, ptr_b [rax+0x40]);
|
|
vcvttph2uqq(zmm1|k5|T_z|T_sae, xmm3);
|
|
vcvttph2uqq(zmm1|k5|T_z, ptr [rax+0x40]);
|
|
vcvttph2uqq(zmm1|k5|T_z, ptr_b [rax+0x40]);
|
|
|
|
vcvtdq2ph(xmm1, xmm5);
|
|
vcvtdq2ph(xmm1, xword [rax+0x40]);
|
|
vcvtdq2ph(xmm1, xword_b [rax+0x40]);
|
|
vcvtdq2ph(xmm1, yword [rax+0x40]);
|
|
vcvtdq2ph(xmm1, yword_b [rax+0x40]);
|
|
vcvtdq2ph(ymm1|k2|T_z|T_rd_sae, zmm5);
|
|
vcvtdq2ph(ymm1, ptr [rax+0x40]);
|
|
vcvtdq2ph(ymm1, ptr_b [rax+0x40]);
|
|
|
|
vcvtps2phx(xmm1, xmm5);
|
|
vcvtps2phx(xmm1, xword [rax+0x40]);
|
|
vcvtps2phx(xmm1, xword_b [rax+0x40]);
|
|
vcvtps2phx(xmm1, yword [rax+0x40]);
|
|
vcvtps2phx(xmm1, yword_b [rax+0x40]);
|
|
vcvtps2phx(ymm1|k2|T_z|T_rd_sae, zmm5);
|
|
vcvtps2phx(ymm1, ptr [rax+0x40]);
|
|
vcvtps2phx(ymm1, ptr_b [rax+0x40]);
|
|
|
|
vcvtudq2ph(xmm1, xmm5);
|
|
vcvtudq2ph(xmm1, xword [rax+0x40]);
|
|
vcvtudq2ph(xmm1, xword_b [rax+0x40]);
|
|
vcvtudq2ph(xmm1, yword [rax+0x40]);
|
|
vcvtudq2ph(xmm1, yword_b [rax+0x40]);
|
|
vcvtudq2ph(ymm1|k2|T_z|T_rd_sae, zmm5);
|
|
vcvtudq2ph(ymm1, ptr [rax+0x40]);
|
|
vcvtudq2ph(ymm1, ptr_b [rax+0x40]);
|
|
|
|
vcvtpd2ph(xmm1, xmm5);
|
|
vcvtpd2ph(xmm1, ymm5);
|
|
vcvtpd2ph(xmm1|k2|T_z|T_rd_sae, zmm5);
|
|
vcvtpd2ph(xmm1, xword [rax+0x40]);
|
|
vcvtpd2ph(xmm1, xword_b [rax+0x40]);
|
|
vcvtpd2ph(xmm1, yword [rax+0x40]);
|
|
vcvtpd2ph(xmm1, yword_b [rax+0x40]);
|
|
vcvtpd2ph(xmm1, zword [rax+0x40]);
|
|
vcvtpd2ph(xmm1, zword_b [rax+0x40]);
|
|
|
|
vcvtqq2ph(xmm1, xmm5);
|
|
vcvtqq2ph(xmm1, ymm5);
|
|
vcvtqq2ph(xmm1|k2|T_z|T_rd_sae, zmm5);
|
|
vcvtqq2ph(xmm1, xword [rax+0x40]);
|
|
vcvtqq2ph(xmm1, xword_b [rax+0x40]);
|
|
vcvtqq2ph(xmm1, yword [rax+0x40]);
|
|
vcvtqq2ph(xmm1, yword_b [rax+0x40]);
|
|
vcvtqq2ph(xmm1, zword [rax+0x40]);
|
|
vcvtqq2ph(xmm1, zword_b [rax+0x40]);
|
|
|
|
vcvtuqq2ph(xmm1, xmm5);
|
|
vcvtuqq2ph(xmm1, ymm5);
|
|
vcvtuqq2ph(xmm1|k2|T_z|T_rd_sae, zmm5);
|
|
vcvtuqq2ph(xmm1, xword [rax+0x40]);
|
|
vcvtuqq2ph(xmm1, xword_b [rax+0x40]);
|
|
vcvtuqq2ph(xmm1, yword [rax+0x40]);
|
|
vcvtuqq2ph(xmm1, yword_b [rax+0x40]);
|
|
vcvtuqq2ph(xmm1, zword [rax+0x40]);
|
|
vcvtuqq2ph(xmm1, zword_b [rax+0x40]);
|
|
|
|
vcvtph2uw(xmm1, xmm5);
|
|
vcvtph2uw(xmm1, ptr [rax+0x40]);
|
|
vcvtph2uw(xmm1, ptr_b [rax+0x40]);
|
|
vcvtph2uw(ymm1, ptr [rax+0x40]);
|
|
vcvtph2uw(ymm1, ptr_b [rax+0x40]);
|
|
vcvtph2uw(zmm1|k2|T_z|T_rd_sae, zmm5);
|
|
vcvtph2uw(zmm1, ptr [rax+0x40]);
|
|
vcvtph2uw(zmm1, ptr_b [rax+0x40]);
|
|
|
|
vcvtph2w(xmm1, xmm5);
|
|
vcvtph2w(xmm1, ptr [rax+0x40]);
|
|
vcvtph2w(xmm1, ptr_b [rax+0x40]);
|
|
vcvtph2w(ymm1, ptr [rax+0x40]);
|
|
vcvtph2w(ymm1, ptr_b [rax+0x40]);
|
|
vcvtph2w(zmm1|k2|T_z|T_rd_sae, zmm5);
|
|
vcvtph2w(zmm1, ptr [rax+0x40]);
|
|
vcvtph2w(zmm1, ptr_b [rax+0x40]);
|
|
|
|
vcvttph2uw(xmm1, xmm5);
|
|
vcvttph2uw(xmm1, ptr [rax+0x40]);
|
|
vcvttph2uw(xmm1, ptr_b [rax+0x40]);
|
|
vcvttph2uw(ymm1, ptr [rax+0x40]);
|
|
vcvttph2uw(ymm1, ptr_b [rax+0x40]);
|
|
vcvttph2uw(zmm1|k2|T_z|T_sae, zmm5);
|
|
vcvttph2uw(zmm1, ptr [rax+0x40]);
|
|
vcvttph2uw(zmm1, ptr_b [rax+0x40]);
|
|
|
|
vcvttph2w(xmm1, xmm5);
|
|
vcvttph2w(xmm1, ptr [rax+0x40]);
|
|
vcvttph2w(xmm1, ptr_b [rax+0x40]);
|
|
vcvttph2w(ymm1, ptr [rax+0x40]);
|
|
vcvttph2w(ymm1, ptr_b [rax+0x40]);
|
|
vcvttph2w(zmm1|k2|T_z|T_sae, zmm5);
|
|
vcvttph2w(zmm1, ptr [rax+0x40]);
|
|
vcvttph2w(zmm1, ptr_b [rax+0x40]);
|
|
|
|
vcvtuw2ph(xmm1, xmm5);
|
|
vcvtuw2ph(xmm1, ptr [rax+0x40]);
|
|
vcvtuw2ph(xmm1, ptr_b [rax+0x40]);
|
|
vcvtuw2ph(ymm1, ptr [rax+0x40]);
|
|
vcvtuw2ph(ymm1, ptr_b [rax+0x40]);
|
|
vcvtuw2ph(zmm1|k2|T_z|T_rd_sae, zmm5);
|
|
vcvtuw2ph(zmm1, ptr [rax+0x40]);
|
|
vcvtuw2ph(zmm1, ptr_b [rax+0x40]);
|
|
|
|
vcvtw2ph(xmm1, xmm5);
|
|
vcvtw2ph(xmm1, ptr [rax+0x40]);
|
|
vcvtw2ph(xmm1, ptr_b [rax+0x40]);
|
|
vcvtw2ph(ymm1, ptr [rax+0x40]);
|
|
vcvtw2ph(ymm1, ptr_b [rax+0x40]);
|
|
vcvtw2ph(zmm1|k2|T_z|T_rd_sae, zmm5);
|
|
vcvtw2ph(zmm1, ptr [rax+0x40]);
|
|
vcvtw2ph(zmm1, ptr_b [rax+0x40]);
|
|
|
|
vcvtps2ph(xmm1, xmm2, 0x1);
|
|
vcvtps2ph(ptr [rax+0x40], xmm2, 0x2);
|
|
vcvtps2ph(xmm1, ymm2, 0x3);
|
|
vcvtps2ph(ptr [rax+0x40], ymm2, 0x4);
|
|
vcvtps2ph(xmm1|k1|T_z, xmm2, 0x5);
|
|
vcvtps2ph(ptr [rax+0x40]|k1, xmm3, 0x6);
|
|
vcvtps2ph(xmm1|k2, ymm4, 0x7);
|
|
vcvtps2ph(ptr [rax+0x40]|k2, ymm5, 0x8);
|
|
vcvtps2ph(ymm1|k2|T_sae, zmm5, 0x9);
|
|
vcvtps2ph(ptr [rax+0x40]|k5, zmm4, 0xa);
|
|
|
|
vcvtsh2usi(ecx|T_rd_sae, xmm1);
|
|
vcvtsh2usi(eax, ptr [rax+0x40]);
|
|
vcvtsh2usi(r9|T_rd_sae, xmm1);
|
|
vcvtsh2usi(r13, ptr [rax+0x40]);
|
|
|
|
vcvttsh2si(ecx|T_sae, xmm1);
|
|
vcvttsh2si(eax, ptr [rax+0x40]);
|
|
vcvttsh2si(r9|T_sae, xmm1);
|
|
vcvttsh2si(r13, ptr [rax+0x40]);
|
|
|
|
vcvttsh2usi(ecx|T_sae, xmm1);
|
|
vcvttsh2usi(eax, ptr [rax+0x40]);
|
|
vcvttsh2usi(r9|T_sae, xmm1);
|
|
vcvttsh2usi(r13, ptr [rax+0x40]);
|
|
|
|
vcvttph2qq(xmm1, xmm5);
|
|
vcvttph2qq(xmm1, ptr [rax+0x40]);
|
|
vcvttph2qq(xmm1, ptr_b [rax+0x40]);
|
|
vcvttph2qq(ymm1|k2|T_z, xmm5);
|
|
vcvttph2qq(ymm1, ptr [rax+0x40]);
|
|
vcvttph2qq(ymm1, ptr_b [rax+0x40]);
|
|
vcvttph2qq(zmm1|k5|T_z|T_sae, xmm3);
|
|
vcvttph2qq(zmm1|k5|T_z, ptr [rax+0x40]);
|
|
vcvttph2qq(zmm1|k5|T_z, ptr_b [rax+0x40]);
|
|
|
|
vcvtsi2sh(xmm1|T_rd_sae, xmm2, eax);
|
|
vcvtsi2sh(xmm1, xmm2, dword [rax+0x40]);
|
|
vcvtsi2sh(xmm1|T_rd_sae, xmm2, r9);
|
|
vcvtsi2sh(xmm1, xmm2, qword [rax+0x40]);
|
|
|
|
vcvtusi2sh(xmm1|T_rd_sae, xmm2, eax);
|
|
vcvtusi2sh(xmm1, xmm2, dword [rax+0x40]);
|
|
vcvtusi2sh(xmm1|T_rd_sae, xmm2, r9);
|
|
vcvtusi2sh(xmm1, xmm2, qword [rax+0x40]);
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
// vaddph
|
|
0x62, 0xF5, 0x74, 0x48, 0x58, 0x40, 0x01,
|
|
0x62, 0xF5, 0x74, 0x28, 0x58, 0x40, 0x02,
|
|
0x62, 0xF5, 0x74, 0x08, 0x58, 0x40, 0x04,
|
|
|
|
0x62, 0xF5, 0x74, 0x58, 0x58, 0x40, 0x20,
|
|
0x62, 0xF5, 0x74, 0x38, 0x58, 0x40, 0x20,
|
|
0x62, 0xF5, 0x74, 0x18, 0x58, 0x40, 0x20,
|
|
|
|
// vaddsh
|
|
0x62, 0xF5, 0x06, 0x08, 0x58, 0x40, 0x20,
|
|
0x62, 0xF5, 0x06, 0xBD, 0x58, 0xC3,
|
|
|
|
// vcmpph
|
|
0x62, 0xf3, 0x04, 0x08, 0xc2, 0x48, 0x04, 0x01,
|
|
0x62, 0xf3, 0x04, 0x28, 0xc2, 0x50, 0x02, 0x02,
|
|
0x62, 0xf3, 0x04, 0x48, 0xc2, 0x58, 0x01, 0x03,
|
|
0x62, 0xf3, 0x04, 0x18, 0xc2, 0x48, 0x20, 0x01,
|
|
0x62, 0xf3, 0x04, 0x38, 0xc2, 0x50, 0x20, 0x02,
|
|
0x62, 0xf3, 0x04, 0x58, 0xc2, 0x58, 0x20, 0x03,
|
|
|
|
// vcmpsh
|
|
0x62, 0xf3, 0x06, 0x08, 0xc2, 0x48, 0x20, 0x01,
|
|
0x62, 0x93, 0x76, 0x1d, 0xc2, 0xd9, 0x04,
|
|
|
|
// vcomish
|
|
0x62, 0xf5, 0x7c, 0x08, 0x2f, 0x48, 0x20,
|
|
0x62, 0xd5, 0x7c, 0x18, 0x2f, 0xcf,
|
|
|
|
// vucomish
|
|
0x62, 0xf5, 0x7c, 0x08, 0x2e, 0x48, 0x20,
|
|
0x62, 0xd5, 0x7c, 0x18, 0x2e, 0xcf,
|
|
|
|
// vfmaddsub213ph
|
|
0x62, 0xf6, 0x6d, 0x08, 0xa6, 0x48, 0x04,
|
|
0x62, 0xf6, 0x6d, 0x18, 0xa6, 0x48, 0x20,
|
|
0x62, 0xf6, 0x6d, 0x0b, 0xa6, 0xcd,
|
|
0x62, 0xf6, 0x6d, 0x28, 0xa6, 0x48, 0x02,
|
|
0x62, 0xf6, 0x6d, 0x38, 0xa6, 0x48, 0x20,
|
|
0x62, 0xf6, 0x6d, 0x2b, 0xa6, 0xcd,
|
|
0x62, 0xf6, 0x6d, 0x48, 0xa6, 0x48, 0x01,
|
|
0x62, 0xf6, 0x6d, 0x58, 0xa6, 0x48, 0x20,
|
|
0x62, 0xf6, 0x6d, 0x58, 0xa6, 0xcd,
|
|
|
|
// vfmsubadd132ph
|
|
0x62, 0xf6, 0x6d, 0x08, 0x97, 0x48, 0x04,
|
|
0x62, 0xf6, 0x6d, 0x18, 0x97, 0x48, 0x20,
|
|
0x62, 0xf6, 0x6d, 0x28, 0x97, 0x48, 0x02,
|
|
0x62, 0xf6, 0x6d, 0x38, 0x97, 0x48, 0x20,
|
|
0x62, 0xf6, 0x6d, 0x48, 0x97, 0x48, 0x01,
|
|
0x62, 0xf6, 0x6d, 0x58, 0x97, 0x48, 0x20,
|
|
0x62, 0xf6, 0x6d, 0x58, 0x97, 0xcd,
|
|
|
|
// vfmadd132ph
|
|
0x62, 0xf6, 0x6d, 0x08, 0x98, 0x48, 0x04,
|
|
0x62, 0xf6, 0x6d, 0x18, 0x98, 0x48, 0x20,
|
|
0x62, 0xf6, 0x6d, 0x28, 0x98, 0x48, 0x02,
|
|
0x62, 0xf6, 0x6d, 0x38, 0x98, 0x48, 0x20,
|
|
0x62, 0xf6, 0x6d, 0x48, 0x98, 0x48, 0x01,
|
|
0x62, 0xf6, 0x6d, 0x58, 0x98, 0x48, 0x20,
|
|
0x62, 0xf6, 0x6d, 0x38, 0x98, 0xcd,
|
|
|
|
// vfmsub231ph
|
|
0x62, 0xf6, 0x6d, 0x08, 0xba, 0x48, 0x04,
|
|
0x62, 0xf6, 0x6d, 0x18, 0xba, 0x48, 0x20,
|
|
0x62, 0xf6, 0x6d, 0x28, 0xba, 0x48, 0x02,
|
|
0x62, 0xf6, 0x6d, 0x38, 0xba, 0x48, 0x20,
|
|
0x62, 0xf6, 0x6d, 0x48, 0xba, 0x48, 0x01,
|
|
0x62, 0xf6, 0x6d, 0x58, 0xba, 0x48, 0x20,
|
|
0x62, 0xf6, 0x6d, 0x38, 0xba, 0xcd,
|
|
|
|
// vfnmsub231ph
|
|
0x62, 0xf6, 0x6d, 0x08, 0xbe, 0x48, 0x04,
|
|
0x62, 0xf6, 0x6d, 0x38, 0xbe, 0x48, 0x20,
|
|
0x62, 0xf6, 0x6d, 0x58, 0xbe, 0x48, 0x20,
|
|
0x62, 0xf6, 0x6d, 0x38, 0xbe, 0xcd,
|
|
|
|
// vfmadd132sh
|
|
0x62, 0xf6, 0x6d, 0xb9, 0x99, 0xcb,
|
|
0x62, 0xf6, 0x6d, 0x08, 0x99, 0x48, 0x20,
|
|
|
|
// vfnmadd132sh
|
|
0x62, 0xf6, 0x6d, 0xb9, 0x9d, 0xcb,
|
|
0x62, 0xf6, 0x6d, 0x08, 0x9d, 0x48, 0x20,
|
|
|
|
// vfmsub132sh
|
|
0x62, 0xf6, 0x6d, 0xb9, 0x9b, 0xcb,
|
|
0x62, 0xf6, 0x6d, 0x08, 0x9b, 0x48, 0x20,
|
|
|
|
// vfnmsub132sh
|
|
0x62, 0xf6, 0x6d, 0xb9, 0x9f, 0xcb,
|
|
0x62, 0xf6, 0x6d, 0x08, 0x9f, 0x48, 0x20,
|
|
|
|
// vfcmaddcph
|
|
0x62, 0xf6, 0x6f, 0x89, 0x56, 0x48, 0x04,
|
|
0x62, 0xf6, 0x6f, 0xa9, 0x56, 0x48, 0x02,
|
|
0x62, 0xf6, 0x6f, 0x49, 0x56, 0x48, 0x01,
|
|
0x62, 0xf6, 0x6f, 0x39, 0x56, 0xcd,
|
|
0x62, 0xf6, 0x6f, 0x99, 0x56, 0x48, 0x10,
|
|
0x62, 0xf6, 0x6f, 0xb9, 0x56, 0x48, 0x10,
|
|
0x62, 0xf6, 0x6f, 0xd9, 0x56, 0x48, 0x10,
|
|
|
|
// vfmaddcph
|
|
0x62, 0xf6, 0x6e, 0x08, 0x56, 0x48, 0x04,
|
|
0x62, 0xf6, 0x6e, 0xb9, 0x56, 0x48, 0x10,
|
|
0x62, 0xf6, 0x6e, 0x58, 0x56, 0x48, 0x10,
|
|
|
|
// vfcmulcph
|
|
0x62, 0xf6, 0x6f, 0x08, 0xd6, 0x48, 0x04,
|
|
0x62, 0xf6, 0x6f, 0xb9, 0xd6, 0x48, 0x10,
|
|
0x62, 0xf6, 0x6f, 0x58, 0xd6, 0x48, 0x10,
|
|
|
|
// vfmulcph
|
|
0x62, 0xf6, 0x6e, 0x08, 0xd6, 0x48, 0x04,
|
|
0x62, 0xf6, 0x6e, 0xb9, 0xd6, 0x48, 0x10,
|
|
0x62, 0xf6, 0x6e, 0x58, 0xd6, 0x48, 0x10,
|
|
|
|
// vrcpph
|
|
0x62, 0xf6, 0x7d, 0x08, 0x4c, 0x48, 0x04,
|
|
0x62, 0xf6, 0x7d, 0x18, 0x4c, 0x48, 0x20,
|
|
0x62, 0xf6, 0x7d, 0x28, 0x4c, 0x48, 0x02,
|
|
0x62, 0xf6, 0x7d, 0x38, 0x4c, 0x48, 0x20,
|
|
0x62, 0xf6, 0x7d, 0x48, 0x4c, 0x48, 0x01,
|
|
0x62, 0xf6, 0x7d, 0x58, 0x4c, 0x48, 0x20,
|
|
|
|
// vrcpsh
|
|
0x62, 0xf6, 0x65, 0x08, 0x4d, 0x48, 0x20,
|
|
|
|
// vrsqrtph
|
|
0x62, 0xf6, 0x7d, 0x08, 0x4e, 0x48, 0x04,
|
|
0x62, 0xf6, 0x7d, 0x18, 0x4e, 0x48, 0x20,
|
|
0x62, 0xf6, 0x7d, 0x28, 0x4e, 0x50, 0x02,
|
|
0x62, 0xf6, 0x7d, 0x38, 0x4e, 0x50, 0x20,
|
|
0x62, 0xf6, 0x7d, 0x48, 0x4e, 0x50, 0x01,
|
|
0x62, 0xf6, 0x7d, 0x58, 0x4e, 0x50, 0x20,
|
|
|
|
// vrsqrtsh
|
|
0x62, 0xf6, 0x45, 0x8d, 0x4f, 0x48, 0x20,
|
|
|
|
// vsqrtph
|
|
0x62, 0xf5, 0x7c, 0x8c, 0x51, 0x48, 0x04,
|
|
0x62, 0xf5, 0x7c, 0x9c, 0x51, 0x48, 0x20,
|
|
0x62, 0xf5, 0x7c, 0xbc, 0x51, 0x48, 0x20,
|
|
0x62, 0xf5, 0x7c, 0xcc, 0x51, 0x48, 0x01,
|
|
0x62, 0xf5, 0x7c, 0xdc, 0x51, 0x48, 0x20,
|
|
|
|
// vsqrtsh
|
|
0x62, 0xf5, 0x56, 0x8c, 0x51, 0x48, 0x20,
|
|
0x62, 0xf5, 0x56, 0xbc, 0x51, 0xcf,
|
|
|
|
// vscalefph
|
|
0x62, 0xf6, 0x55, 0x08, 0x2c, 0x48, 0x04,
|
|
0x62, 0xf6, 0x55, 0x18, 0x2c, 0x48, 0x20,
|
|
0x62, 0xf6, 0x55, 0x28, 0x2c, 0x48, 0x02,
|
|
0x62, 0xf6, 0x55, 0x38, 0x2c, 0x48, 0x20,
|
|
0x62, 0xf6, 0x55, 0x48, 0x2c, 0x48, 0x01,
|
|
0x62, 0xf6, 0x55, 0x58, 0x2c, 0x48, 0x20,
|
|
0x62, 0xf6, 0x55, 0xb9, 0x2c, 0xcf,
|
|
|
|
// vscalefsh
|
|
0x62, 0xf6, 0x55, 0x08, 0x2d, 0x48, 0x20,
|
|
0x62, 0xf6, 0x55, 0xb9, 0x2d, 0xcf,
|
|
|
|
// vreduceph
|
|
0x62, 0xf3, 0x7c, 0x08, 0x56, 0x48, 0x04, 0x01,
|
|
0x62, 0xf3, 0x7c, 0x18, 0x56, 0x48, 0x20, 0x02,
|
|
0x62, 0xf3, 0x7c, 0x28, 0x56, 0x48, 0x02, 0x03,
|
|
0x62, 0xf3, 0x7c, 0x38, 0x56, 0x48, 0x20, 0x04,
|
|
0x62, 0xf3, 0x7c, 0x48, 0x56, 0x48, 0x01, 0x05,
|
|
0x62, 0xf3, 0x7c, 0x58, 0x56, 0x48, 0x20, 0x06,
|
|
0x62, 0xf3, 0x7c, 0x99, 0x56, 0xcd, 0x07,
|
|
|
|
// vreducesh
|
|
0x62, 0xf3, 0x64, 0x08, 0x57, 0x48, 0x20, 0x01,
|
|
0x62, 0xf3, 0x54, 0x99, 0x57, 0xcc, 0x02,
|
|
|
|
// vrndscaleph
|
|
0x62, 0xf3, 0x7c, 0x08, 0x08, 0x48, 0x04, 0x01,
|
|
0x62, 0xf3, 0x7c, 0x18, 0x08, 0x48, 0x20, 0x02,
|
|
0x62, 0xf3, 0x7c, 0x28, 0x08, 0x48, 0x02, 0x03,
|
|
0x62, 0xf3, 0x7c, 0x38, 0x08, 0x48, 0x20, 0x04,
|
|
0x62, 0xf3, 0x7c, 0x48, 0x08, 0x48, 0x01, 0x05,
|
|
0x62, 0xf3, 0x7c, 0x58, 0x08, 0x48, 0x20, 0x06,
|
|
0x62, 0xf3, 0x7c, 0x99, 0x08, 0xcd, 0x07,
|
|
|
|
// vrndscalesh
|
|
0x62, 0xf3, 0x64, 0x08, 0x0a, 0x48, 0x20, 0x01,
|
|
0x62, 0xf3, 0x54, 0x99, 0x0a, 0xcc, 0x02,
|
|
|
|
// vfpclassph
|
|
0x62, 0xf3, 0x7c, 0x08, 0x66, 0x48, 0x04, 0x01,
|
|
0x62, 0xf3, 0x7c, 0x18, 0x66, 0x48, 0x20, 0x02,
|
|
0x62, 0xf3, 0x7c, 0x28, 0x66, 0x48, 0x02, 0x03,
|
|
0x62, 0xf3, 0x7c, 0x38, 0x66, 0x48, 0x20, 0x04,
|
|
0x62, 0xf3, 0x7c, 0x48, 0x66, 0x48, 0x01, 0x05,
|
|
0x62, 0xf3, 0x7c, 0x58, 0x66, 0x48, 0x20, 0x06,
|
|
|
|
// vfpclasssh
|
|
0x62, 0xf3, 0x7c, 0x0a, 0x67, 0xcb, 0x05,
|
|
0x62, 0xf3, 0x7c, 0x0a, 0x67, 0x48, 0x20, 0x05,
|
|
|
|
// vgetexpph
|
|
0x62, 0xf6, 0x7d, 0x08, 0x42, 0x48, 0x04,
|
|
0x62, 0xf6, 0x7d, 0x38, 0x42, 0x48, 0x20,
|
|
0x62, 0xf6, 0x7d, 0x48, 0x42, 0x48, 0x01,
|
|
0x62, 0xf6, 0x7d, 0x99, 0x42, 0xcd,
|
|
|
|
// vgetexpsh
|
|
0x62, 0xf6, 0x55, 0x08, 0x43, 0x48, 0x20,
|
|
0x62, 0xf6, 0x65, 0x99, 0x43, 0xcd,
|
|
|
|
// vgetmantph
|
|
0x62, 0xf3, 0x7c, 0x08, 0x26, 0x48, 0x04, 0x01,
|
|
0x62, 0xf3, 0x7c, 0x38, 0x26, 0x48, 0x20, 0x02,
|
|
0x62, 0xf3, 0x7c, 0x48, 0x26, 0x48, 0x01, 0x03,
|
|
0x62, 0xf3, 0x7c, 0x99, 0x26, 0xcd, 0x04,
|
|
|
|
// vgetmantsh
|
|
0x62, 0xf3, 0x54, 0x08, 0x27, 0x48, 0x20, 0x05,
|
|
0x62, 0xf3, 0x64, 0x99, 0x27, 0xcd, 0x06,
|
|
|
|
// vmovsh
|
|
0x62, 0xf5, 0x7e, 0x89, 0x10, 0x48, 0x20,
|
|
0x62, 0xf5, 0x7e, 0x09, 0x11, 0x48, 0x20,
|
|
0x62, 0xf5, 0x66, 0x8a, 0x10, 0xcd,
|
|
|
|
// vmovw
|
|
0x62, 0xd5, 0x7d, 0x08, 0x6e, 0xcd,
|
|
0x62, 0xf5, 0x7d, 0x08, 0x6e, 0x58, 0x20,
|
|
0x62, 0xd5, 0x7d, 0x08, 0x7e, 0xc9,
|
|
0x62, 0xf5, 0x7d, 0x08, 0x7e, 0x78, 0x20,
|
|
|
|
// vcvtsd2sh
|
|
0x62, 0xf5, 0xef, 0xb9, 0x5a, 0xcb,
|
|
0x62, 0xf5, 0xef, 0x08, 0x5a, 0x48, 0x08,
|
|
|
|
// vcvtsh2sd
|
|
0x62, 0xf5, 0x6e, 0x99, 0x5a, 0xcb,
|
|
0x62, 0xf5, 0x6e, 0x08, 0x5a, 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
0x62, 0xf5, 0x7d, 0xaa, 0x7a, 0xcd,
|
|
0x62, 0xf5, 0x7d, 0x28, 0x7a, 0x48, 0x08,
|
|
0x62, 0xf5, 0x7d, 0x38, 0x7a, 0x48, 0x20,
|
|
0x62, 0xf5, 0x7d, 0x9d, 0x7a, 0xcb,
|
|
0x62, 0xf5, 0x7d, 0xcd, 0x7a, 0x48, 0x04,
|
|
0x62, 0xf5, 0x7d, 0xdd, 0x7a, 0x48, 0x20,
|
|
|
|
// vcvtsi2sh
|
|
0x62, 0xf5, 0x6e, 0x38, 0x2a, 0xc8,
|
|
0x62, 0xf5, 0x6e, 0x08, 0x2a, 0x48, 0x10,
|
|
0x62, 0xd5, 0xee, 0x38, 0x2a, 0xc9,
|
|
0x62, 0xf5, 0xee, 0x08, 0x2a, 0x48, 0x08,
|
|
|
|
// vcvtusi2sh
|
|
0x62, 0xf5, 0x6e, 0x38, 0x7b, 0xc8,
|
|
0x62, 0xf5, 0x6e, 0x08, 0x7b, 0x48, 0x10,
|
|
0x62, 0xd5, 0xee, 0x38, 0x7b, 0xc9,
|
|
0x62, 0xf5, 0xee, 0x08, 0x7b, 0x48, 0x08,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
}
|
|
#endif
|
|
|
|
CYBOZU_TEST_AUTO(waitpkg)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
tpause(eax);
|
|
tpause(ebx);
|
|
#ifdef XBYAK32
|
|
umonitor(cx);
|
|
umonitor(ecx);
|
|
#else
|
|
umonitor(ecx);
|
|
umonitor(rcx);
|
|
#endif
|
|
umwait(eax);
|
|
umwait(ebx);
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
// tpause
|
|
0x66, 0x0f, 0xae, 0xf0,
|
|
0x66, 0x0f, 0xae, 0xf3,
|
|
// umonitor
|
|
0x67, 0xf3, 0x0f, 0xae, 0xf1,
|
|
0xf3, 0x0f, 0xae, 0xf1,
|
|
// tpause
|
|
0xf2, 0x0f, 0xae, 0xf0,
|
|
0xf2, 0x0f, 0xae, 0xf3,
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
}
|
|
|
|
CYBOZU_TEST_AUTO(misc)
|
|
{
|
|
struct Code : Xbyak::CodeGenerator {
|
|
Code()
|
|
{
|
|
cldemote(ptr[eax+esi*4+0x12]);
|
|
movdiri(ptr[edx+esi*2+4], eax);
|
|
movdir64b(eax, ptr[edx]);
|
|
#ifdef XBYAK64
|
|
cldemote(ptr[rax+rdi*8+0x123]);
|
|
movdiri(ptr[rax+r12], r9);
|
|
movdiri(ptr[rax+r12*2+4], r9d);
|
|
movdir64b(r10, ptr[r8]);
|
|
#endif
|
|
}
|
|
} c;
|
|
const uint8_t tbl[] = {
|
|
#ifdef XBYAK64
|
|
0x67,
|
|
#endif
|
|
0x0f, 0x1c, 0x44, 0xb0, 0x12, // cldemote
|
|
#ifdef XBYAK64
|
|
0x67,
|
|
#endif
|
|
0x0f, 0x38, 0xf9, 0x44, 0x72, 0x04, // movdiri
|
|
|
|
0x66,
|
|
#ifdef XBYAK64
|
|
0x67,
|
|
#endif
|
|
0x0f, 0x38, 0xf8, 0x02, // movdir64b
|
|
#ifdef XBYAK64
|
|
0x0f, 0x1c, 0x84, 0xf8, 0x23, 0x01, 0x00, 0x00, // cldemote
|
|
0x4e, 0x0f, 0x38, 0xf9, 0x0c, 0x20, // movdiri
|
|
0x46, 0x0f, 0x38, 0xf9, 0x4c, 0x60, 0x04, // movdiri
|
|
0x66, 0x45, 0x0f, 0x38, 0xf8, 0x10, // movdir64b
|
|
#endif
|
|
};
|
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
|
}
|
|
|
|
CYBOZU_TEST_AUTO(cpu)
|
|
{
|
|
// https://github.com/herumi/xbyak/issues/148
|
|
using namespace Xbyak::util;
|
|
Cpu cpu;
|
|
CYBOZU_TEST_EQUAL(cpu.has(Cpu::tINTEL) && cpu.has(Cpu::tAMD), cpu.has(Cpu::tINTEL | Cpu::tAMD));
|
|
}
|