From 6523585c66c04cea54df50013df8886b589847d8 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 23 Jan 2012 23:36:30 +1000 Subject: 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. --- libraries/LuaJIT-1.1.7/src/ljit_dasm.c | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 libraries/LuaJIT-1.1.7/src/ljit_dasm.c (limited to 'libraries/LuaJIT-1.1.7/src/ljit_dasm.c') 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 @@ +/* +** Wrapper for architecture-specific DynASM encoder. +** Copyright (C) 2005-2011 Mike Pall. See Copyright Notice in luajit.h +*/ + +#define ljit_dasm_c +#define LUA_CORE + + +#include "lua.h" + +#include "ljit.h" +#include "ljit_dasm.h" +#include "lmem.h" + + +/* Glue macros for DynASM memory allocation. */ +#define DASM_M_GROW(J, t, p, sz, need) \ + do { \ + size_t _sz = (sz), _need = (need); \ + if (_sz < _need) { \ + if (_sz < 16) _sz = 16; \ + while (_sz < _need) _sz += _sz; \ + (p) = (t *)luaM_realloc_(J->L, (p), (sz), _sz); \ + (sz) = _sz; \ + } \ + } while(0) + +#define DASM_M_FREE(J, p, sz) luaM_freemem(J->L, p, sz) + +/* Embed architecture-specific DynASM encoder. */ +#if defined(__i386) || defined(__i386__) || defined(_M_IX86) +#include "dasm_x86.h" +#else +#error "No support for this architecture (yet)" +#endif + + -- cgit v1.1