stops jit block creation in case of ECALL and EBREAK

This commit is contained in:
2023-09-23 11:30:58 +02:00
parent 70839bbbf2
commit 417076f8e6
3 changed files with 117 additions and 119 deletions

View File

@ -172,8 +172,8 @@ private:
<%instr.behavior.eachLine{%>${it}
<%}%>
tu.close_scope();
gen_trap_check(tu);
vm_base<ARCH>::gen_sync(tu, POST_SYNC,${idx});
gen_trap_check(tu);
return returnValue;
}
<%}%>
@ -305,9 +305,8 @@ template <typename ARCH> void vm_impl<ARCH>::gen_wait(tu_builder& tu, unsigned t
}
template <typename ARCH> void vm_impl<ARCH>::gen_trap_behavior(tu_builder& tu) {
tu("trap_entry_plugin:");
this->gen_sync(tu, POST_SYNC, -1);
tu("trap_entry:");
this->gen_sync(tu, POST_SYNC, -1);
tu("enter_trap(core_ptr, *trap_state, *pc, 0);");
tu.store(traits::LAST_BRANCH, tu.constant(std::numeric_limits<uint32_t>::max(),32));
tu("return *next_pc;");