aboutsummaryrefslogtreecommitdiff
path: root/gen_code.c
diff options
context:
space:
mode:
Diffstat (limited to 'gen_code.c')
-rw-r--r--gen_code.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gen_code.c b/gen_code.c
index 45dbf6c..312267c 100644
--- a/gen_code.c
+++ b/gen_code.c
@@ -123,9 +123,12 @@ int c;
break;
case MUL:
fprintf(stdout, "imulq\t");
+ if (c == 1)
+ goto case1;
+ goto case23;
break;
case DIV:
- fprintf(stdout, "idivq\t");
+ gen_load(t);
break;
default:
fprintf(stderr, "OPVAL: %d\n", t->attr.opval);
@@ -229,6 +232,8 @@ ptree *t;
gen_load(t->l);
fprintf(stdout, "negq\t%s\n", *reg_ptr);
break;
+ case DIV:
+ yyerror("DIV not imlemented\n");
default:
fprintf(stdout, "movq OTHER");
}