From ce5b2e60b96c22f0418d542cfdf9cc764170a1a4 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Mon, 22 May 2023 17:00:36 +0200 Subject: [PATCH] amends template to fix branching instructions --- gen_input/templates/tcc/vm-vm_CORENAME.cpp.gtl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gen_input/templates/tcc/vm-vm_CORENAME.cpp.gtl b/gen_input/templates/tcc/vm-vm_CORENAME.cpp.gtl index b37586c..bd0d7fa 100644 --- a/gen_input/templates/tcc/vm-vm_CORENAME.cpp.gtl +++ b/gen_input/templates/tcc/vm-vm_CORENAME.cpp.gtl @@ -208,8 +208,10 @@ private: } auto cur_pc_val = tu.constant(pc.val, traits::reg_bit_widths[traits::PC]); pc=pc+4; + gen_set_pc(tu, pc, traits::NEXT_PC); tu.open_scope();<%instr.behavior.eachLine{%> ${it}<%}%> + tu.close_scope(); vm_base::gen_sync(tu, POST_SYNC,${idx}); gen_trap_check(tu); return returnValue;