summaryrefslogtreecommitdiff
path: root/test/passes/trap-mode-clamp.wast
blob: 5a44e50ec433e6196508ea2312f8e38fe2004551 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)))
 )
)