diff --git a/gen_input/templates/llvm/CORENAME.cpp.gtl b/gen_input/templates/llvm/CORENAME.cpp.gtl index 0c7f3e0..c48ffe0 100644 --- a/gen_input/templates/llvm/CORENAME.cpp.gtl +++ b/gen_input/templates/llvm/CORENAME.cpp.gtl @@ -214,7 +214,9 @@ private: this->set_tval(instr); this->gen_raise_trap(0, 2); // illegal instruction trap this->gen_sync(iss::POST_SYNC, instr_descr.size()); - this->gen_instr_epilogue(this->leave_blk); + bb = this->leave_blk; + this->gen_instr_epilogue(bb); + this->builder.CreateBr(bb); return std::make_tuple(BRANCH, nullptr); } //decoding functionality diff --git a/src/vm/llvm/vm_tgc5c.cpp b/src/vm/llvm/vm_tgc5c.cpp index 0572697..7fda2bb 100644 --- a/src/vm/llvm/vm_tgc5c.cpp +++ b/src/vm/llvm/vm_tgc5c.cpp @@ -4863,7 +4863,9 @@ private: this->set_tval(instr); this->gen_raise_trap(0, 2); // illegal instruction trap this->gen_sync(iss::POST_SYNC, instr_descr.size()); - this->gen_instr_epilogue(this->leave_blk); + bb = this->leave_blk; + this->gen_instr_epilogue(bb); + this->builder.CreateBr(bb); return std::make_tuple(BRANCH, nullptr); } //decoding functionality