diff options
Diffstat (limited to 'test/passes/trap-mode-js.wast')
-rw-r--r-- | test/passes/trap-mode-js.wast | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/passes/trap-mode-js.wast b/test/passes/trap-mode-js.wast new file mode 100644 index 000000000..5a44e50ec --- /dev/null +++ b/test/passes/trap-mode-js.wast @@ -0,0 +1,26 @@ +(module + (func $test_div (param $0 i32) (param $1 i64) + (drop (i32.div_s (get_local $0) (get_local $0))) + (drop (i32.div_u (get_local $0) (get_local $0))) + (drop (i64.div_s (get_local $1) (get_local $1))) + (drop (i64.div_u (get_local $1) (get_local $1))) + ) + (func $test_rem (param $0 i32) (param $1 i64) + (drop (i32.rem_s (get_local $0) (get_local $0))) + (drop (i32.rem_u (get_local $0) (get_local $0))) + (drop (i64.rem_s (get_local $1) (get_local $1))) + (drop (i64.rem_u (get_local $1) (get_local $1))) + ) + (func $test_f32_to_int (param $0 f32) + (drop (i32.trunc_s/f32 (get_local $0))) + (drop (i32.trunc_u/f32 (get_local $0))) + (drop (i64.trunc_s/f32 (get_local $0))) + (drop (i64.trunc_u/f32 (get_local $0))) + ) + (func $test_f64_to_int (param $0 f64) + (drop (i32.trunc_s/f64 (get_local $0))) + (drop (i32.trunc_u/f64 (get_local $0))) + (drop (i64.trunc_s/f64 (get_local $0))) + (drop (i64.trunc_u/f64 (get_local $0))) + ) +) |