aboutsummaryrefslogtreecommitdiff
path: root/compiler.c
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2023-05-27 10:29:37 +1000
committerquou <quou@disroot.org>2023-05-27 10:29:37 +1000
commit2a1419ccca1e04f822b1d5b5f91a72fdef7e48c4 (patch)
tree18247600499ecb263203192f3ed197baee853461 /compiler.c
parent42020fb6c9c0aae18bec1241ad31c3ff854c3f03 (diff)
Fix a bug in the expression compiler.
Diffstat (limited to 'compiler.c')
-rw-r--r--compiler.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler.c b/compiler.c
index c1086d4..44b2230 100644
--- a/compiler.c
+++ b/compiler.c
@@ -248,8 +248,8 @@ void generate(Compiler* c) {
case op_mul:
b = pop(c);
a = pop(c);
- gen_val(c, a, 0);
- gen_val(c, b, 1);
+ gen_val(c, a, 1);
+ gen_val(c, b, 0);
printf(
"imul %%%s, %%%s\n",
regs[1],