Files
MSYS2-packages/gcc/4.8-libffi-cygwin64.patch
2013-11-10 23:40:26 +04:00

23 lines
1.0 KiB
Diff

--- origsrc/gcc-4.8-20130310/libffi/src/x86/ffi.c 2012-12-26 10:28:02.000000000 -0600
+++ src/gcc-4.8-20130310/libffi/src/x86/ffi.c 2013-03-15 12:36:44.543127800 -0500
@@ -28,7 +28,7 @@
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
-#if !defined(__x86_64__) || defined(_WIN64)
+#if !defined(__x86_64__) || defined(_WIN64) || defined(__CYGWIN__)
#ifdef _WIN64
#include <windows.h>
--- origsrc/gcc-4.8-20130310/libffi/src/x86/win64.S 2012-03-04 15:11:09.000000000 -0600
+++ src/gcc-4.8-20130310/libffi/src/x86/win64.S 2013-03-15 12:37:34.200968100 -0500
@@ -295,7 +295,7 @@ SYMBOL_NAME(ffi_closure_win64):
mov %rax, %rcx # context is first parameter
mov %rsp, %rdx # stack is second parameter
add $48, %rdx # point to start of arguments
- mov $SYMBOL_NAME(ffi_closure_win64_inner), %rax
+ lea SYMBOL_NAME(ffi_closure_win64_inner)(%rip), %rax
callq *%rax # call the real closure function
add $40, %rsp
movq %rax, %xmm0 # If the closure returned a float,