Commit dea49e2020b2fc97ba9293200f316f7a7b3ca73b

Richard Henderson 2014-11-14T13:05:14

x86: Fix typo in ffi_prep_go_closure Used the wrong register for THISCALL and FASTCALL.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/x86/ffi.c b/src/x86/ffi.c
index 359a864..4c96c6d 100644
--- a/src/x86/ffi.c
+++ b/src/x86/ffi.c
@@ -527,7 +527,7 @@ ffi_prep_go_closure (ffi_go_closure* closure, ffi_cif* cif,
       break;
     case FFI_THISCALL:
     case FFI_FASTCALL:
-      dest = ffi_go_closure_ECX;
+      dest = ffi_go_closure_EAX;
       break;
     case FFI_STDCALL:
     case FFI_PASCAL: