packages feed

x86-64bit 0.4.1 → 0.4.2

raw patch · 3 files changed

+9/−5 lines, 3 files

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+# Version 0.4.2
+
+-   fix OSX compilation
+
 # Version 0.4.1
 
 -   fix a bug which caused segmentation fault if a compiled function was called multiple times
CodeGen/X86/CallConv.hs view
@@ -20,7 +20,7 @@ callFun :: Operand RW S64 -> FunPtr a -> Code callFun r p = do     sub rsp 32-    mov r (imm $ ptrToIntPtr $ castFunPtrToPtr p)+    mov r (fromIntegral $ ptrToIntPtr $ castFunPtrToPtr p)     call r     add rsp 32 @@ -31,10 +31,10 @@ callFun r p = do     push r15              -- we will use r15 (non-volatile) to store old rsp     mov r15 15            -- 0xf-    not r15               -- 0xffff ... fff0-    and r15 rsp           -- align rsp into r15+    not_ r15              -- 0xffff ... fff0+    and_ r15 rsp          -- align rsp into r15     xchg r15 rsp          -- new rsp = aligned, r15 = old rsp-    mov r (imm $ ptrToIntPtr $ castFunPtrToPtr p)+    mov r (fromIntegral $ ptrToIntPtr $ castFunPtrToPtr p)     call r     mov rsp r15           -- restore rsp     pop r15               -- restore r15
x86-64bit.cabal view
@@ -1,5 +1,5 @@ name:                x86-64bit
-version:             0.4.1
+version:             0.4.2
 homepage:            https://github.com/divipp/x86-64
 synopsis:            Runtime code generation for x86 64 bit machine code
 description:         The primary goal of x86-64bit is to provide a lightweight assembler for machine generated 64 bit x86 assembly instructions. See README.md for further details.