Skip to content

Commit 260b5b4

Browse files
authored
Add Wasm simd proposal's official Wasm spec testsuite tests (#1413)
add official Wasm testsuite SIMD tests They are all ignored for now since Wasmi would not pass them. This also enables Wasmi's `simd` crate feature by default for the `wasmi_wast` crate.
1 parent 08bcf12 commit 260b5b4

File tree

2 files changed

+60
-2
lines changed

2 files changed

+60
-2
lines changed

crates/wast/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ categories.workspace = true
1414
exclude.workspace = true
1515

1616
[dependencies]
17-
wasmi = { workspace = true, features = ["std"] }
17+
wasmi = { workspace = true, features = ["std", "simd"] }
1818
wast = { workspace = true, features = ["wasm-module"] }
1919
anyhow = "1.0"

crates/wast/tests/mod.rs

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,64 @@ macro_rules! expand_tests {
194194
fn wasm_utf8_import_module("utf8-import-module");
195195
fn wasm_utf8_invalid_encoding("utf8-invalid-encoding");
196196
fn wasm_wide_arithmetic("proposals/wide-arithmetic/wide-arithmetic");
197+
198+
#[ignore] fn wasm_simd_address("simd_address");
199+
#[ignore] fn wasm_simd_align("simd_align");
200+
#[ignore] fn wasm_simd_bit_shift("simd_bit_shift");
201+
#[ignore] fn wasm_simd_bitwise("simd_bitwise");
202+
#[ignore] fn wasm_simd_boolean("simd_boolean");
203+
#[ignore] fn wasm_simd_const("simd_const");
204+
#[ignore] fn wasm_simd_conversions("simd_conversions");
205+
#[ignore] fn wasm_simd_f32x4("simd_f32x4");
206+
#[ignore] fn wasm_simd_f32x4_arith("simd_f32x4_arith");
207+
#[ignore] fn wasm_simd_f32x4_cmp("simd_f32x4_cmp");
208+
#[ignore] fn wasm_simd_f32x4_pmin_pmax("simd_f32x4_pmin_pmax");
209+
#[ignore] fn wasm_simd_f32x4_rounding("simd_f32x4_rounding");
210+
#[ignore] fn wasm_simd_f64x2("simd_f64x2");
211+
#[ignore] fn wasm_simd_f64x2_arith("simd_f64x2_arith");
212+
#[ignore] fn wasm_simd_f64x2_cmp("simd_f64x2_cmp");
213+
#[ignore] fn wasm_simd_f64x2_pmin_pmax("simd_f64x2_pmin_pmax");
214+
#[ignore] fn wasm_simd_f64x2_rounding("simd_f64x2_rounding");
215+
#[ignore] fn wasm_simd_i16x8_arith("simd_i16x8_arith");
216+
#[ignore] fn wasm_simd_i16x8_arith2("simd_i16x8_arith2");
217+
#[ignore] fn wasm_simd_i16x8_cmp("simd_i16x8_cmp");
218+
#[ignore] fn wasm_simd_i16x8_extadd_pairwise_i8x16("simd_i16x8_extadd_pairwise_i8x16");
219+
#[ignore] fn wasm_simd_i16x8_extmul_i8x16("simd_i16x8_extmul_i8x16");
220+
#[ignore] fn wasm_simd_i16x8_q15mulr_sat_s("simd_i16x8_q15mulr_sat_s");
221+
#[ignore] fn wasm_simd_i16x8_sat_arith("simd_i16x8_sat_arith");
222+
#[ignore] fn wasm_simd_i32x4_arith("simd_i32x4_arith");
223+
#[ignore] fn wasm_simd_i32x4_arith2("simd_i32x4_arith2");
224+
#[ignore] fn wasm_simd_i32x4_cmp("simd_i32x4_cmp");
225+
#[ignore] fn wasm_simd_i32x4_dot_i16x8("simd_i32x4_dot_i16x8");
226+
#[ignore] fn wasm_simd_i32x4_extadd_pairwise_i16x8("simd_i32x4_extadd_pairwise_i16x8");
227+
#[ignore] fn wasm_simd_i32x4_extmul_i16x8("simd_i32x4_extmul_i16x8");
228+
#[ignore] fn wasm_simd_i32x4_trunc_sat_f32x4("simd_i32x4_trunc_sat_f32x4");
229+
#[ignore] fn wasm_simd_i32x4_trunc_sat_f64x2("simd_i32x4_trunc_sat_f64x2");
230+
#[ignore] fn wasm_simd_i64x2_arith("simd_i64x2_arith");
231+
#[ignore] fn wasm_simd_i64x2_arith2("simd_i64x2_arith2");
232+
#[ignore] fn wasm_simd_i64x2_cmp("simd_i64x2_cmp");
233+
#[ignore] fn wasm_simd_i64x2_extmul_i32x4("simd_i64x2_extmul_i32x4");
234+
#[ignore] fn wasm_simd_i8x16_arith("simd_i8x16_arith");
235+
#[ignore] fn wasm_simd_i8x16_arith2("simd_i8x16_arith2");
236+
#[ignore] fn wasm_simd_i8x16_cmp("simd_i8x16_cmp");
237+
#[ignore] fn wasm_simd_i8x16_sat_arith("simd_i8x16_sat_arith");
238+
#[ignore] fn wasm_simd_int_to_int_extend("simd_int_to_int_extend");
239+
#[ignore] fn wasm_simd_lane("simd_lane");
240+
#[ignore] fn wasm_simd_linking("simd_linking");
241+
#[ignore] fn wasm_simd_load("simd_load");
242+
#[ignore] fn wasm_simd_load16_lane("simd_load16_lane");
243+
#[ignore] fn wasm_simd_load32_lane("simd_load32_lane");
244+
#[ignore] fn wasm_simd_load64_lane("simd_load64_lane");
245+
#[ignore] fn wasm_simd_load8_lane("simd_load8_lane");
246+
#[ignore] fn wasm_simd_load_extend("simd_load_extend");
247+
#[ignore] fn wasm_simd_load_splat("simd_load_splat");
248+
#[ignore] fn wasm_simd_load_zero("simd_load_zero");
249+
#[ignore] fn wasm_simd_splat("simd_splat");
250+
#[ignore] fn wasm_simd_store("simd_store");
251+
#[ignore] fn wasm_simd_store16_lane("simd_store16_lane");
252+
#[ignore] fn wasm_simd_store32_lane("simd_store32_lane");
253+
#[ignore] fn wasm_simd_store64_lane("simd_store64_lane");
254+
#[ignore] fn wasm_simd_store8_lane("simd_store8_lane");
197255
}
198256
};
199257
}
@@ -269,7 +327,7 @@ macro_rules! expand_tests_mm {
269327
fn wasm_multi_memory_memory_trap1("proposals/multi-memory/memory_trap1");
270328
fn wasm_multi_memory_memory_multi("proposals/multi-memory/memory-multi");
271329
fn wasm_multi_memory_memory("proposals/multi-memory/memory");
272-
// fn wasm_multi_memory_simd_memory("proposals/multi-memory/simd_memory-multi");
330+
#[ignore] fn wasm_multi_memory_simd_memory("proposals/multi-memory/simd_memory-multi");
273331
fn wasm_multi_memory_start0("proposals/multi-memory/start0");
274332
fn wasm_multi_memory_store("proposals/multi-memory/store");
275333
fn wasm_multi_memory_store0("proposals/multi-memory/store0");

0 commit comments

Comments
 (0)