#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <vector>
#include "xbyak/xbyak.h"
#include "xbyak/xbyak_util.h"
Go to the source code of this file.
◆ NUM_OF_ARRAY
#define NUM_OF_ARRAY |
( |
| x | ) |
|
Value:(sizeof(x) / sizeof(x[0]))
Definition at line 33 of file toyvm.cpp.
◆ XBYAK_NO_OP_NAMES
#define XBYAK_NO_OP_NAMES |
◆ fibC()
Definition at line 286 of file toyvm.cpp.
287{
290 c = 1;
291lp:
292 t = c;
295 n--;
296 if (n != 0) goto lp;
297 printf(
"c=%d(0x%08x)\n", c, c);
298}
LOGGING_API void printf(Category category, const char *format,...)
◆ main()
Definition at line 300 of file toyvm.cpp.
301{
302 try {
303 const int n = 10000;
305
306 fib.recompile();
307
308 {
311 fib.run();
314 }
315
316 {
319 fib.runByJIT();
322 }
323
324 {
330 }
331 } catch (std::exception& e) {
332 printf(
"ERR:%s\n", e.what());
333 } catch (...) {
334 printf(
"unknown error\n");
335 }
336 return 0;
337}