> I find the way we calculate the dummy field in CPUTLBEntry funny. What > is the point of having: > > ((-sizeof(target_ulong) * 3) & (sizeof(unsigned long) - > 1)) > > in its size? Why shouldnt it be more simple, like below? > > uint8_t dummy[(1 << CPU_TLB_ENTRY_BITS) - (sizeof(target_ulong) * > 3 + sizeof(unsigned long))]; >
No, because of alignment. Consider the case of 32-bit target_ulong and 64-bit unsigned long). Paul