Turns out CVTSD2SI in x64Emitter.cpp should actually use 64 bits instead of 32. Thanks for pointing that out hk.konpie.