xref: /wasmtime-44.0.1/tests/disas/call-simd.wat (revision 7e0331c2)
1;;! target = "x86_64"
2
3(module
4  (func $main
5    (v128.const i32x4 1 2 3 4)
6    (v128.const i32x4 1 2 3 4)
7    (call $add)
8    drop
9  )
10  (func $add (param $a v128) (param $b v128) (result v128)
11    (local.get $a)
12    (local.get $b)
13    (i32x4.add)
14  )
15  (start $main)
16)
17
18;; function u0:0(i64 vmctx, i64) tail {
19;;     gv0 = vmctx
20;;     gv1 = load.i64 notrap aligned readonly gv0+8
21;;     gv2 = load.i64 notrap aligned gv1+24
22;;     sig0 = (i64 vmctx, i64, i8x16, i8x16) -> i8x16 tail
23;;     fn0 = colocated u0:1 sig0
24;;     const0 = 0x00000004000000030000000200000001
25;;     stack_limit = gv2
26;;
27;;                                 block0(v0: i64, v1: i64):
28;; @0021                               v2 = vconst.i8x16 const0
29;; @0033                               v3 = vconst.i8x16 const0
30;; @0045                               v4 = call fn0(v0, v0, v2, v3)  ; v2 = const0, v3 = const0
31;; @0048                               jump block1
32;;
33;;                                 block1:
34;; @0048                               return
35;; }
36;;
37;; function u0:1(i64 vmctx, i64, i8x16, i8x16) -> i8x16 tail {
38;;     gv0 = vmctx
39;;     gv1 = load.i64 notrap aligned readonly gv0+8
40;;     gv2 = load.i64 notrap aligned gv1+24
41;;     stack_limit = gv2
42;;
43;;                                 block0(v0: i64, v1: i64, v2: i8x16, v3: i8x16):
44;; @004f                               v5 = bitcast.i32x4 little v2
45;; @004f                               v6 = bitcast.i32x4 little v3
46;; @004f                               v7 = iadd v5, v6
47;; @0052                               v8 = bitcast.i8x16 little v7
48;; @0052                               jump block1
49;;
50;;                                 block1:
51;; @0052                               return v8
52;; }
53