------- Comment #7 from hjl at lucon dot org 2007-11-27 02:36 ------- (In reply to comment #6) > We have changed fastcall behavior from gcc 3.4 to 4.1. For > > --- > #define FASTCALL __attribute((fastcall)) > > double FASTCALL f_dii( double p1d, int p2i, int p3i ){ return p1d + > (double)p2 > i + (double)p3i; } > > int test_x; > int test_y; > double test_d1; > > void caller( void ){ > f_dii( test_d1, test_x, test_y ); > } > --- > > Gcc 3.4 doesn't pass the first 2 integral parameters in ecx/edx and gcc > 4.1 does. >
This patch http://gcc.gnu.org/ml/gcc-patches/2005-01/msg00541.html fixes this fast call bug by changing the abi. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34001