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 --- cpu-defs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cpu-defs.h') diff --git a/cpu-defs.h b/cpu-defs.h index 8d4bf86..f9294c3 100644 --- a/cpu-defs.h +++ b/cpu-defs.h @@ -94,12 +94,12 @@ typedef struct CPUTLBEntry { target_ulong addr_code; /* Addend to virtual address to get host address. IO accesses use the corresponding iotlb value. */ - unsigned long addend; + size_t addend; /* padding to get a power of two size */ - uint8_t dummy[(1 << CPU_TLB_ENTRY_BITS) - - (sizeof(target_ulong) * 3 + - ((-sizeof(target_ulong) * 3) & (sizeof(unsigned long) - 1)) + - sizeof(unsigned long))]; + uint8_t dummy[(1 << CPU_TLB_ENTRY_BITS) - + (sizeof(target_ulong) * 3 + + ((-sizeof(target_ulong) * 3) & (sizeof(size_t) - 1)) + + sizeof(size_t))]; } CPUTLBEntry; extern int CPUTLBEntry_wrong_size[sizeof(CPUTLBEntry) == (1 << CPU_TLB_ENTRY_BITS) ? 1 : -1]; -- cgit v1.1