diff options
Diffstat (limited to 'test/misc.cpp')
-rw-r--r-- | test/misc.cpp | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/test/misc.cpp b/test/misc.cpp index 1457691..a15721f 100644 --- a/test/misc.cpp +++ b/test/misc.cpp @@ -2284,5 +2284,55 @@ 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 |