Commit d4e41aab by Andrew Dahl

ref #14 - Fixed error involving a function calling a function and the ESI frame pointer

parent eb08bae5
Showing with 4 additions and 3 deletions
......@@ -424,8 +424,8 @@ string InstructionList::toString()
oss << "PUSH ESI\n"
<< "MOV ESI, ESP\n"
<< "CALL "<< temp->getArg1().sym->getLexeme() << "\n"
<< "ADD ESP, " << temp->getArg1().sym->getArgumentsValue(true) << endl
<< "POP ESI\n";
<< "POP ESI\n"
<< "ADD ESP, " << temp->getArg1().sym->getArgumentsValue(true) << endl;
this->stackPop(temp->getArg1().sym->getArguments(true));
if(temp->getArg1().sym->getReturnType() == Symbol::FLOAT)
{
......
......@@ -10,7 +10,8 @@ output f
return a+b+c+d+e+f }
function int func2(int a){
output a
output func(0,1,2,3.4)
return a
}
output func(0,1,1,1.2)
output func2(0)
output func(1, 2, 3, 4.5)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment