[x86] move code for converting int logic to FP logic to a helper function; NFCI