summaryrefslogtreecommitdiff
path: root/src/prebuilt/wasm2c_simd_source_declarations.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/prebuilt/wasm2c_simd_source_declarations.cc')
-rw-r--r--src/prebuilt/wasm2c_simd_source_declarations.cc46
1 files changed, 26 insertions, 20 deletions
diff --git a/src/prebuilt/wasm2c_simd_source_declarations.cc b/src/prebuilt/wasm2c_simd_source_declarations.cc
index 5b903b26..a43a0006 100644
--- a/src/prebuilt/wasm2c_simd_source_declarations.cc
+++ b/src/prebuilt/wasm2c_simd_source_declarations.cc
@@ -15,26 +15,26 @@ R"w2c_template(#endif
R"w2c_template(// TODO: equivalent constraint for ARM and other architectures
)w2c_template"
R"w2c_template(
-#define DEFINE_SIMD_LOAD_FUNC(name, func, t) \
+#define DEFINE_SIMD_LOAD_FUNC(name, func, t) \
)w2c_template"
-R"w2c_template( static inline v128 name(wasm_rt_memory_t* mem, u64 addr) { \
+R"w2c_template( static inline v128 name##_unchecked(wasm_rt_memory_t* mem, u64 addr) { \
)w2c_template"
-R"w2c_template( MEMCHECK(mem, addr, t); \
+R"w2c_template( v128 result = func(MEM_ADDR(mem, addr, sizeof(t))); \
)w2c_template"
-R"w2c_template( v128 result = func(MEM_ADDR(mem, addr, sizeof(t))); \
+R"w2c_template( SIMD_FORCE_READ(result); \
)w2c_template"
-R"w2c_template( SIMD_FORCE_READ(result); \
+R"w2c_template( return result; \
)w2c_template"
-R"w2c_template( return result; \
+R"w2c_template( } \
)w2c_template"
-R"w2c_template( }
+R"w2c_template( DEF_MEM_CHECKS0(name, _, t, return, v128);
)w2c_template"
R"w2c_template(
#define DEFINE_SIMD_LOAD_LANE(name, func, t, lane) \
)w2c_template"
-R"w2c_template( static inline v128 name(wasm_rt_memory_t* mem, u64 addr, v128 vec) { \
+R"w2c_template( static inline v128 name##_unchecked(wasm_rt_memory_t* mem, u64 addr, \
)w2c_template"
-R"w2c_template( MEMCHECK(mem, addr, t); \
+R"w2c_template( v128 vec) { \
)w2c_template"
R"w2c_template( v128 result = func(MEM_ADDR(mem, addr, sizeof(t)), vec, lane); \
)w2c_template"
@@ -42,29 +42,35 @@ R"w2c_template( SIMD_FORCE_READ(result);
)w2c_template"
R"w2c_template( return result; \
)w2c_template"
-R"w2c_template( }
+R"w2c_template( } \
+)w2c_template"
+R"w2c_template( DEF_MEM_CHECKS1(name, _, t, return, v128, v128);
)w2c_template"
R"w2c_template(
-#define DEFINE_SIMD_STORE(name, t) \
+#define DEFINE_SIMD_STORE(name, t) \
+)w2c_template"
+R"w2c_template( static inline void name##_unchecked(wasm_rt_memory_t* mem, u64 addr, \
)w2c_template"
-R"w2c_template( static inline void name(wasm_rt_memory_t* mem, u64 addr, v128 value) { \
+R"w2c_template( v128 value) { \
)w2c_template"
-R"w2c_template( MEMCHECK(mem, addr, t); \
+R"w2c_template( simde_wasm_v128_store(MEM_ADDR(mem, addr, sizeof(t)), value); \
)w2c_template"
-R"w2c_template( simde_wasm_v128_store(MEM_ADDR(mem, addr, sizeof(t)), value); \
+R"w2c_template( } \
)w2c_template"
-R"w2c_template( }
+R"w2c_template( DEF_MEM_CHECKS1(name, _, t, , void, v128);
)w2c_template"
R"w2c_template(
-#define DEFINE_SIMD_STORE_LANE(name, func, t, lane) \
+#define DEFINE_SIMD_STORE_LANE(name, func, t, lane) \
+)w2c_template"
+R"w2c_template( static inline void name##_unchecked(wasm_rt_memory_t* mem, u64 addr, \
)w2c_template"
-R"w2c_template( static inline void name(wasm_rt_memory_t* mem, u64 addr, v128 value) { \
+R"w2c_template( v128 value) { \
)w2c_template"
-R"w2c_template( MEMCHECK(mem, addr, t); \
+R"w2c_template( func(MEM_ADDR(mem, addr, sizeof(t)), value, lane); \
)w2c_template"
-R"w2c_template( func(MEM_ADDR(mem, addr, sizeof(t)), value, lane); \
+R"w2c_template( } \
)w2c_template"
-R"w2c_template( }
+R"w2c_template( DEF_MEM_CHECKS1(name, _, t, , void, v128);
)w2c_template"
R"w2c_template(
// clang-format off