diff options
author | Stefan Weil <sw@weilnetz.de> | 2012-04-12 20:29:36 +0200 |
---|---|---|
committer | Stefan Weil <sw@weilnetz.de> | 2012-04-15 21:25:16 +0200 |
commit | 3b2992e42f8945f4bc6b9151f83dbf2bb5bcd538 (patch) | |
tree | 23e864a55140216544ce17e15729604f4e1b05d5 /cpu-defs.h | |
parent | 5cf6dd51abb252d25cb77d3b7a95a744bed1a69c (diff) | |
download | qemu-3b2992e42f8945f4bc6b9151f83dbf2bb5bcd538.tar.gz qemu-3b2992e42f8945f4bc6b9151f83dbf2bb5bcd538.tar.bz2 qemu-3b2992e42f8945f4bc6b9151f83dbf2bb5bcd538.zip |
w64: Fix struct CPUTLBEntry
For w64, some entries need 'uintptr_t' instead of 'unsigned long'.
For other host systems, both data types are identical, so nothing changes.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Diffstat (limited to 'cpu-defs.h')
-rw-r--r-- | cpu-defs.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cpu-defs.h b/cpu-defs.h index 88d8093d22..f49e9500a9 100644 --- a/cpu-defs.h +++ b/cpu-defs.h @@ -98,12 +98,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; + uintptr_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(uintptr_t) - 1)) + + sizeof(uintptr_t))]; } CPUTLBEntry; extern int CPUTLBEntry_wrong_size[sizeof(CPUTLBEntry) == (1 << CPU_TLB_ENTRY_BITS) ? 1 : -1]; |