This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fwd: [patch libffi]: Add support for fastcall/thiscall to x86 variant of libffi for PR 51500


This one really needs to be discussed here.

Andrew.
--- Begin Message ---
Hello,

this patch adds required support for thiscall/fastcall
calling-convention of x86 Windows.  It is a prerequisit for fixing PR
libgcj/51500 for 32-bit Windows.  The default-calling-convention for
C++ none-static and none-variadic class-members is changed by 4.7 to
thiscall as described by vendors ABI defintion.

2012-01-25  Kai Tietz  <ktietz@redhat.com>

        * src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
        argument to prototype for specify calling-convention.
        (ffi_call): Add support for stdcall/thiscall convention.
        (ffi_raw_call): Likewise.
        * src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
        FFI_FASTCALL.
        * src/x86/win32.S (_ffi_call_win32): Add support for
        fastcall/thiscall calling-convention calls.

Tested for i686-w64-mingw32 and i686-pc-cygwin.  Ok for apply?

Regards,
Kai

Attachment: pr51500_libffi.txt
Description: Text document


--- End Message ---

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]