mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
target/i386: Fill in TCGCPUOps.pointer_wrap
Check 32 vs 64-bit state. Cc: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
@@ -149,6 +149,12 @@ static void x86_cpu_exec_reset(CPUState *cs)
|
||||
do_cpu_init(env_archcpu(env));
|
||||
cs->exception_index = EXCP_HALTED;
|
||||
}
|
||||
|
||||
static vaddr x86_pointer_wrap(CPUState *cs, int mmu_idx,
|
||||
vaddr result, vaddr base)
|
||||
{
|
||||
return cpu_env(cs)->hflags & HF_CS64_MASK ? result : (uint32_t)result;
|
||||
}
|
||||
#endif
|
||||
|
||||
const TCGCPUOps x86_tcg_ops = {
|
||||
@@ -172,6 +178,7 @@ const TCGCPUOps x86_tcg_ops = {
|
||||
.record_sigbus = x86_cpu_record_sigbus,
|
||||
#else
|
||||
.tlb_fill = x86_cpu_tlb_fill,
|
||||
.pointer_wrap = x86_pointer_wrap,
|
||||
.do_interrupt = x86_cpu_do_interrupt,
|
||||
.cpu_exec_halt = x86_cpu_exec_halt,
|
||||
.cpu_exec_interrupt = x86_cpu_exec_interrupt,
|
||||
|
||||
Reference in New Issue
Block a user