Skip to content

Commit

Permalink
Some cosmetic updates to gen_link_direct
Browse files Browse the repository at this point in the history
  • Loading branch information
ergo720 committed Nov 27, 2024
1 parent 9bbb621 commit b76dbfd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib86cpu/core/emitter/x64/jit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,13 +885,10 @@ void lc86_jit::gen_link_direct(addr_t dst_pc, addr_t *next_pc, T target_pc)

// vec_addr: instr_pc, dst_pc, next_pc
addr_t page_addr = m_cpu->virt_pc & ~PAGE_MASK;
uint32_t n, dst = (dst_pc & ~PAGE_MASK) == page_addr;
uint32_t dst = (dst_pc & ~PAGE_MASK) == page_addr, n = dst;
if (next_pc) {
n = dst + ((*next_pc & ~PAGE_MASK) == page_addr);
}
else {
n = dst;
}
m_cpu->tc->flags |= (n & TC_FLG_NUM_JMP);

switch (n)
Expand Down Expand Up @@ -920,6 +917,7 @@ void lc86_jit::gen_link_direct(addr_t dst_pc, addr_t *next_pc, T target_pc)
}
}
else {
assert(target_pc == EBX);
Label ret = m_a.newLabel();
CMP(target_pc, dst_pc);
BR_NE(ret);
Expand Down Expand Up @@ -952,6 +950,7 @@ void lc86_jit::gen_link_direct(addr_t dst_pc, addr_t *next_pc, T target_pc)
}
}
else {
assert(target_pc == EBX);
Label ret = m_a.newLabel();
CMP(target_pc, *next_pc);
BR_NE(ret);
Expand Down Expand Up @@ -995,6 +994,7 @@ void lc86_jit::gen_link_direct(addr_t dst_pc, addr_t *next_pc, T target_pc)
}
}
else {
assert(target_pc == EBX);
Label ret = m_a.newLabel();
CMP(target_pc, *next_pc);
BR_NE(ret);
Expand Down

0 comments on commit b76dbfd

Please sign in to comment.