aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-10-09 07:44:45 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-10-09 07:44:45 -0400
commit1280836201150aa0097d7338459f6b142a962f82 (patch)
tree7eacacccd09b9a0247b6ab9ef421df7aafec7803
parent9d200e59102c26233d40f99d0d5f5ddb8cc99572 (diff)
Remove erroneous print_tree and gen_label in gen_statement
-rw-r--r--gen_code.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gen_code.c b/gen_code.c
index 02c75aa..4be1a08 100644
--- a/gen_code.c
+++ b/gen_code.c
@@ -222,10 +222,8 @@ ptree *t;
switch (t->type){
case ASSIGNOP:
if (t->l->ret_type == INT) {
- gen_label(t->r);
- print_tree(t);
GEN_EXPR(t->r);
- fprintf(stdout, "movq %s, %d(%%rbp)\n", *reg_ptr,
+ fprintf(stdout, "movq\t%s, %d(%%rbp)\n", *reg_ptr,
- t->l->attr.nval->offset * OFFSET_SIZE);
} else {
yyerror(FLOAT_ERROR);