summaryrefslogtreecommitdiff
path: root/test/parse/all-features.txt
blob: 3d52a4454c28c2ceb4e47e24aa35b276e27d7b49 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
;;; TOOL: wat2wasm
;;; ARGS: --enable-all
(module
  ;; threads
  (memory 1 1 shared)

  ;; mutable globals
  (global (mut i32) (i32.const 0))

  ;; exceptions
  (event $e)

  ;; annotations
  (func $f (@name "func") (result i32)
    (i32.const 0))

  (func (result i32)
    ;; mutable globals
    i32.const 0
    global.set 0

    ;; saturating float-to-int
    f32.const 0
    i32.trunc_s:sat/f32
    drop

    ;; sign extention
    i32.const 0
    i32.extend8_s
    drop

    ;; simd
    v128.const i32x4 0xff00ff01 0xff00ff0f 0xff00ffff 0xff00ff7f
    v128.const i32x4 0x00550055 0x00550055 0x00550055 0x00550155
    i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
    drop

    ;; threads
    i32.const 0
    i32.const 0
    i32.atomic.rmw.add
    drop

    ;; multi-value
    block (result i32 i32)
      i32.const 0
      i32.const 0
    end
    drop
    drop

    ;; bulk memory
    i32.const 0
    i32.const 0
    i32.const 0
    memory.copy

    ;; reference types
    ref.null func
    drop

    ;; exceptions
    throw $e

    ;; tail call
    return_call $f))