mirror of
https://github.com/herumi/xbyak
synced 2024-11-20 16:06:14 -07:00
move test of rdfsbase etc.
This commit is contained in:
parent
cb85e7f6f4
commit
0d96334eff
2 changed files with 4 additions and 51 deletions
|
@ -1335,6 +1335,10 @@ class Test {
|
|||
put("cmpxchg16b", MEM);
|
||||
put("fxrstor64", MEM);
|
||||
put("xbegin", "0x12345678");
|
||||
put("rdfsbase", REG32|REG64);
|
||||
put("rdgsbase", REG32|REG64);
|
||||
put("wrfsbase", REG32|REG64);
|
||||
put("wrgsbase", REG32|REG64);
|
||||
#endif
|
||||
{
|
||||
const char tbl[][8] = {
|
||||
|
|
|
@ -2284,55 +2284,4 @@ CYBOZU_TEST_AUTO(avx_vnni_int)
|
|||
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
||||
}
|
||||
|
||||
CYBOZU_TEST_AUTO(rdfsbase)
|
||||
{
|
||||
struct Code : Xbyak::CodeGenerator {
|
||||
Code()
|
||||
{
|
||||
rdfsbase(rax);
|
||||
rdfsbase(r15d);
|
||||
rdfsbase(r30d);
|
||||
rdfsbase(r31);
|
||||
|
||||
rdgsbase(rax);
|
||||
rdgsbase(r15d);
|
||||
rdgsbase(r30d);
|
||||
rdgsbase(r31);
|
||||
|
||||
wrfsbase(rax);
|
||||
wrfsbase(r15d);
|
||||
wrfsbase(r30d);
|
||||
wrfsbase(r31);
|
||||
|
||||
wrgsbase(rax);
|
||||
wrgsbase(r15d);
|
||||
wrgsbase(r30d);
|
||||
wrgsbase(r31);
|
||||
}
|
||||
} c;
|
||||
const uint8_t tbl[] = {
|
||||
0xf3, 0x48, 0x0f, 0xae, 0xc0,
|
||||
0xf3, 0x41, 0x0f, 0xae, 0xc7,
|
||||
0xf3, 0xd5, 0x91, 0xae, 0xc6,
|
||||
0xf3, 0xd5, 0x99, 0xae, 0xc7,
|
||||
|
||||
0xf3, 0x48, 0x0f, 0xae, 0xc8,
|
||||
0xf3, 0x41, 0x0f, 0xae, 0xcf,
|
||||
0xf3, 0xd5, 0x91, 0xae, 0xce,
|
||||
0xf3, 0xd5, 0x99, 0xae, 0xcf,
|
||||
|
||||
0xf3, 0x48, 0x0f, 0xae, 0xd0,
|
||||
0xf3, 0x41, 0x0f, 0xae, 0xd7,
|
||||
0xf3, 0xd5, 0x91, 0xae, 0xd6,
|
||||
0xf3, 0xd5, 0x99, 0xae, 0xd7,
|
||||
|
||||
0xf3, 0x48, 0x0f, 0xae, 0xd8,
|
||||
0xf3, 0x41, 0x0f, 0xae, 0xdf,
|
||||
0xf3, 0xd5, 0x91, 0xae, 0xde,
|
||||
0xf3, 0xd5, 0x99, 0xae, 0xdf,
|
||||
};
|
||||
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
|
||||
CYBOZU_TEST_EQUAL(c.getSize(), n);
|
||||
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue