simde icon indicating copy to clipboard operation
simde copied to clipboard

Couple of build issues on 32bit MSVC v143 build with /arch:SSE

Open Epixu opened this issue 7 months ago • 17 comments

Hi again, I'm experiencing build errors with the current master (e651ec360f22d5f9d7fb2c75c5025db614f78b8c) Many issues have been fixed regarding my prior issue, including many of the failing tests involving precision discrepancies. Here's the summary:

All my issues apply to MSVC v143 x86 builds - I have 5 such builds, each with a different /arch:XXX option:

1. The two build issues apply only to MSVC v143 x86 with /arch:SSE enabled

a) The first build issue involves reaching line 4774 here: https://github.com/simd-everywhere/simde/blob/e651ec360f22d5f9d7fb2c75c5025db614f78b8c/simde/x86/sse2.h#L4770-L4774

The line involves GCC syntax, it should be guarded. I can fix this build issue by doing:

simde_mm_pause (void) {
  #if defined(SIMDE_X86_SSE2_NATIVE)
    _mm_pause();
  #elif defined(SIMDE_ARCH_X86)
    #if defined(_MSC_VER)
      _mm_pause();
    #else
      __asm__ __volatile__("pause");
    #endif
  #elif defined(SIMDE_ARCH_ARM_NEON)

But not sure if _mm_pause() won't cause invalid instruction at runtime, if the SIMDE_X86_SSE2_NATIVE isn't available. Is it available on SIMDE_X86_SSE_NATIVE?

b) The second build issue involves SVML

I can circumvent it by simply guard the include of the svml.h - not sure if that is intended though. There should be fallback alternatives in SIMDe? These errors seemingly involve only 'simde__m128d' to '__m128d' conversion issues.

2. The test issues apply to all /arch options on MSVC v143 x86 builds:

They seemingly affect only pow functions precision, but my tests aren't exhaustive, so not sure.

Epixu avatar Nov 21 '23 08:11 Epixu