CP-8320: Initial commit for xs64bit

Changes based on sm.hg tip 29f9f9595fb7