Revision 4f2ac237 cpu-defs.h
b/cpu-defs.h | ||
---|---|---|
29 | 29 |
#error TARGET_LONG_BITS must be defined before including this header |
30 | 30 |
#endif |
31 | 31 |
|
32 |
#if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__) |
|
33 |
#define HOST_LONG_BITS 64 |
|
34 |
#else |
|
35 |
#define HOST_LONG_BITS 32 |
|
36 |
#endif |
|
37 |
|
|
32 | 38 |
#ifndef TARGET_PHYS_ADDR_BITS |
39 |
#if TARGET_LONG_BITS >= HOST_LONG_BITS |
|
33 | 40 |
#define TARGET_PHYS_ADDR_BITS TARGET_LONG_BITS |
41 |
#else |
|
42 |
#define TARGET_PHYS_ADDR_BITS HOST_LONG_BITS |
|
43 |
#endif |
|
34 | 44 |
#endif |
35 | 45 |
|
36 | 46 |
#define TARGET_LONG_SIZE (TARGET_LONG_BITS / 8) |
... | ... | |
47 | 57 |
#endif |
48 | 58 |
|
49 | 59 |
/* target_phys_addr_t is the type of a physical address (its size can |
50 |
be different from 'target_ulong') */ |
|
60 |
be different from 'target_ulong'). We have sizeof(target_phys_addr) |
|
61 |
= max(sizeof(unsigned long), |
|
62 |
sizeof(size_of_target_physical_address)) because we must pass a |
|
63 |
host pointer to memory operations in some cases */ |
|
64 |
|
|
51 | 65 |
#if TARGET_PHYS_ADDR_BITS == 32 |
52 | 66 |
typedef uint32_t target_phys_addr_t; |
53 | 67 |
#elif TARGET_PHYS_ADDR_BITS == 64 |
... | ... | |
56 | 70 |
#error TARGET_PHYS_ADDR_BITS undefined |
57 | 71 |
#endif |
58 | 72 |
|
59 |
#if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__) |
|
60 |
#define HOST_LONG_BITS 64 |
|
61 |
#else |
|
62 |
#define HOST_LONG_BITS 32 |
|
63 |
#endif |
|
64 |
|
|
65 | 73 |
#define HOST_LONG_SIZE (HOST_LONG_BITS / 8) |
66 | 74 |
|
67 | 75 |
#define EXCP_INTERRUPT 256 /* async interruption */ |
... | ... | |
79 | 87 |
bit 3 : indicates that the entry is invalid |
80 | 88 |
bit 2..0 : zero |
81 | 89 |
*/ |
82 |
uint32_t address;
|
|
90 |
target_ulong address;
|
|
83 | 91 |
/* addend to virtual address to get physical address */ |
84 |
uint32_t addend;
|
|
92 |
target_phys_addr_t addend;
|
|
85 | 93 |
} CPUTLBEntry; |
86 | 94 |
|
87 | 95 |
#endif |
Also available in: Unified diff