core: calculate PGS_UINT64_MAX using bit-shifting