On 24/08/2015 02:23, Emilio G. Cota wrote: > Having the physical address in the TLB entry will allow us > to portably obtain the physical address of a memory access, > which will prove useful when implementing a scalable emulation > of atomic instructions.
It came to my mind that addr_read and addr_code only differ in the bottom TARGET_PAGE_BITS bits, and they are always zero in addr_phys. So we could store addr_code as addr_read ^ (addr_phys & (TARGET_PAGE_SIZE - 1)) and discard the bottom bits of addr_phys. This would make it possible to include addr_phys without growing the size of the TLB entry. Paolo