summaryrefslogtreecommitdiff
path: root/test/interp/simd-lane.txt
blob: 14cdb7148b6d9d8c71258112c4fe1dd522f4bb5a (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
;;; TOOL: run-interp
(module
  ;; i8x16 extract lane signed/unsigned
  (func (export  "func_i8x16_extract_lane_s_0") (result i32)
    v128.const i32x4 0x00000001 0x0000000f 0x000000ff 0x0000017f
    i8x16.extract_lane_s 8)
  (func (export  "func_i8x16_extract_lane_u_0") (result i32)
    v128.const i32x4 0x00000001 0x0000000f 0x000000ff 0x0000017f
    i8x16.extract_lane_u 8)

  ;; i16x8 extract lane signed/unsigned
  (func (export  "func_i16x8_extract_lane_s_0") (result i32)
    v128.const i32x4 0x00000001 0x0000000f 0x0000ffff 0x0000017f
    i16x8.extract_lane_s 4)
  (func (export  "func_i16x8_extract_lane_u_0") (result i32)
    v128.const i32x4 0x00000001 0x0000000f 0x0000ffff 0x0000017f
    i16x8.extract_lane_u 4)

  ;; i32x4 extract lane
  (func (export  "func_i32x4_extract_lane_0") (result i32)
    v128.const i32x4 0x00000001 0x0000000f 0x0000ffff 0x0000017f
    i32x4.extract_lane 2)

  ;; i64x2 extract lane
  (func (export  "func_i64x2_extract_lane_0") (result i64)
    v128.const i32x4 0x0000000f 0x00000000 0x0000ffff 0x0000017f
    i64x2.extract_lane 0)

  ;; f32x4 extract lane
  ;; For Floating num:
  ;; 1.5 = 0x3fc00000
  (func (export  "func_f32x4_extract_lane_0") (result f32)
    v128.const i32x4 0x00000001 0x3fc00000 0x0000ffff 0x0000017f
    f32x4.extract_lane 1)

  ;; f64x2 extract lane
  ;; For Double num:
  ;; 4.5 = 0x4012000000000000
  (func (export  "func_f64x2_extract_lane_0") (result f64)
    v128.const i32x4 0x00000000 0x40120000 0x0000ffff 0x0000017f
    f64x2.extract_lane 0)

  ;; i8x16 replace lane
  (func (export  "func_i8x16_replace_lane_0") (result v128)
    v128.const i32x4 0x00000001 0x0000000f 0x000000ff 0x0000017f
    i32.const 0xe5
    i8x16.replace_lane 8)

  ;; i16x8 replace lane
  (func (export  "func_i16x8_replace_lane_0") (result v128)
    v128.const i32x4 0x00000001 0x0000000f 0x0000ffff 0x0000017f
    i32.const 0xe5e6
    i16x8.replace_lane 4)

  ;; i32x4 replace lane
  (func (export  "func_i32x4_replace_lane_0") (result v128)
    v128.const i32x4 0x00000001 0x0000000f 0x0000ffff 0x0000017f
    i32.const 0x12345678
    i32x4.replace_lane 2)

  ;; i64x2 replace lane
  (func (export  "func_i64x2_replace_lane_0") (result v128)
    v128.const i32x4 0x0000000f 0x00000000 0x0000ffff 0x0000017f
    i64.const 0x0000123400005678
    i64x2.replace_lane 0)

  ;; f32x4 replace lane
  ;; For Floating num:
  ;; 1.5 = 0x3fc00000
  (func (export  "func_f32x4_replace_lane_0") (result v128)
    v128.const i32x4 0x00000001 0x00000000 0x0000ffff 0x0000017f
    f32.const 1.5
    f32x4.replace_lane 1)

  ;; f64x2 replace lane
  ;; For Double num:
  ;; 4.5 = 0x4012000000000000
  (func (export  "func_f64x2_replace_lane_0") (result v128)
    v128.const i32x4 0x0000789a 0xff880330 0x0000ffff 0x0000017f
    f64.const 4.5
    f64x2.replace_lane 0)

  ;; v8x16 shuffle
  (func (export  "func_v8x16_shuffle_0") (result v128)
    v128.const i32x4 0xff00ff01 0xff00ff0f 0xff00ffff 0xff00ff7f
    v128.const i32x4 0x00550055 0x00550055 0x00550055 0x00550155
    i8x16.shuffle  16 1 18 3 20 5 22 7 24 9 26 11 28 13 30 15)
)
(;; STDOUT ;;;
func_i8x16_extract_lane_s_0() => i32:4294967295
func_i8x16_extract_lane_u_0() => i32:255
func_i16x8_extract_lane_s_0() => i32:4294967295
func_i16x8_extract_lane_u_0() => i32:65535
func_i32x4_extract_lane_0() => i32:65535
func_i64x2_extract_lane_0() => i64:15
func_f32x4_extract_lane_0() => f32:1.500000
func_f64x2_extract_lane_0() => f64:4.500000
func_i8x16_replace_lane_0() => v128 i32x4:0x00000001 0x0000000f 0x000000e5 0x0000017f
func_i16x8_replace_lane_0() => v128 i32x4:0x00000001 0x0000000f 0x0000e5e6 0x0000017f
func_i32x4_replace_lane_0() => v128 i32x4:0x00000001 0x0000000f 0x12345678 0x0000017f
func_i64x2_replace_lane_0() => v128 i32x4:0x00005678 0x00001234 0x0000ffff 0x0000017f
func_f32x4_replace_lane_0() => v128 i32x4:0x00000001 0x3fc00000 0x0000ffff 0x0000017f
func_f64x2_replace_lane_0() => v128 i32x4:0x00000000 0x40120000 0x0000ffff 0x0000017f
func_v8x16_shuffle_0() => v128 i32x4:0xff55ff55 0xff55ff55 0xff55ff55 0xff55ff55
;;; STDOUT ;;)