aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler.c b/compiler.c
index 44b2230..e025992 100644
--- a/compiler.c
+++ b/compiler.c
@@ -204,12 +204,9 @@ void gen_val(Compiler* c, Stack_Value v, unsigned char r) {
c->numbers[v.idx],
regs[r]
);
- } else if (v.reg != r) {
- /*printf(
- "mov %%rax, %%%s\n",
- regs[r]
- );*/
}
+ /* The result of the last sub-expression is already
+ * in the rax register, no need to do anything. */
}
void generate(Compiler* c) {