Skip to content

Commit

Permalink
Reworked tc linking mechanism. Also allow linking across pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ergo720 committed Dec 1, 2024
1 parent b76dbfd commit cc16e24
Show file tree
Hide file tree
Showing 12 changed files with 299 additions and 550 deletions.
5 changes: 2 additions & 3 deletions lib86cpu/core/emitter/emitter_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define CPU_CTX_HFLG offsetof(cpu_ctx_t, hflags)
#define CPU_CTX_EXP offsetof(cpu_ctx_t, exp_info)
#define CPU_CTX_INT offsetof(cpu_ctx_t, int_pending)
#define CPU_CTX_JMP_TABLE offsetof(cpu_ctx_t, jmp_table)

#define CPU_CTX_EAX offsetof(cpu_ctx_t, regs.eax)
#define CPU_CTX_ECX offsetof(cpu_ctx_t, regs.ecx)
Expand Down Expand Up @@ -126,7 +127,6 @@
#define REG_pair(reg) get_reg_pair(reg)


JIT_API entry_t link_indirect_handler(cpu_ctx_t *cpu_ctx, translated_code_t *tc);
size_t get_reg_offset(ZydisRegister reg);
size_t get_seg_prfx_offset(decoded_instr *instr);
int get_reg_idx(ZydisRegister reg);
Expand All @@ -152,7 +152,6 @@ inline constexpr auto all_callable_funcs = std::make_tuple(
cpu_raise_exception<3, false>,
cpu_timer_helper,
cpu_do_int,
link_indirect_handler,
mem_read_helper<uint128_t>,
mem_read_helper<uint80_t>,
mem_read_helper<uint64_t>,
Expand Down Expand Up @@ -207,7 +206,7 @@ inline constexpr auto all_callable_funcs = std::make_tuple(
fpu_update_tag<false>,
cpu_runtime_abort,
dbg_update_exp_hook,
tlb_invalidate_,
invlpg_helper,
fpu_is_tag_empty,
fpu_stack_overflow,
fpu_stack_underflow,
Expand Down
Loading

0 comments on commit cc16e24

Please sign in to comment.