From d9b6cb97a8a9e93f1bbe5351874b03f7faa81783 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Wed, 20 Oct 2010 19:07:28 +0200 Subject: Fix linux-x86_64 build. Fix various 64-bitness issues in the source code to make the --try-64 option work again on Linux. Note that the generated binary is not faster than its 32-bit variant when it comes to benchmarking the boot sequence. Change-Id: Iad248e033757d4cd25524a438a5dbe1cf3aca6cf --- exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'exec.c') diff --git a/exec.c b/exec.c index 2ad8a4f..8786791 100644 --- a/exec.c +++ b/exec.c @@ -1984,7 +1984,7 @@ int tlb_set_page_exec(CPUState *env, target_ulong vaddr, unsigned int index; target_ulong address; target_ulong code_address; - target_phys_addr_t addend; + ptrdiff_t addend; int ret; CPUTLBEntry *te; CPUWatchpoint *wp; @@ -2007,7 +2007,7 @@ int tlb_set_page_exec(CPUState *env, target_ulong vaddr, /* IO memory case (romd handled later) */ address |= TLB_MMIO; } - addend = (unsigned long)qemu_get_ram_ptr(pd & TARGET_PAGE_MASK); + addend = (ptrdiff_t)qemu_get_ram_ptr(pd & TARGET_PAGE_MASK); if ((pd & ~TARGET_PAGE_MASK) <= IO_MEM_ROM) { /* Normal RAM. */ iotlb = pd & TARGET_PAGE_MASK; -- cgit v1.1