]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Allow parsing bcsave.lua (-b option) without FFI.
authorMike Pall <mike>
Tue, 12 Jun 2012 19:25:19 +0000 (21:25 +0200)
committerMike Pall <mike>
Tue, 12 Jun 2012 19:25:19 +0000 (21:25 +0200)
src/jit/bcsave.lua

index 70cb69253fad554aec4608bec5855d9b9d9769d4..bf69e00add7aa1d6de30c3cc90885a7edfb3ad3e 100644 (file)
@@ -212,7 +212,8 @@ typedef struct {
     f32 = bit.bswap
     function f16(x) return bit.rshift(bit.bswap(x), 16) end
     if is64 then
-      function fofs(x) return bit.bswap(x)*(2ll^32) end
+      local two32 = ffi.cast("int64_t", 2^32)
+      function fofs(x) return bit.bswap(x)*two32 end
     else
       fofs = f32
     end