Align stack frame to 16 byte boundaries

This commit is contained in:
Rui Ueyama 2020-09-13 16:25:34 +09:00
parent ee252e6ce7
commit 6a0ed71107
1 changed files with 8 additions and 1 deletions

View File

@ -283,7 +283,14 @@ static void gen_expr(Node *node) {
pop(argreg64[i]);
println(" mov $0, %%rax");
println(" call %s", node->funcname);
if (depth % 2 == 0) {
println(" call %s", node->funcname);
} else {
println(" sub $8, %%rsp");
println(" call %s", node->funcname);
println(" add $8, %%rsp");
}
return;
}
}