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]

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


Hi,

I added some testcases and reworked patch about thiscall/fastcall.
Initial patched worked fine for thiscall-convention, but had
wrong-behavior in some cases for fastcall-convention.

ChangeLog

2012-01-28  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_prep_args): Likewise.
	(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.
	* testsuite/libffi.call/fastthis1_win32.c: New test.
	* testsuite/libffi.call/fastthis2_win32.c: New test.
	* testsuite/libffi.call/fastthis3_win32.c: New test.
	* testsuite/libffi.call/strlen2_win32.c: New test.
	* testsuite/libffi.call/many2_win32.c: New test.
	* testsuite/libffi.call/struct1_win32.c: New test.
	* testsuite/libffi.call/struct2_win32.c: New test.

Regression tested for i686-pc-cygwin, and i686-w64-mingw32.  Ok for apply?

Regards,
Kai

Attachment: pr51500_libffi.txt
Description: Text document


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