diff options
author | MITSUNARI Shigeo <[email protected]> | 2023-11-20 17:56:31 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2023-11-20 17:56:31 +0900 |
commit | e43d99762a8c6b28a0c5c87119960378bb7c023e (patch) | |
tree | 235cb0d2f796a7da6dd54d0cc525dedbb8a781c0 /test | |
parent | 92153b6f884ffdecab4643e74a444bf332c9b174 (diff) | |
download | xbyak-e43d99762a8c6b28a0c5c87119960378bb7c023e.tar.gz xbyak-e43d99762a8c6b28a0c5c87119960378bb7c023e.zip |
add crc32 tests
Diffstat (limited to 'test')
-rw-r--r-- | test/apx.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/apx.cpp b/test/apx.cpp index a39c39c..4272fbb 100644 --- a/test/apx.cpp +++ b/test/apx.cpp @@ -1035,7 +1035,7 @@ CYBOZU_TEST_AUTO(base) CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n); } -CYBOZU_TEST_AUTO(mov) +CYBOZU_TEST_AUTO(mov_misc) { struct Code : Xbyak::CodeGenerator { Code() @@ -1050,6 +1050,11 @@ CYBOZU_TEST_AUTO(mov) movbe(r30d, ptr [r16]); movbe(r30, ptr [r16]); + crc32(r30d, r8b); + crc32(r30d, r8w); + crc32(r30d, r8d); + crc32(r30, r8b); + crc32(r30, r8); } } c; const uint8_t tbl[] = { @@ -1061,6 +1066,9 @@ CYBOZU_TEST_AUTO(mov) 0x62, 0x6c, 0x7d, 0x08, 0x61, 0x30, 0x62, 0x6c, 0x7c, 0x08, 0x61, 0x30, 0x62, 0x6c, 0xfc, 0x08, 0x61, 0x30, 0x62, 0x6c, 0x7d, 0x08, 0x60, 0x30, 0x62, 0x6c, 0x7c, 0x08, 0x60, 0x30, 0x62, 0x6c, 0xfc, 0x08, 0x60, 0x30, + // crc32 + 0x62, 0x44, 0x7c, 0x08, 0xf0, 0xf0, 0x62, 0x44, 0x7d, 0x08, 0xf1, 0xf0, 0x62, 0x44, 0x7c, 0x08, + 0xf1, 0xf0, 0x62, 0x44, 0xfc, 0x08, 0xf0, 0xf0, 0x62, 0x44, 0xfc, 0x08, 0xf1, 0xf0, }; const size_t n = sizeof(tbl); CYBOZU_TEST_EQUAL(c.getSize(), n); |