mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
tcg: Add tlb_fast_offset to TCGContext
Disconnect the layout of ArchCPU from TCG compilation. Pass the relative offset of 'env' and 'neg.tlb.f' as a parameter. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
238f43809a
commit
d0a9bb5ecb
14 changed files with 110 additions and 66 deletions
|
@ -355,6 +355,8 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
|
|||
tcg_ctx->page_bits = TARGET_PAGE_BITS;
|
||||
tcg_ctx->page_mask = TARGET_PAGE_MASK;
|
||||
tcg_ctx->tlb_dyn_max_bits = CPU_TLB_DYN_MAX_BITS;
|
||||
tcg_ctx->tlb_fast_offset =
|
||||
(int)offsetof(ArchCPU, neg.tlb.f) - (int)offsetof(ArchCPU, env);
|
||||
#endif
|
||||
|
||||
tb_overflow:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue