simde icon indicating copy to clipboard operation
simde copied to clipboard

SIMDE is swapping the definition of SIMDE_MM_HINT_T0 and T2

Open galanhir opened this issue 1 month ago • 4 comments

On one hand, the prefetch macros are originally defined _MM_HINT_T0 (resp, T2) by Intel as:

xmmintrin.h:#define _MM_HINT_T0  3
...
xmmintrin.h:#define _MM_HINT_T2  1

On the other hand, SIMDE is defining

  #define SIMDE_MM_HINT_T0   1
...
  #define SIMDE_MM_HINT_T2   3

eventually identifying one for the other in case of SIMDE_X86_SSE_ENABLE_NATIVE_ALIASES:

  #undef  _MM_HINT_T0
  #define _MM_HINT_T0   SIMDE_MM_HINT_T0
...
  #undef  _MM_HINT_T2
  #define _MM_HINT_T2   SIMDE_MM_HINT_T2

This is probably wrong, as it ends up swapping _MM_HINT_T0 and _MM_HINT_T2 when built nativelly for Intel x86 targets.

galanhir avatar May 27 '24 02:05 galanhir