I need to convert both 32-bit and 64-bit unsigned integers into floating-point values in xmm registers. There are x86 instructions to convert signed integers into single and double precision floating-point values, but nothing for unsigned integers.
Bonus: How to convert float-point values in xmm registers to 32-bit and 64-bit unsigned integers?
Shamelessly using Janus answer as a template (after all I really like C++):
Generate with
gcc -march=native -O3on a i7, so this is with up to and including-mavx.uint2floatand vice versa are as expected, the long conversions just have a special case for numbers greater than 263-1.