I'm trying to compile some code that uses the intrinsic _mm_set_epi64x
under Visual C++. This intrinsic is supported by VC but only when compiling for x86-64, not for x86-32. I assume this is not an actual limitation of the processor, because other compilers (GCC and Clang) support this intrinsic for both 32 and 64 bit compiles.
My first thought was to instead use _mm_set_epi64
, which creates an __m128i using two __m64 (MMX) registers, however I can't seem to find any way to actually perform the conversion. GCC allows you to cast a long long to an __m64, but Visual C++ rejects this. And while there are various intrinsics defined for converting a long long to an __m64 (including _m_from_int64
, _mm_cvtsi64_m64
, _mm_cvtsi64x_si64
, and _mm_set_pi64x
) all of them are only available on 64-bit compiles (where I can just use _mm_set_epi64x
anyway).
One obvious solution would be to break down the input values and use _mm_set_epi32
, but I'm hoping there is some way I can just define a macro to replace _mm_set_epi64x
for this particular build configuration, since _mm_set_epi64x
works fine everywhere else.