- // nature we add 263 (256 is the modulus plus 7 to keep the unrelated
- // lowest three bits from affecting the result) to calculate the entry
- // age correctly even after generation8 overflows into the next cycle.
- if ( replace->depth8 - ((263 + generation8 - replace->genBound8) & 0xF8)
- > tte[i].depth8 - ((263 + generation8 - tte[i].genBound8) & 0xF8))
+ // nature we add GENERATION_CYCLE (256 is the modulus, plus what
+ // is needed to keep the unrelated lowest n bits from affecting
+ // the result) to calculate the entry age correctly even after
+ // generation8 overflows into the next cycle.
+ if ( replace->depth8 - ((GENERATION_CYCLE + generation8 - replace->genBound8) & GENERATION_MASK)
+ > tte[i].depth8 - ((GENERATION_CYCLE + generation8 - tte[i].genBound8) & GENERATION_MASK))