Add WASM_V128 in wasm_valkind_enum (#3412)
Add WASM_V128 in wasm_valkind_enum and handle the the type accordingly in wasm_c_api.c and wasm_runtime_common.c, and fix a typo in V128 union.
This commit is contained in:
@ -71,7 +71,7 @@ typedef struct WASMObject *wasm_obj_t;
|
||||
typedef union V128 {
|
||||
int8_t i8x16[16];
|
||||
int16_t i16x8[8];
|
||||
int32_t i32x8[4];
|
||||
int32_t i32x4[4];
|
||||
int64_t i64x2[2];
|
||||
float f32x4[4];
|
||||
double f64x2[2];
|
||||
|
||||
@ -297,6 +297,7 @@ enum wasm_valkind_enum {
|
||||
WASM_I64,
|
||||
WASM_F32,
|
||||
WASM_F64,
|
||||
WASM_V128,
|
||||
WASM_ANYREF = 128,
|
||||
WASM_FUNCREF,
|
||||
};
|
||||
@ -706,6 +707,9 @@ static inline own wasm_valtype_t* wasm_valtype_new_f32(void) {
|
||||
static inline own wasm_valtype_t* wasm_valtype_new_f64(void) {
|
||||
return wasm_valtype_new(WASM_F64);
|
||||
}
|
||||
static inline own wasm_valtype_t* wasm_valtype_new_v128(void) {
|
||||
return wasm_valtype_new(WASM_V128);
|
||||
}
|
||||
|
||||
static inline own wasm_valtype_t* wasm_valtype_new_anyref(void) {
|
||||
return wasm_valtype_new(WASM_ANYREF);
|
||||
|
||||
@ -249,6 +249,7 @@ enum wasm_valkind_enum {
|
||||
WASM_I64,
|
||||
WASM_F32,
|
||||
WASM_F64,
|
||||
WASM_V128,
|
||||
WASM_ANYREF = 128,
|
||||
WASM_FUNCREF,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user