cdecl functions, this generates better code.
Remove a small error that caused indirect non fastcall function to always be
handled as variadic, which meant a useless load of the Y register was added.
git-svn-id: svn://svn.cc65.org/cc65/trunk@1292
b7a2c559-68d2-44c3-8de9-
860c34a00d81
IsFuncPtr = IsTypeFuncPtr (lval->Type);
if (IsFuncPtr) {
- /* Check wether it's a fastcall function */
- IsFastCall = IsFastCallFunc (lval->Type + 1);
+ /* Check wether it's a fastcall function that has parameters */
+ IsFastCall = IsFastCallFunc (lval->Type + 1) && (Func->ParamCount > 0);
/* Things may be difficult, depending on where the function pointer
* resides. If the function pointer is an expression of some sort
}
/* Call the function */
- g_callind (TypeOf (lval->Type), ParamSize, PtrOffs);
+ g_callind (TypeOf (lval->Type+1), ParamSize, PtrOffs);
} else {