Todd Lindberg

Coldfire: fastcall or equivalent declspec to pass parms by register

Discussion created by Todd Lindberg on Sep 12, 2006
Latest reply on Sep 12, 2006 by Todd Lindberg
I'm using the CodeWarrior for Coldfire (6.3 build 14) for my C code and would like to know if there's a fastcall keyword available or some other equivalent __declspec parameter that I can use to indicate certain functions should pass their parameters by register rather than pushing them on the stack.
 
I know there's a global optimization flag to enable passing by register, but I don't want to use that. I only want to optimize certain functions this way by specifying them explicitly in the function declaration.
 
I noticed that __fastcall seems to be a keyword, as its color is blue in the IDE.  However, when I specify __fastcall in a function declaration, I get a syntax error at compile time.
 
Example:
 
   long __fastcall Plx_lSwapBytes(long Value);
 
Is there a list of valid __declspec parameters somewhere?  I searched the documentation and could not find anything specifying what __declspec's are available.
 
Thanks,
-Todd

Message Edited by CrasyCat on 2007-04-13 02:20 PM

Outcomes