simple test for init
This commit is contained in:
parent
5f696277f7
commit
3f66cdac5d
4 changed files with 32 additions and 14 deletions
|
@ -1,23 +1,12 @@
|
|||
#include "lib.h"
|
||||
#include <xbyak/xbyak.h>
|
||||
|
||||
struct Code : public Xbyak::CodeGenerator {
|
||||
Code()
|
||||
{
|
||||
printf("Code:%s\n", eax.toString());
|
||||
ret();
|
||||
}
|
||||
};
|
||||
|
||||
void init()
|
||||
try
|
||||
{
|
||||
static bool init = true;
|
||||
printf("in lib_test %d\n", init);
|
||||
if (!init) return;
|
||||
init = false;
|
||||
static Code code;
|
||||
} catch (const Xbyak::Error& e) {
|
||||
printf("err=%s\n", Xbyak::ConvertErrorToString(e));
|
||||
X::a.put();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue