add lib test

This commit is contained in:
MITSUNARI Shigeo 2012-12-02 16:57:17 +09:00
parent 6f57b3cf03
commit d548d02e2c
3 changed files with 32 additions and 0 deletions

17
test/lib_test.cpp Normal file
View file

@ -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();
}