[m-dev.] __fastcall convention

Peter Ross petdr at cs.mu.OZ.AU
Wed Jul 12 18:46:00 AEST 2000


On Sun, Aug 06, 2000 at 05:37:16PM +1000, Fergus Henderson wrote:
> On 04-Jul-2000, Peter Ross <petdr at cs.mu.OZ.AU> wrote:
> > For use with the MLDS, we should look at the performance increase for
> > the following:
> > 
> > #ifdef _MSC_VER
> >   #define CALLING_CONVENTION __fastcall
> > #else
> >   #define CALLING_CONVENTION
> > #endif
> > 
> > void CALLING_CONVENTION some_mercury_function()
> > {
> > }
> > 
> > Anything whose name is exported using pragma export should probably be
> > 
> > void exported_function_name()
> > {
> >     some_mercury_function();
> > }
> > 
> > with the standard calling convention.
> 
> Is there a compiler option to make __fastcall the default calling convention?
> If so, could we use that option?
> 
Yes there is.  What worries me is what happens with pragma exported C
functions, they probably should use the standard calling convention,
particularly if they are in libraries.

Hopefully soon I will be able to do some experiments.

Pete
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list