Skip to content

Commit

Permalink
w64: Fix struct CPUTLBEntry
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stweil committed Apr 15, 2012
1 parent 5cf6dd5 commit 3b2992e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cpu-defs.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ typedef struct CPUTLBEntry {
target_ulong addr_code; target_ulong addr_code;
/* Addend to virtual address to get host address. IO accesses /* Addend to virtual address to get host address. IO accesses
use the corresponding iotlb value. */ use the corresponding iotlb value. */
unsigned long addend; uintptr_t addend;
/* padding to get a power of two size */ /* padding to get a power of two size */
uint8_t dummy[(1 << CPU_TLB_ENTRY_BITS) - uint8_t dummy[(1 << CPU_TLB_ENTRY_BITS) -
(sizeof(target_ulong) * 3 + (sizeof(target_ulong) * 3 +
((-sizeof(target_ulong) * 3) & (sizeof(unsigned long) - 1)) + ((-sizeof(target_ulong) * 3) & (sizeof(uintptr_t) - 1)) +
sizeof(unsigned long))]; sizeof(uintptr_t))];
} CPUTLBEntry; } CPUTLBEntry;


extern int CPUTLBEntry_wrong_size[sizeof(CPUTLBEntry) == (1 << CPU_TLB_ENTRY_BITS) ? 1 : -1]; extern int CPUTLBEntry_wrong_size[sizeof(CPUTLBEntry) == (1 << CPU_TLB_ENTRY_BITS) ? 1 : -1];
Expand Down

0 comments on commit 3b2992e

Please sign in to comment.