Revision d656469f cpu-defs.h

b/cpu-defs.h
102 102
#define CPU_TLB_BITS 8
103 103
#define CPU_TLB_SIZE (1 << CPU_TLB_BITS)
104 104

  
105
#if TARGET_PHYS_ADDR_BITS == 32 && TARGET_LONG_BITS == 32
106
#define CPU_TLB_ENTRY_BITS 4
107
#else
108
#define CPU_TLB_ENTRY_BITS 5
109
#endif
110

  
105 111
typedef struct CPUTLBEntry {
106 112
    /* bit 31 to TARGET_PAGE_BITS : virtual address
107 113
       bit TARGET_PAGE_BITS-1..IO_MEM_SHIFT : if non zero, memory io
......
113 119
    target_ulong addr_write;
114 120
    target_ulong addr_code;
115 121
    /* addend to virtual address to get physical address */
122
#if TARGET_PHYS_ADDR_BITS == 64
123
    /* on i386 Linux make sure it is aligned */
124
    target_phys_addr_t addend __attribute__((aligned(8)));
125
#else
116 126
    target_phys_addr_t addend;
127
#endif
128
    /* padding to get a power of two size */
129
    uint8_t dummy[(1 << CPU_TLB_ENTRY_BITS) - 
130
                  (sizeof(target_ulong) * 3 + 
131
                   ((-sizeof(target_ulong) * 3) & (sizeof(target_phys_addr_t) - 1)) + 
132
                   sizeof(target_phys_addr_t))];
117 133
} CPUTLBEntry;
118 134

  
119 135
#define CPU_COMMON                                                      \

Also available in: Unified diff