aboutsummaryrefslogtreecommitdiffhomepage
path: root/sample/test0.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2012-03-23 21:21:38 +0900
committerMITSUNARI Shigeo <[email protected]>2012-03-23 21:21:38 +0900
commitc5985dc3f248fc67ce7ccad568a743535f2b2f44 (patch)
treeb7b96283ace006b4743ac0a7f97d2aed6bc12623 /sample/test0.cpp
parentf153e026f3205d741fbab21ddb208147590e53a7 (diff)
downloadxbyak-c5985dc3f248fc67ce7ccad568a743535f2b2f44.tar.gz
xbyak-c5985dc3f248fc67ce7ccad568a743535f2b2f44.zip
fix userPtr mode
Diffstat (limited to 'sample/test0.cpp')
-rw-r--r--sample/test0.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/sample/test0.cpp b/sample/test0.cpp
index c7504d1..cf3db88 100644
--- a/sample/test0.cpp
+++ b/sample/test0.cpp
@@ -129,6 +129,10 @@ int main()
CodeArray::protect(p, codeSize, true);
Sample s(p, codeSize);
int (*func)(int) = (int (*)(int))s.getCode();
+ if ((uint8*)func != p) {
+ fprintf(stderr, "internal error %p %p\n", p, func);
+ return 1;
+ }
printf("0 + ... + %d = %d\n", 100, func(100));
CodeArray::protect(p, codeSize, false);
}