This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Fastcall support added to MinGW
- To: cygwin-apps <cygwin-apps at cygwin dot com>, Mingw <mingw-users at lists dot sourceforge dot net>
- Subject: Fastcall support added to MinGW
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- Date: Tue, 13 Nov 2001 14:44:27 +1100 (EST)
I have upload beta releases of gcc-2.95.3 and binutils-2.11.92
to MinGW's Sourceforge File Release page:
https://sourceforge.net/project/showfiles.php?group_id=2435
These are labelled:
gcc-2.95.3-20011106-beta and binutils-2.11.92-20011113-beta
The main feature provided by these beta releases is the ability to use
fastcall functions with MinGW.
Thanks go to Eric Kohl for this feature.
On the Intel 386, the `fastcall' attribute causes the compiler to pass the
fist two arguments in the registers
ECX and EDX. Subsequent arguments are passed on the stack.
The called function will pop the arguments off the stack.
If the number of arguments is variable all arguments are
pushed on the stack.
To use fastcall mark your functions like so:
int __fastcall foo(int a, int b);
This will produce symbol @foo$8 (and _imp_@foo@8
if marked as dllimport).
The --add-stdcall-alias and the --kill-at
features of dlltool and ld remove all decoration from
fastcall symbols, ie, they add the alias
foo = @foo@n
However, the --enable-stdcall-fixup feature (which is on by
default) has not yet been extended to fastcall symbols.
That is, an undefined symbol @foo@n will *not*
automatically be resolved to a defined symbol foo.
Th gcc snapshot also fixes a bug in profiling and changes
gcc's handling of win32-thread support.
The latter will not add any new functionality until mingw-runtime
has been updated.
The binutils beta also fixes two long-standing bugs in windres
affecting FONT attributes and child dialog boxes
Thanks again to Eric
Danny
http://briefcase.yahoo.com.au - Yahoo! Briefcase
- Manage your files online.