From be6f5791fade9906a90a5b1ff84468ddbc35ff47 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Tue, 26 Nov 2024 20:26:18 +0100 Subject: [PATCH] adds update to cyclecount after each instr for asmjit --- gen_input/templates/asmjit/CORENAME.cpp.gtl | 1 + src/vm/asmjit/vm_tgc5c.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/gen_input/templates/asmjit/CORENAME.cpp.gtl b/gen_input/templates/asmjit/CORENAME.cpp.gtl index 3dfb180..8571d58 100644 --- a/gen_input/templates/asmjit/CORENAME.cpp.gtl +++ b/gen_input/templates/asmjit/CORENAME.cpp.gtl @@ -263,6 +263,7 @@ void vm_impl::gen_instr_epilogue(jit_holder& jh) { cmp(cc, current_trap_state, 0); cc.jne(jh.trap_entry); cc.inc(get_ptr_for(jh, traits::ICOUNT)); + cc.inc(get_ptr_for(jh, traits::CYCLE)); } template void vm_impl::gen_block_prologue(jit_holder& jh){ diff --git a/src/vm/asmjit/vm_tgc5c.cpp b/src/vm/asmjit/vm_tgc5c.cpp index 791941f..95a5d5a 100644 --- a/src/vm/asmjit/vm_tgc5c.cpp +++ b/src/vm/asmjit/vm_tgc5c.cpp @@ -4822,6 +4822,7 @@ void vm_impl::gen_instr_epilogue(jit_holder& jh) { cmp(cc, current_trap_state, 0); cc.jne(jh.trap_entry); cc.inc(get_ptr_for(jh, traits::ICOUNT)); + cc.inc(get_ptr_for(jh, traits::CYCLE)); } template void vm_impl::gen_block_prologue(jit_holder& jh){