aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/lib_test.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2012-12-02 16:57:17 +0900
committerMITSUNARI Shigeo <[email protected]>2012-12-02 16:57:17 +0900
commitd548d02e2c9def7c728db2edbc5477a9e41cedbc (patch)
treeb4cab8e78fadf9c7419b8e2008fd8c89597f1d9e /test/lib_test.cpp
parent6f57b3cf03d6fb336af85b123e6348863a9ae849 (diff)
downloadxbyak-d548d02e2c9def7c728db2edbc5477a9e41cedbc.tar.gz
xbyak-d548d02e2c9def7c728db2edbc5477a9e41cedbc.zip
add lib test
Diffstat (limited to 'test/lib_test.cpp')
-rw-r--r--test/lib_test.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/lib_test.cpp b/test/lib_test.cpp
new file mode 100644
index 0000000..399d1fa
--- /dev/null
+++ b/test/lib_test.cpp
@@ -0,0 +1,17 @@
+#include <xbyak/xbyak.h>
+
+struct Code : public Xbyak::CodeGenerator {
+ Code()
+ {
+ mov(eax, 5);
+ ret();
+ }
+};
+
+int ret123()
+{
+ static Code code;
+ int (*f)() = (int (*)())code.getCode();
+ return f();
+}
+