aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/misc.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2022-12-07 16:17:07 +0900
committerMITSUNARI Shigeo <[email protected]>2022-12-07 16:17:07 +0900
commit1b08a82483ed9e16b767acebd79ef493aa5777b3 (patch)
tree01825cec4c064362a14683a4ed0261b6048c307c /test/misc.cpp
parentbef70d9b1b6b477b881e3c34afec0c9ec088179d (diff)
downloadxbyak-1b08a82483ed9e16b767acebd79ef493aa5777b3.tar.gz
xbyak-1b08a82483ed9e16b767acebd79ef493aa5777b3.zip
add test of prefetchiti
Diffstat (limited to 'test/misc.cpp')
-rw-r--r--test/misc.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/misc.cpp b/test/misc.cpp
index f0e577f..2090dca 100644
--- a/test/misc.cpp
+++ b/test/misc.cpp
@@ -2139,4 +2139,22 @@ CYBOZU_TEST_AUTO(CMPccXADD)
CYBOZU_TEST_EQUAL(c.getSize(), n);
CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
}
+
+CYBOZU_TEST_AUTO(prefetchiti)
+{
+ struct Code : Xbyak::CodeGenerator {
+ Code()
+ {
+ prefetchit0(ptr[rax]);
+ prefetchit1(ptr[rax]);
+ }
+ } c;
+ const uint8_t tbl[] = {
+ 0x0f, 0x18, 0x38,
+ 0x0f, 0x18, 0x30
+ };
+ const size_t n = sizeof(tbl) / sizeof(tbl[0]);
+ CYBOZU_TEST_EQUAL(c.getSize(), n);
+ CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n);
+}
#endif