x86: Fix typo in ffi_prep_go_closure
authorRichard Henderson <rth@twiddle.net>
Fri, 14 Nov 2014 12:05:14 +0000 (13:05 +0100)
committerRichard Henderson <rth@twiddle.net>
Fri, 14 Nov 2014 12:07:47 +0000 (13:07 +0100)
Used the wrong register for THISCALL and FASTCALL.

src/x86/ffi.c

index 359a864..4c96c6d 100644 (file)
@@ -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: