From a8ce132733b614a2ca2cd156319530f072216894 Mon Sep 17 00:00:00 2001 From: Marcel Keller Date: Tue, 17 Dec 2024 15:31:36 +1100 Subject: [PATCH] Fix bug in register allocation. --- Processor/Instruction.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Processor/Instruction.hpp b/Processor/Instruction.hpp index e01a20b7..96d42cb3 100644 --- a/Processor/Instruction.hpp +++ b/Processor/Instruction.hpp @@ -750,7 +750,7 @@ unsigned BaseInstruction::get_max_reg(int reg_type) const { assert(it < start.end()); int n = *it; - res = max(res, *it++); + res = max(res, *++it + size); it += n - 1; } return res;