From 0edfae551d20cec15d5eceac601f3d1ec55e4301 Mon Sep 17 00:00:00 2001 From: fsan Date: Mon, 1 Nov 2021 19:18:05 -0300 Subject: [PATCH] fix CJUMP using wrong instruction --- translator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translator.cpp b/translator.cpp index 5b88a42..57d5e89 100644 --- a/translator.cpp +++ b/translator.cpp @@ -99,7 +99,7 @@ translator::translate_exp(struct token *exp, scope *scope){ case token::EXP_COMPARE: size += translate_exp(exp->rvalue, scope); size += translate_exp(exp->lvalue, scope); - std::cout << "AND R0, R1\n"; + std::cout << "CMP R0, R1\n"; size++; break; default: exit(-1);