github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/internal/integration_test/spectest/v2/testdata/simd_i32x4_extadd_pairwise_i16x8.wast (about)

     1  ;; Tests for i32x4 arithmetic operations on major boundary values and all special values.
     2  
     3  
     4  (module
     5    (func (export "i32x4.extadd_pairwise_i16x8_s") (param v128) (result v128) (i32x4.extadd_pairwise_i16x8_s (local.get 0)))
     6    (func (export "i32x4.extadd_pairwise_i16x8_u") (param v128) (result v128) (i32x4.extadd_pairwise_i16x8_u (local.get 0)))
     7  )
     8  
     9  
    10  ;; i32x4.extadd_pairwise_i16x8_s
    11  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_s" (v128.const i16x8 0 0 0 0 0 0 0 0))
    12                                                         (v128.const i32x4 0 0 0 0))
    13  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_s" (v128.const i16x8 1 1 1 1 1 1 1 1))
    14                                                         (v128.const i32x4 2 2 2 2))
    15  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_s" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
    16                                                         (v128.const i32x4 -2 -2 -2 -2))
    17  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_s" (v128.const i16x8 32766 32766 32766 32766 32766 32766 32766 32766))
    18                                                         (v128.const i32x4 65532 65532 65532 65532))
    19  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_s" (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767))
    20                                                         (v128.const i32x4 -65534 -65534 -65534 -65534))
    21  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_s" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
    22                                                         (v128.const i32x4 -65536 -65536 -65536 -65536))
    23  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_s" (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767))
    24                                                         (v128.const i32x4 65534 65534 65534 65534))
    25  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535))
    26                                                         (v128.const i32x4 -2 -2 -2 -2))
    27  
    28  ;; i32x4.extadd_pairwise_i16x8_u
    29  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_u" (v128.const i16x8 0 0 0 0 0 0 0 0))
    30                                                         (v128.const i32x4 0 0 0 0))
    31  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_u" (v128.const i16x8 1 1 1 1 1 1 1 1))
    32                                                         (v128.const i32x4 2 2 2 2))
    33  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_u" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
    34                                                         (v128.const i32x4 131070 131070 131070 131070))
    35  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_u" (v128.const i16x8 32766 32766 32766 32766 32766 32766 32766 32766))
    36                                                         (v128.const i32x4 65532 65532 65532 65532))
    37  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_u" (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767))
    38                                                         (v128.const i32x4 65538 65538 65538 65538))
    39  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_u" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
    40                                                         (v128.const i32x4 65536 65536 65536 65536))
    41  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_u" (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767))
    42                                                         (v128.const i32x4 65534 65534 65534 65534))
    43  (assert_return (invoke "i32x4.extadd_pairwise_i16x8_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535))
    44                                                         (v128.const i32x4 131070 131070 131070 131070))
    45  
    46  ;; type check
    47  (assert_invalid (module (func (result v128) (i32x4.extadd_pairwise_i16x8_s (i32.const 0)))) "type mismatch")
    48  (assert_invalid (module (func (result v128) (i32x4.extadd_pairwise_i16x8_u (i32.const 0)))) "type mismatch")
    49  
    50  ;; Test operation with empty argument
    51  
    52  (assert_invalid
    53    (module
    54      (func $i32x4.extadd_pairwise_i16x8_s-arg-empty (result v128)
    55        (i32x4.extadd_pairwise_i16x8_s)
    56      )
    57    )
    58    "type mismatch"
    59  )
    60  (assert_invalid
    61    (module
    62      (func $i32x4.extadd_pairwise_i16x8_u-arg-empty (result v128)
    63        (i32x4.extadd_pairwise_i16x8_u)
    64      )
    65    )
    66    "type mismatch"
    67  )
    68