mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 04:30:10 +00:00
Indirect fastcall functions with no parameters may be called as if it were
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
This commit is contained in:
parent
33c1e82bda
commit
21afe25e90
@ -726,8 +726,8 @@ static void FunctionCall (int k, ExprDesc* lval)
|
|||||||
IsFuncPtr = IsTypeFuncPtr (lval->Type);
|
IsFuncPtr = IsTypeFuncPtr (lval->Type);
|
||||||
if (IsFuncPtr) {
|
if (IsFuncPtr) {
|
||||||
|
|
||||||
/* Check wether it's a fastcall function */
|
/* Check wether it's a fastcall function that has parameters */
|
||||||
IsFastCall = IsFastCallFunc (lval->Type + 1);
|
IsFastCall = IsFastCallFunc (lval->Type + 1) && (Func->ParamCount > 0);
|
||||||
|
|
||||||
/* Things may be difficult, depending on where the function pointer
|
/* Things may be difficult, depending on where the function pointer
|
||||||
* resides. If the function pointer is an expression of some sort
|
* resides. If the function pointer is an expression of some sort
|
||||||
@ -797,7 +797,7 @@ static void FunctionCall (int k, ExprDesc* lval)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Call the function */
|
/* Call the function */
|
||||||
g_callind (TypeOf (lval->Type), ParamSize, PtrOffs);
|
g_callind (TypeOf (lval->Type+1), ParamSize, PtrOffs);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user