Skip to content

Commit

Permalink
bintr: Remove reentry after sequential jumps
Browse files Browse the repository at this point in the history
  • Loading branch information
fwsGonzo committed Jul 14, 2024
1 parent 8e42eef commit 7d359ff
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lib/libriscv/tr_emit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,16 +746,6 @@ void Emitter<W>::emit()
// XXX: mask off unaligned jumps - is this OK?
const auto dest_pc = (this->pc() + instr.Jtype.jump_offset()) & ~address_t(ALIGN_MASK);
bool add_reentry = instr.Jtype.rd != 0;
// Also add a re-entry point if the next instruction is also a jump
if (!add_reentry) {
// Catch jumptable entries
if (i + 1 < int(tinfo.instr.size())) {
const auto& next_instr = tinfo.instr[i + 1];
if (next_instr.opcode() == RV32I_JAL && next_instr.Jtype.rd == 0) {
add_reentry = true;
}
}
}
bool already_exited = false;
// forward label: jump inside code block
if (dest_pc >= this->begin_pc() && dest_pc < this->end_pc()) {
Expand Down

0 comments on commit 7d359ff

Please sign in to comment.