Skip to content

Commit

Permalink
Merge pull request sysprog21#462 from ChinYikMing/branch-history-tbl-…
Browse files Browse the repository at this point in the history
…init

Initialize ir->branch_table->PC with safe value
  • Loading branch information
jserv authored Jun 18, 2024
2 parents ef151e2 + b65d24c commit 892bc37
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,8 @@ static void block_translate(riscv_t *rv, block_t *block)
) {
ir->branch_table = calloc(1, sizeof(branch_history_table_t));
assert(ir->branch_table);
memset(ir->branch_table->PC, -1,
sizeof(uint32_t) * HISTORY_SIZE);
}
break;
}
Expand Down

0 comments on commit 892bc37

Please sign in to comment.