summaryrefslogtreecommitdiff
path: root/test/wasm2c
diff options
context:
space:
mode:
authorShravan Narayan <shravanrn@gmail.com>2023-07-30 14:27:04 -0400
committerShravan Narayan <shravanrn@gmail.com>2023-07-30 15:18:49 -0400
commit70b1c9d2652bae15785ceb449fda44fe31bbe0d5 (patch)
tree354e555be1118c6d5716d337591b132b97b076f7 /test/wasm2c
parent319f0c6112caa407c6b354772beda4ef986bac72 (diff)
downloadwabt-70b1c9d2652bae15785ceb449fda44fe31bbe0d5.tar.gz
wabt-70b1c9d2652bae15785ceb449fda44fe31bbe0d5.tar.bz2
wabt-70b1c9d2652bae15785ceb449fda44fe31bbe0d5.zip
wasm2c: ensure force read constraints compile for clang on mips
Diffstat (limited to 'test/wasm2c')
-rw-r--r--test/wasm2c/add.txt48
-rw-r--r--test/wasm2c/check-imports.txt48
-rw-r--r--test/wasm2c/export-names.txt48
-rw-r--r--test/wasm2c/hello.txt48
-rw-r--r--test/wasm2c/minimal.txt48
5 files changed, 140 insertions, 100 deletions
diff --git a/test/wasm2c/add.txt b/test/wasm2c/add.txt
index 59e2d3f3..e4ccbde7 100644
--- a/test/wasm2c/add.txt
+++ b/test/wasm2c/add.txt
@@ -115,9 +115,17 @@ static inline bool func_types_eq(const wasm_rt_func_type_t a,
#endif
#ifdef __GNUC__
-#define wasm_asm __asm__
+#define FORCE_READ_INT(var) __asm__("" ::"r"(var));
+// Clang on Mips requires "f" constraints on floats
+#if defined(__clang__) && \
+ (defined(mips) || defined(__mips__) || defined(__mips))
+#define FORCE_READ_FLOAT(var) __asm__("" ::"f"(var));
#else
-#define wasm_asm(X)
+#define FORCE_READ_FLOAT(var) __asm__("" ::"r"(var));
+#endif
+#else
+#define FORCE_READ_INT(var)
+#define FORCE_READ_FLOAT(var)
#endif
#if WABT_BIG_ENDIAN
@@ -139,13 +147,13 @@ static inline void load_data(void* dest, const void* src, size_t n) {
RANGE_CHECK((&m), m.size - o - s, s); \
load_data(&(m.data[m.size - o - s]), i, s); \
} while (0)
-#define DEFINE_LOAD(name, t1, t2, t3) \
+#define DEFINE_LOAD(name, t1, t2, t3, force_read) \
static inline t3 name(wasm_rt_memory_t* mem, u64 addr) { \
MEMCHECK(mem, addr, t1); \
t1 result; \
wasm_rt_memcpy(&result, &mem->data[mem->size - addr - sizeof(t1)], \
sizeof(t1)); \
- wasm_asm("" ::"r"(result)); \
+ force_read(result); \
return (t3)(t2)result; \
}
@@ -168,12 +176,12 @@ static inline void load_data(void* dest, const void* src, size_t n) {
RANGE_CHECK((&m), o, s); \
load_data(&(m.data[o]), i, s); \
} while (0)
-#define DEFINE_LOAD(name, t1, t2, t3) \
+#define DEFINE_LOAD(name, t1, t2, t3, force_read) \
static inline t3 name(wasm_rt_memory_t* mem, u64 addr) { \
MEMCHECK(mem, addr, t1); \
t1 result; \
wasm_rt_memcpy(&result, &mem->data[addr], sizeof(t1)); \
- wasm_asm("" ::"r"(result)); \
+ force_read(result); \
return (t3)(t2)result; \
}
@@ -185,20 +193,20 @@ static inline void load_data(void* dest, const void* src, size_t n) {
}
#endif
-DEFINE_LOAD(i32_load, u32, u32, u32)
-DEFINE_LOAD(i64_load, u64, u64, u64)
-DEFINE_LOAD(f32_load, f32, f32, f32)
-DEFINE_LOAD(f64_load, f64, f64, f64)
-DEFINE_LOAD(i32_load8_s, s8, s32, u32)
-DEFINE_LOAD(i64_load8_s, s8, s64, u64)
-DEFINE_LOAD(i32_load8_u, u8, u32, u32)
-DEFINE_LOAD(i64_load8_u, u8, u64, u64)
-DEFINE_LOAD(i32_load16_s, s16, s32, u32)
-DEFINE_LOAD(i64_load16_s, s16, s64, u64)
-DEFINE_LOAD(i32_load16_u, u16, u32, u32)
-DEFINE_LOAD(i64_load16_u, u16, u64, u64)
-DEFINE_LOAD(i64_load32_s, s32, s64, u64)
-DEFINE_LOAD(i64_load32_u, u32, u64, u64)
+DEFINE_LOAD(i32_load, u32, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load, u64, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(f32_load, f32, f32, f32, FORCE_READ_FLOAT)
+DEFINE_LOAD(f64_load, f64, f64, f64, FORCE_READ_FLOAT)
+DEFINE_LOAD(i32_load8_s, s8, s32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load8_s, s8, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load8_u, u8, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load8_u, u8, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load16_s, s16, s32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load16_s, s16, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load16_u, u16, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load16_u, u16, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i64_load32_s, s32, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i64_load32_u, u32, u64, u64, FORCE_READ_INT)
DEFINE_STORE(i32_store, u32, u32)
DEFINE_STORE(i64_store, u64, u64)
DEFINE_STORE(f32_store, f32, f32)
diff --git a/test/wasm2c/check-imports.txt b/test/wasm2c/check-imports.txt
index 6b20bcf1..39d3fb3c 100644
--- a/test/wasm2c/check-imports.txt
+++ b/test/wasm2c/check-imports.txt
@@ -138,9 +138,17 @@ static inline bool func_types_eq(const wasm_rt_func_type_t a,
#endif
#ifdef __GNUC__
-#define wasm_asm __asm__
+#define FORCE_READ_INT(var) __asm__("" ::"r"(var));
+// Clang on Mips requires "f" constraints on floats
+#if defined(__clang__) && \
+ (defined(mips) || defined(__mips__) || defined(__mips))
+#define FORCE_READ_FLOAT(var) __asm__("" ::"f"(var));
#else
-#define wasm_asm(X)
+#define FORCE_READ_FLOAT(var) __asm__("" ::"r"(var));
+#endif
+#else
+#define FORCE_READ_INT(var)
+#define FORCE_READ_FLOAT(var)
#endif
#if WABT_BIG_ENDIAN
@@ -162,13 +170,13 @@ static inline void load_data(void* dest, const void* src, size_t n) {
RANGE_CHECK((&m), m.size - o - s, s); \
load_data(&(m.data[m.size - o - s]), i, s); \
} while (0)
-#define DEFINE_LOAD(name, t1, t2, t3) \
+#define DEFINE_LOAD(name, t1, t2, t3, force_read) \
static inline t3 name(wasm_rt_memory_t* mem, u64 addr) { \
MEMCHECK(mem, addr, t1); \
t1 result; \
wasm_rt_memcpy(&result, &mem->data[mem->size - addr - sizeof(t1)], \
sizeof(t1)); \
- wasm_asm("" ::"r"(result)); \
+ force_read(result); \
return (t3)(t2)result; \
}
@@ -191,12 +199,12 @@ static inline void load_data(void* dest, const void* src, size_t n) {
RANGE_CHECK((&m), o, s); \
load_data(&(m.data[o]), i, s); \
} while (0)
-#define DEFINE_LOAD(name, t1, t2, t3) \
+#define DEFINE_LOAD(name, t1, t2, t3, force_read) \
static inline t3 name(wasm_rt_memory_t* mem, u64 addr) { \
MEMCHECK(mem, addr, t1); \
t1 result; \
wasm_rt_memcpy(&result, &mem->data[addr], sizeof(t1)); \
- wasm_asm("" ::"r"(result)); \
+ force_read(result); \
return (t3)(t2)result; \
}
@@ -208,20 +216,20 @@ static inline void load_data(void* dest, const void* src, size_t n) {
}
#endif
-DEFINE_LOAD(i32_load, u32, u32, u32)
-DEFINE_LOAD(i64_load, u64, u64, u64)
-DEFINE_LOAD(f32_load, f32, f32, f32)
-DEFINE_LOAD(f64_load, f64, f64, f64)
-DEFINE_LOAD(i32_load8_s, s8, s32, u32)
-DEFINE_LOAD(i64_load8_s, s8, s64, u64)
-DEFINE_LOAD(i32_load8_u, u8, u32, u32)
-DEFINE_LOAD(i64_load8_u, u8, u64, u64)
-DEFINE_LOAD(i32_load16_s, s16, s32, u32)
-DEFINE_LOAD(i64_load16_s, s16, s64, u64)
-DEFINE_LOAD(i32_load16_u, u16, u32, u32)
-DEFINE_LOAD(i64_load16_u, u16, u64, u64)
-DEFINE_LOAD(i64_load32_s, s32, s64, u64)
-DEFINE_LOAD(i64_load32_u, u32, u64, u64)
+DEFINE_LOAD(i32_load, u32, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load, u64, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(f32_load, f32, f32, f32, FORCE_READ_FLOAT)
+DEFINE_LOAD(f64_load, f64, f64, f64, FORCE_READ_FLOAT)
+DEFINE_LOAD(i32_load8_s, s8, s32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load8_s, s8, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load8_u, u8, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load8_u, u8, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load16_s, s16, s32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load16_s, s16, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load16_u, u16, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load16_u, u16, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i64_load32_s, s32, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i64_load32_u, u32, u64, u64, FORCE_READ_INT)
DEFINE_STORE(i32_store, u32, u32)
DEFINE_STORE(i64_store, u64, u64)
DEFINE_STORE(f32_store, f32, f32)
diff --git a/test/wasm2c/export-names.txt b/test/wasm2c/export-names.txt
index 34cdaf40..1913d955 100644
--- a/test/wasm2c/export-names.txt
+++ b/test/wasm2c/export-names.txt
@@ -138,9 +138,17 @@ static inline bool func_types_eq(const wasm_rt_func_type_t a,
#endif
#ifdef __GNUC__
-#define wasm_asm __asm__
+#define FORCE_READ_INT(var) __asm__("" ::"r"(var));
+// Clang on Mips requires "f" constraints on floats
+#if defined(__clang__) && \
+ (defined(mips) || defined(__mips__) || defined(__mips))
+#define FORCE_READ_FLOAT(var) __asm__("" ::"f"(var));
#else
-#define wasm_asm(X)
+#define FORCE_READ_FLOAT(var) __asm__("" ::"r"(var));
+#endif
+#else
+#define FORCE_READ_INT(var)
+#define FORCE_READ_FLOAT(var)
#endif
#if WABT_BIG_ENDIAN
@@ -162,13 +170,13 @@ static inline void load_data(void* dest, const void* src, size_t n) {
RANGE_CHECK((&m), m.size - o - s, s); \
load_data(&(m.data[m.size - o - s]), i, s); \
} while (0)
-#define DEFINE_LOAD(name, t1, t2, t3) \
+#define DEFINE_LOAD(name, t1, t2, t3, force_read) \
static inline t3 name(wasm_rt_memory_t* mem, u64 addr) { \
MEMCHECK(mem, addr, t1); \
t1 result; \
wasm_rt_memcpy(&result, &mem->data[mem->size - addr - sizeof(t1)], \
sizeof(t1)); \
- wasm_asm("" ::"r"(result)); \
+ force_read(result); \
return (t3)(t2)result; \
}
@@ -191,12 +199,12 @@ static inline void load_data(void* dest, const void* src, size_t n) {
RANGE_CHECK((&m), o, s); \
load_data(&(m.data[o]), i, s); \
} while (0)
-#define DEFINE_LOAD(name, t1, t2, t3) \
+#define DEFINE_LOAD(name, t1, t2, t3, force_read) \
static inline t3 name(wasm_rt_memory_t* mem, u64 addr) { \
MEMCHECK(mem, addr, t1); \
t1 result; \
wasm_rt_memcpy(&result, &mem->data[addr], sizeof(t1)); \
- wasm_asm("" ::"r"(result)); \
+ force_read(result); \
return (t3)(t2)result; \
}
@@ -208,20 +216,20 @@ static inline void load_data(void* dest, const void* src, size_t n) {
}
#endif
-DEFINE_LOAD(i32_load, u32, u32, u32)
-DEFINE_LOAD(i64_load, u64, u64, u64)
-DEFINE_LOAD(f32_load, f32, f32, f32)
-DEFINE_LOAD(f64_load, f64, f64, f64)
-DEFINE_LOAD(i32_load8_s, s8, s32, u32)
-DEFINE_LOAD(i64_load8_s, s8, s64, u64)
-DEFINE_LOAD(i32_load8_u, u8, u32, u32)
-DEFINE_LOAD(i64_load8_u, u8, u64, u64)
-DEFINE_LOAD(i32_load16_s, s16, s32, u32)
-DEFINE_LOAD(i64_load16_s, s16, s64, u64)
-DEFINE_LOAD(i32_load16_u, u16, u32, u32)
-DEFINE_LOAD(i64_load16_u, u16, u64, u64)
-DEFINE_LOAD(i64_load32_s, s32, s64, u64)
-DEFINE_LOAD(i64_load32_u, u32, u64, u64)
+DEFINE_LOAD(i32_load, u32, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load, u64, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(f32_load, f32, f32, f32, FORCE_READ_FLOAT)
+DEFINE_LOAD(f64_load, f64, f64, f64, FORCE_READ_FLOAT)
+DEFINE_LOAD(i32_load8_s, s8, s32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load8_s, s8, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load8_u, u8, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load8_u, u8, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load16_s, s16, s32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load16_s, s16, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load16_u, u16, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load16_u, u16, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i64_load32_s, s32, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i64_load32_u, u32, u64, u64, FORCE_READ_INT)
DEFINE_STORE(i32_store, u32, u32)
DEFINE_STORE(i64_store, u64, u64)
DEFINE_STORE(f32_store, f32, f32)
diff --git a/test/wasm2c/hello.txt b/test/wasm2c/hello.txt
index a0cb344e..05af5b00 100644
--- a/test/wasm2c/hello.txt
+++ b/test/wasm2c/hello.txt
@@ -146,9 +146,17 @@ static inline bool func_types_eq(const wasm_rt_func_type_t a,
#endif
#ifdef __GNUC__
-#define wasm_asm __asm__
+#define FORCE_READ_INT(var) __asm__("" ::"r"(var));
+// Clang on Mips requires "f" constraints on floats
+#if defined(__clang__) && \
+ (defined(mips) || defined(__mips__) || defined(__mips))
+#define FORCE_READ_FLOAT(var) __asm__("" ::"f"(var));
#else
-#define wasm_asm(X)
+#define FORCE_READ_FLOAT(var) __asm__("" ::"r"(var));
+#endif
+#else
+#define FORCE_READ_INT(var)
+#define FORCE_READ_FLOAT(var)
#endif
#if WABT_BIG_ENDIAN
@@ -170,13 +178,13 @@ static inline void load_data(void* dest, const void* src, size_t n) {
RANGE_CHECK((&m), m.size - o - s, s); \
load_data(&(m.data[m.size - o - s]), i, s); \
} while (0)
-#define DEFINE_LOAD(name, t1, t2, t3) \
+#define DEFINE_LOAD(name, t1, t2, t3, force_read) \
static inline t3 name(wasm_rt_memory_t* mem, u64 addr) { \
MEMCHECK(mem, addr, t1); \
t1 result; \
wasm_rt_memcpy(&result, &mem->data[mem->size - addr - sizeof(t1)], \
sizeof(t1)); \
- wasm_asm("" ::"r"(result)); \
+ force_read(result); \
return (t3)(t2)result; \
}
@@ -199,12 +207,12 @@ static inline void load_data(void* dest, const void* src, size_t n) {
RANGE_CHECK((&m), o, s); \
load_data(&(m.data[o]), i, s); \
} while (0)
-#define DEFINE_LOAD(name, t1, t2, t3) \
+#define DEFINE_LOAD(name, t1, t2, t3, force_read) \
static inline t3 name(wasm_rt_memory_t* mem, u64 addr) { \
MEMCHECK(mem, addr, t1); \
t1 result; \
wasm_rt_memcpy(&result, &mem->data[addr], sizeof(t1)); \
- wasm_asm("" ::"r"(result)); \
+ force_read(result); \
return (t3)(t2)result; \
}
@@ -216,20 +224,20 @@ static inline void load_data(void* dest, const void* src, size_t n) {
}
#endif
-DEFINE_LOAD(i32_load, u32, u32, u32)
-DEFINE_LOAD(i64_load, u64, u64, u64)
-DEFINE_LOAD(f32_load, f32, f32, f32)
-DEFINE_LOAD(f64_load, f64, f64, f64)
-DEFINE_LOAD(i32_load8_s, s8, s32, u32)
-DEFINE_LOAD(i64_load8_s, s8, s64, u64)
-DEFINE_LOAD(i32_load8_u, u8, u32, u32)
-DEFINE_LOAD(i64_load8_u, u8, u64, u64)
-DEFINE_LOAD(i32_load16_s, s16, s32, u32)
-DEFINE_LOAD(i64_load16_s, s16, s64, u64)
-DEFINE_LOAD(i32_load16_u, u16, u32, u32)
-DEFINE_LOAD(i64_load16_u, u16, u64, u64)
-DEFINE_LOAD(i64_load32_s, s32, s64, u64)
-DEFINE_LOAD(i64_load32_u, u32, u64, u64)
+DEFINE_LOAD(i32_load, u32, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load, u64, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(f32_load, f32, f32, f32, FORCE_READ_FLOAT)
+DEFINE_LOAD(f64_load, f64, f64, f64, FORCE_READ_FLOAT)
+DEFINE_LOAD(i32_load8_s, s8, s32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load8_s, s8, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load8_u, u8, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load8_u, u8, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load16_s, s16, s32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load16_s, s16, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load16_u, u16, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load16_u, u16, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i64_load32_s, s32, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i64_load32_u, u32, u64, u64, FORCE_READ_INT)
DEFINE_STORE(i32_store, u32, u32)
DEFINE_STORE(i64_store, u64, u64)
DEFINE_STORE(f32_store, f32, f32)
diff --git a/test/wasm2c/minimal.txt b/test/wasm2c/minimal.txt
index 498d9472..5ee6bfce 100644
--- a/test/wasm2c/minimal.txt
+++ b/test/wasm2c/minimal.txt
@@ -109,9 +109,17 @@ static inline bool func_types_eq(const wasm_rt_func_type_t a,
#endif
#ifdef __GNUC__
-#define wasm_asm __asm__
+#define FORCE_READ_INT(var) __asm__("" ::"r"(var));
+// Clang on Mips requires "f" constraints on floats
+#if defined(__clang__) && \
+ (defined(mips) || defined(__mips__) || defined(__mips))
+#define FORCE_READ_FLOAT(var) __asm__("" ::"f"(var));
#else
-#define wasm_asm(X)
+#define FORCE_READ_FLOAT(var) __asm__("" ::"r"(var));
+#endif
+#else
+#define FORCE_READ_INT(var)
+#define FORCE_READ_FLOAT(var)
#endif
#if WABT_BIG_ENDIAN
@@ -133,13 +141,13 @@ static inline void load_data(void* dest, const void* src, size_t n) {
RANGE_CHECK((&m), m.size - o - s, s); \
load_data(&(m.data[m.size - o - s]), i, s); \
} while (0)
-#define DEFINE_LOAD(name, t1, t2, t3) \
+#define DEFINE_LOAD(name, t1, t2, t3, force_read) \
static inline t3 name(wasm_rt_memory_t* mem, u64 addr) { \
MEMCHECK(mem, addr, t1); \
t1 result; \
wasm_rt_memcpy(&result, &mem->data[mem->size - addr - sizeof(t1)], \
sizeof(t1)); \
- wasm_asm("" ::"r"(result)); \
+ force_read(result); \
return (t3)(t2)result; \
}
@@ -162,12 +170,12 @@ static inline void load_data(void* dest, const void* src, size_t n) {
RANGE_CHECK((&m), o, s); \
load_data(&(m.data[o]), i, s); \
} while (0)
-#define DEFINE_LOAD(name, t1, t2, t3) \
+#define DEFINE_LOAD(name, t1, t2, t3, force_read) \
static inline t3 name(wasm_rt_memory_t* mem, u64 addr) { \
MEMCHECK(mem, addr, t1); \
t1 result; \
wasm_rt_memcpy(&result, &mem->data[addr], sizeof(t1)); \
- wasm_asm("" ::"r"(result)); \
+ force_read(result); \
return (t3)(t2)result; \
}
@@ -179,20 +187,20 @@ static inline void load_data(void* dest, const void* src, size_t n) {
}
#endif
-DEFINE_LOAD(i32_load, u32, u32, u32)
-DEFINE_LOAD(i64_load, u64, u64, u64)
-DEFINE_LOAD(f32_load, f32, f32, f32)
-DEFINE_LOAD(f64_load, f64, f64, f64)
-DEFINE_LOAD(i32_load8_s, s8, s32, u32)
-DEFINE_LOAD(i64_load8_s, s8, s64, u64)
-DEFINE_LOAD(i32_load8_u, u8, u32, u32)
-DEFINE_LOAD(i64_load8_u, u8, u64, u64)
-DEFINE_LOAD(i32_load16_s, s16, s32, u32)
-DEFINE_LOAD(i64_load16_s, s16, s64, u64)
-DEFINE_LOAD(i32_load16_u, u16, u32, u32)
-DEFINE_LOAD(i64_load16_u, u16, u64, u64)
-DEFINE_LOAD(i64_load32_s, s32, s64, u64)
-DEFINE_LOAD(i64_load32_u, u32, u64, u64)
+DEFINE_LOAD(i32_load, u32, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load, u64, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(f32_load, f32, f32, f32, FORCE_READ_FLOAT)
+DEFINE_LOAD(f64_load, f64, f64, f64, FORCE_READ_FLOAT)
+DEFINE_LOAD(i32_load8_s, s8, s32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load8_s, s8, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load8_u, u8, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load8_u, u8, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load16_s, s16, s32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load16_s, s16, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i32_load16_u, u16, u32, u32, FORCE_READ_INT)
+DEFINE_LOAD(i64_load16_u, u16, u64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i64_load32_s, s32, s64, u64, FORCE_READ_INT)
+DEFINE_LOAD(i64_load32_u, u32, u64, u64, FORCE_READ_INT)
DEFINE_STORE(i32_store, u32, u32)
DEFINE_STORE(i64_store, u64, u64)
DEFINE_STORE(f32_store, f32, f32)