I need an x86 sequence to convert a 64-bit unsigned integer into a floating point. This would be simple enough with a signed integer, but there doesn't seem to be an instruction that can do so with one that is unsigned. I believe you could normally use VCVTUSI2SD
, but this is not accessible by my assembler.
So in terms of assembly, it would accomplish this:
unsigned long long x = ... ;
double y = (double)x;
Another similar question was posted here but involves 32-bit register manipulation. This requires the conversion of 64-bit values instead, which adds some complexity to the math.