mirror of
https://github.com/herumi/xbyak
synced 2024-11-20 16:06:14 -07:00
add test of vmovw
This commit is contained in:
parent
6d48afc6c0
commit
ab9653f483
1 changed files with 52 additions and 0 deletions
|
@ -2291,6 +2291,7 @@ CYBOZU_TEST_AUTO(vmovd)
|
||||||
{
|
{
|
||||||
setDefaultEncodingAVX10(PreAVX10v2Encoding);
|
setDefaultEncodingAVX10(PreAVX10v2Encoding);
|
||||||
vmovd(eax, xm1); // always AVX10.1
|
vmovd(eax, xm1); // always AVX10.1
|
||||||
|
vmovd(xm1, eax); // always AVX10.1
|
||||||
vmovd(xm3, xm1); // always AVX10.2
|
vmovd(xm3, xm1); // always AVX10.2
|
||||||
// AVX-512 (AVX10.1)
|
// AVX-512 (AVX10.1)
|
||||||
vmovd(ptr[rax+128], xm1);
|
vmovd(ptr[rax+128], xm1);
|
||||||
|
@ -2300,6 +2301,7 @@ CYBOZU_TEST_AUTO(vmovd)
|
||||||
|
|
||||||
setDefaultEncodingAVX10(AVX10v2Encoding);
|
setDefaultEncodingAVX10(AVX10v2Encoding);
|
||||||
vmovd(eax, xm1); // always AVX10.1
|
vmovd(eax, xm1); // always AVX10.1
|
||||||
|
vmovd(xm1, eax); // always AVX10.1
|
||||||
vmovd(xm3, xm1); // always AVX10.2
|
vmovd(xm3, xm1); // always AVX10.2
|
||||||
// AVX10.2
|
// AVX10.2
|
||||||
vmovd(ptr[rax+128], xm1);
|
vmovd(ptr[rax+128], xm1);
|
||||||
|
@ -2310,6 +2312,7 @@ CYBOZU_TEST_AUTO(vmovd)
|
||||||
} c;
|
} c;
|
||||||
const uint8_t tbl[] = {
|
const uint8_t tbl[] = {
|
||||||
0xc5, 0xf9, 0x7e, 0xc8, // avx10.1
|
0xc5, 0xf9, 0x7e, 0xc8, // avx10.1
|
||||||
|
0xc5, 0xf9, 0x6e, 0xc8, // avx10.1
|
||||||
0x62, 0xf1, 0x7e, 0x08, 0x7e, 0xd9, // avx10.2
|
0x62, 0xf1, 0x7e, 0x08, 0x7e, 0xd9, // avx10.2
|
||||||
0xc5, 0xf9, 0x7e, 0x88, 0x80, 0x00, 0x00, 0x00, // avx
|
0xc5, 0xf9, 0x7e, 0x88, 0x80, 0x00, 0x00, 0x00, // avx
|
||||||
0xc5, 0xf9, 0x6e, 0x88, 0x80, 0x00, 0x00, 0x00, // avx
|
0xc5, 0xf9, 0x6e, 0x88, 0x80, 0x00, 0x00, 0x00, // avx
|
||||||
|
@ -2317,6 +2320,7 @@ CYBOZU_TEST_AUTO(vmovd)
|
||||||
0x62, 0x61, 0x7d, 0x08, 0x6e, 0x70, 0x20, // avx10.1
|
0x62, 0x61, 0x7d, 0x08, 0x6e, 0x70, 0x20, // avx10.1
|
||||||
|
|
||||||
0xc5, 0xf9, 0x7e, 0xc8, // avx10.1
|
0xc5, 0xf9, 0x7e, 0xc8, // avx10.1
|
||||||
|
0xc5, 0xf9, 0x6e, 0xc8, // avx10.1
|
||||||
0x62, 0xf1, 0x7e, 0x08, 0x7e, 0xd9, // avx10.2
|
0x62, 0xf1, 0x7e, 0x08, 0x7e, 0xd9, // avx10.2
|
||||||
0x62, 0xf1, 0x7d, 0x08, 0xd6, 0x48, 0x20, // avx10.2
|
0x62, 0xf1, 0x7d, 0x08, 0xd6, 0x48, 0x20, // avx10.2
|
||||||
0x62, 0xf1, 0x7e, 0x08, 0x7e, 0x48, 0x20, // avx10.2
|
0x62, 0xf1, 0x7e, 0x08, 0x7e, 0x48, 0x20, // avx10.2
|
||||||
|
@ -2328,4 +2332,52 @@ CYBOZU_TEST_AUTO(vmovd)
|
||||||
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CYBOZU_TEST_AUTO(vmovw)
|
||||||
|
{
|
||||||
|
struct Code : Xbyak::CodeGenerator {
|
||||||
|
Code()
|
||||||
|
{
|
||||||
|
setDefaultEncodingAVX10(PreAVX10v2Encoding);
|
||||||
|
vmovw(eax, xm1); // always avx10.1
|
||||||
|
vmovw(xm1, eax); // always avx10.1
|
||||||
|
vmovw(xm3, xm1); // always avx10.2
|
||||||
|
// AVX10.1
|
||||||
|
vmovw(ptr[rax+128], xm1);
|
||||||
|
vmovw(xm1, ptr[rax+128]);
|
||||||
|
vmovw(ptr[rax+128], xm30);
|
||||||
|
vmovw(xm30, ptr[rax+128]);
|
||||||
|
|
||||||
|
setDefaultEncodingAVX10(AVX10v2Encoding);
|
||||||
|
vmovw(eax, xm1); // always avx10.1
|
||||||
|
vmovw(xm1, eax); // always avx10.1
|
||||||
|
vmovw(xm3, xm1); // always avx10.2
|
||||||
|
// AVX10.2
|
||||||
|
vmovw(ptr[rax+128], xm1);
|
||||||
|
vmovw(xm1, ptr[rax+128]);
|
||||||
|
vmovw(ptr[rax+128], xm30);
|
||||||
|
vmovw(xm30, ptr[rax+128]);
|
||||||
|
}
|
||||||
|
} c;
|
||||||
|
const uint8_t tbl[] = {
|
||||||
|
0x62, 0xf5, 0x7d, 0x08, 0x7e, 0xc8,
|
||||||
|
0x62, 0xf5, 0x7d, 0x08, 0x6e, 0xc8,
|
||||||
|
0x62, 0xf5, 0x7e, 0x08, 0x6e, 0xd9,
|
||||||
|
0x62, 0xf5, 0x7d, 0x08, 0x7e, 0x48, 0x40,
|
||||||
|
0x62, 0xf5, 0x7d, 0x08, 0x6e, 0x48, 0x40,
|
||||||
|
0x62, 0x65, 0x7d, 0x08, 0x7e, 0x70, 0x40,
|
||||||
|
0x62, 0x65, 0x7d, 0x08, 0x6e, 0x70, 0x40,
|
||||||
|
|
||||||
|
0x62, 0xf5, 0x7d, 0x08, 0x7e, 0xc8,
|
||||||
|
0x62, 0xf5, 0x7d, 0x08, 0x6e, 0xc8,
|
||||||
|
0x62, 0xf5, 0x7e, 0x08, 0x6e, 0xd9,
|
||||||
|
0x62, 0xf5, 0x7e, 0x08, 0x7e, 0x48, 0x40,
|
||||||
|
0x62, 0xf5, 0x7e, 0x08, 0x6e, 0x48, 0x40,
|
||||||
|
0x62, 0x65, 0x7e, 0x08, 0x7e, 0x70, 0x40,
|
||||||
|
0x62, 0x65, 0x7e, 0x08, 0x6e, 0x70, 0x40,
|
||||||
|
};
|
||||||
|
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
||||||
|
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
||||||
|
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue