replaces gen_wait, updates template to include fp_functions when necessary

This commit is contained in:
2024-08-08 12:57:08 +02:00
parent 235a7e6e24
commit fbca690b3b
2 changed files with 37 additions and 12 deletions

View File

@ -98,8 +98,6 @@ protected:
void gen_leave_trap(tu_builder& tu, unsigned lvl);
void gen_wait(tu_builder& tu, unsigned type);
inline void gen_set_tval(tu_builder& tu, uint64_t new_tval);
inline void gen_set_tval(tu_builder& tu, value new_tval);
@ -1941,7 +1939,7 @@ private:
gen_set_pc(tu, pc, traits::NEXT_PC);
tu.open_scope();
this->gen_set_tval(tu, instr);
this->gen_wait(tu, 1);
tu.callf("wait", tu.constant(1,8));
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
@ -3648,9 +3646,6 @@ template <typename ARCH> void vm_impl<ARCH>::gen_leave_trap(tu_builder& tu, unsi
tu.store(traits::LAST_BRANCH, tu.constant(static_cast<int>(UNKNOWN_JUMP), 32));
}
template <typename ARCH> void vm_impl<ARCH>::gen_wait(tu_builder& tu, unsigned type) {
}
template <typename ARCH> void vm_impl<ARCH>::gen_set_tval(tu_builder& tu, uint64_t new_tval) {
tu(fmt::format("tval = {};", new_tval));
}
@ -3666,6 +3661,7 @@ template <typename ARCH> void vm_impl<ARCH>::gen_trap_behavior(tu_builder& tu) {
tu("return *next_pc;");
}
} // namespace tgc5c
template <>