I'm currently working on updating a large codebase from VS2013 to VS2019. One of the compiler errors I've run into is as follows:
intrinsics.h(348): error C3861: '_mm_cvtpd_pi32': identifier not found
This intrinsic function is defined in Visual Studio's "emmintrin.h". I only get this error when targeting 64-bit builds. On closer inspection is see that, between 2013 and 2019 the emmintrin.h definition changed from this:
extern __m64 _mm_cvtpd_pi32(__m128d _A);
extern __m64 _mm_cvttpd_pi32(__m128d _A);
extern __m128d _mm_cvtpi32_pd(__m64 _A);
To this:
#if defined(_M_IX86)
extern __m64 _mm_cvtpd_pi32(__m128d _A);
extern __m64 _mm_cvttpd_pi32(__m128d _A);
extern __m128d _mm_cvtpi32_pd(__m64 _A);
#endif
ie: The preprocessor directive ensures that the functions are now only available for 32bit targets. The 3rd party header file from which the error originates makes use of these functions regardless of the target (64bit or 32bit). Presumably the best course of action here is to edit this header file to ensure that this function is only called upon for 32-bit targets. However what I'm more curious about is why was this changed from 2013 to 2019? I see a description of this function here:
https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtpd_pi32&expand=1705
Was it never applicable to 64bit targets to begin with? Or has it been replaced with a 64bit version that I need to consider?