Skip to content

Commit

Permalink
Revert "Mark unlikely code paths for vm_pc, vm_insn_count changes"
Browse files Browse the repository at this point in the history
This reverts commit b60d3507c1972e5d34442c5555bbd4c2bac9412d.

This turned out to be slightly counterproductive.
  • Loading branch information
onnokort committed Aug 28, 2023
1 parent 6013cb6 commit 8e9a607
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,13 +851,13 @@ void vm_step(vm_t *vm)

uint8_t* pcl = (uint8_t*)(&_zp_vm_pc);
*pcl+=4;
if (unlikely(!*pcl)) _zp_vm_pc+=256;
if (!*pcl) _zp_vm_pc+=256;

//_zp_vm_pc += 4;
//
uint8_t* icl = (uint8_t*)(&_zp_vm_insn_count);
(*icl)++;
if (unlikely(!*icl)) {
if(!*icl) {
_zp_vm_insn_count+=256;
if (!_zp_vm_insn_count)
_zp_vm_insn_count_hi++;
Expand Down

0 comments on commit 8e9a607

Please sign in to comment.