add lib test
This commit is contained in:
parent
6f57b3cf03
commit
d548d02e2c
3 changed files with 32 additions and 0 deletions
17
test/lib_test.cpp
Normal file
17
test/lib_test.cpp
Normal 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();
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue