Skip to content

Commit

Permalink
wasm: detect support for Relaxed SIMD mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Nov 22, 2023
1 parent da0604f commit 2e66dd4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions simde/simde-arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,10 @@
# define SIMDE_ARCH_WASM_SIMD128
#endif

#if defined(SIMDE_ARCH_WASM) && defined(__wasm_relaxed_simd__)
# define SIMDE_ARCH_WASM_RELAXED_SIMD
#endif

/* Xtensa
<https://en.wikipedia.org/wiki/> */
#if defined(__xtensa__) || defined(__XTENSA__)
Expand Down
8 changes: 7 additions & 1 deletion simde/simde-features.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,13 @@
#define SIMDE_WASM_SIMD128_NATIVE
#endif
#endif
#if defined(SIMDE_WASM_SIMD128_NATIVE)

#if !defined(SIMDE_WASM_RELAXED_SIMD_NATIVE) && !defined(SIMDE_WASM_RELAXED_SIMD_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
#if defined(SIMDE_ARCH_WASM_RELAXED_SIMD)
#define SIMDE_WASM_RELAXED_SIMD_NATIVE
#endif
#endif
#if defined(SIMDE_WASM_SIMD128_NATIVE) || defined(SIMDE_WASM_RELAXED_SIMD_NATIVE)
#include <wasm_simd128.h>
#endif

Expand Down

0 comments on commit 2e66dd4

Please sign in to comment.