Port x64-specific changes to x86