diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-10-09 01:00:09 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-10-09 01:00:09 -0400 |
commit | 4cdbd4062dfe9266a4d7facbad00ba691e194acd (patch) | |
tree | 79240b8af451c54009cb82ee6904ba3db3200070 | |
parent | eee5bfa0f14573eb56b5404c55e5ea25f09f53d8 (diff) |
Add gen_argument to push args in the correct order
-rw-r--r-- | gen_code.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -135,6 +135,21 @@ ptree *t; } +void gen_arguments(t) +ptree *t; +{ + if (t->type != LIST){ + GEN_EXPR(t) + fprintf(stdout, "pushq\t%s", *reg_ptr); + + fprintf(stdout, "\n##ARGUMENT BOUNDARY\n"); + return; + } + + gen_arguments(t->r); + gen_arguments(t->l); +} + void gen_statement(t) ptree *t; { |