This is the mail archive of the mailing list for the Cygwin project.

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

Fastcall support added to MinGW

I have upload beta releases of gcc-2.95.3 and binutils-2.11.92
to MinGW's  Sourceforge File Release page:

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 - Yahoo! Briefcase
- Manage your files online.

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