On 10/01/2016 05:05 AM, Artyom Tarasenko wrote:
+ uint64_t size = 1024ULL * (8 << 3 * TTE_PGSIZE(tlb[i].tte));
Your previous expression, 8192 << 3 * TTE_PGSIZE is clearer. Perhaps this itself should be extracted as a macro?
+ if ((new_vaddr == vaddr) || ((new_vaddr < (vaddr + size)) + && (vaddr < (new_vaddr + new_size)))) {
Please drop the unnecessary parenthesis and line up the expressions properly, if (new_vaddr == vaddr || (new_vaddr < vaddr + size && vaddr < new_vaddr + new_size)) { so that one can tell at a glance how the subexpressions are nested. r~