diff --git a/src/cc65/function.c b/src/cc65/function.c index 09ed488e7..e4dbe83d8 100644 --- a/src/cc65/function.c +++ b/src/cc65/function.c @@ -395,6 +395,9 @@ void NewFunc (SymEntry* Func) g_stackcheck (); } + /* Setup the stack */ + oursp = 0; + /* Walk through the parameter list and allocate register variable space * for parameters declared as register. Generate code to swap the contents * of the register bank with the save area on the stack. @@ -426,9 +429,6 @@ void NewFunc (SymEntry* Func) Param = Param->NextSym; } - /* Setup the stack */ - oursp = 0; - /* Need a starting curly brace */ ConsumeLCurly ();