diff options
author | David Walter Seikel | 2012-01-23 23:36:30 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:36:30 +1000 |
commit | 6523585c66c04cea54df50013df8886b589847d8 (patch) | |
tree | 0b22aee7064166d88595eda260ca2d17c0773da5 /libraries/LuaJIT-1.1.7/src/ljit_dasm.c | |
parent | Update the EFL to what I'm actually using, coz I'm using some stuff not yet r... (diff) | |
download | SledjHamr-6523585c66c04cea54df50013df8886b589847d8.zip SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.gz SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.bz2 SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.xz |
Add luaproc and LuaJIT libraries.
Two versions of LuaJIT, the stable release, and the dev version. Try the dev version first, until ih fails badly.
Diffstat (limited to '')
-rw-r--r-- | libraries/LuaJIT-1.1.7/src/ljit_dasm.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/libraries/LuaJIT-1.1.7/src/ljit_dasm.c b/libraries/LuaJIT-1.1.7/src/ljit_dasm.c new file mode 100644 index 0000000..c2d44ee --- /dev/null +++ b/libraries/LuaJIT-1.1.7/src/ljit_dasm.c | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | ** Wrapper for architecture-specific DynASM encoder. | ||
3 | ** Copyright (C) 2005-2011 Mike Pall. See Copyright Notice in luajit.h | ||
4 | */ | ||
5 | |||
6 | #define ljit_dasm_c | ||
7 | #define LUA_CORE | ||
8 | |||
9 | |||
10 | #include "lua.h" | ||
11 | |||
12 | #include "ljit.h" | ||
13 | #include "ljit_dasm.h" | ||
14 | #include "lmem.h" | ||
15 | |||
16 | |||
17 | /* Glue macros for DynASM memory allocation. */ | ||
18 | #define DASM_M_GROW(J, t, p, sz, need) \ | ||
19 | do { \ | ||
20 | size_t _sz = (sz), _need = (need); \ | ||
21 | if (_sz < _need) { \ | ||
22 | if (_sz < 16) _sz = 16; \ | ||
23 | while (_sz < _need) _sz += _sz; \ | ||
24 | (p) = (t *)luaM_realloc_(J->L, (p), (sz), _sz); \ | ||
25 | (sz) = _sz; \ | ||
26 | } \ | ||
27 | } while(0) | ||
28 | |||
29 | #define DASM_M_FREE(J, p, sz) luaM_freemem(J->L, p, sz) | ||
30 | |||
31 | /* Embed architecture-specific DynASM encoder. */ | ||
32 | #if defined(__i386) || defined(__i386__) || defined(_M_IX86) | ||
33 | #include "dasm_x86.h" | ||
34 | #else | ||
35 | #error "No support for this architecture (yet)" | ||
36 | #endif | ||
37 | |||
38 | |||