github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/internal/integration_test/spectest/v2/testdata/simd_i8x16_arith.wast (about)

     1  ;; Tests for i8x16 arithmetic operations on major boundary values and all special values.
     2  
     3  
     4  (module
     5    (func (export "i8x16.add") (param v128 v128) (result v128) (i8x16.add (local.get 0) (local.get 1)))
     6    (func (export "i8x16.sub") (param v128 v128) (result v128) (i8x16.sub (local.get 0) (local.get 1)))
     7    (func (export "i8x16.neg") (param v128) (result v128) (i8x16.neg (local.get 0)))
     8  )
     9  
    10  
    11  ;; i8x16.add
    12  (assert_return (invoke "i8x16.add" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
    13                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
    14                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
    15  (assert_return (invoke "i8x16.add" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
    16                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
    17                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
    18  (assert_return (invoke "i8x16.add" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
    19                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
    20                                     (v128.const i8x16 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2))
    21  (assert_return (invoke "i8x16.add" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
    22                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
    23                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
    24  (assert_return (invoke "i8x16.add" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
    25                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
    26                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
    27  (assert_return (invoke "i8x16.add" (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1)
    28                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
    29                                     (v128.const i8x16 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2))
    30  (assert_return (invoke "i8x16.add" (v128.const i8x16 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63)
    31                                     (v128.const i8x16 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64))
    32                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
    33  (assert_return (invoke "i8x16.add" (v128.const i8x16 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64)
    34                                     (v128.const i8x16 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64))
    35                                     (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
    36  (assert_return (invoke "i8x16.add" (v128.const i8x16 -63 -63 -63 -63 -63 -63 -63 -63 -63 -63 -63 -63 -63 -63 -63 -63)
    37                                     (v128.const i8x16 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64))
    38                                     (v128.const i8x16 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127))
    39  (assert_return (invoke "i8x16.add" (v128.const i8x16 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64)
    40                                     (v128.const i8x16 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64))
    41                                     (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
    42  (assert_return (invoke "i8x16.add" (v128.const i8x16 -65 -65 -65 -65 -65 -65 -65 -65 -65 -65 -65 -65 -65 -65 -65 -65)
    43                                     (v128.const i8x16 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64))
    44                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
    45  (assert_return (invoke "i8x16.add" (v128.const i8x16 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125)
    46                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
    47                                     (v128.const i8x16 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126))
    48  (assert_return (invoke "i8x16.add" (v128.const i8x16 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126)
    49                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
    50                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
    51  (assert_return (invoke "i8x16.add" (v128.const i8x16 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128)
    52                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
    53                                     (v128.const i8x16 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127))
    54  (assert_return (invoke "i8x16.add" (v128.const i8x16 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126)
    55                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
    56                                     (v128.const i8x16 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127))
    57  (assert_return (invoke "i8x16.add" (v128.const i8x16 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127)
    58                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
    59                                     (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
    60  (assert_return (invoke "i8x16.add" (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128)
    61                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
    62                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
    63  (assert_return (invoke "i8x16.add" (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127)
    64                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
    65                                     (v128.const i8x16 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2))
    66  (assert_return (invoke "i8x16.add" (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128)
    67                                     (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
    68                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
    69  (assert_return (invoke "i8x16.add" (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128)
    70                                     (v128.const i8x16 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127))
    71                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
    72  (assert_return (invoke "i8x16.add" (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255)
    73                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
    74                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
    75  (assert_return (invoke "i8x16.add" (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255)
    76                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
    77                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
    78  (assert_return (invoke "i8x16.add" (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255)
    79                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
    80                                     (v128.const i8x16 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2))
    81  (assert_return (invoke "i8x16.add" (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255)
    82                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
    83                                     (v128.const i8x16 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126))
    84  (assert_return (invoke "i8x16.add" (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255)
    85                                     (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
    86                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
    87  (assert_return (invoke "i8x16.add" (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255)
    88                                     (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255))
    89                                     (v128.const i8x16 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2))
    90  (assert_return (invoke "i8x16.add" (v128.const i8x16 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f)
    91                                     (v128.const i8x16 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40))
    92                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
    93  (assert_return (invoke "i8x16.add" (v128.const i8x16 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40)
    94                                     (v128.const i8x16 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40))
    95                                     (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
    96  (assert_return (invoke "i8x16.add" (v128.const i8x16 -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f)
    97                                     (v128.const i8x16 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40))
    98                                     (v128.const i8x16 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127))
    99  (assert_return (invoke "i8x16.add" (v128.const i8x16 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40)
   100                                     (v128.const i8x16 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40))
   101                                     (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
   102  (assert_return (invoke "i8x16.add" (v128.const i8x16 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40)
   103                                     (v128.const i8x16 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41))
   104                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
   105  (assert_return (invoke "i8x16.add" (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)
   106                                     (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f))
   107                                     (v128.const i8x16 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2))
   108  (assert_return (invoke "i8x16.add" (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)
   109                                     (v128.const i8x16 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01))
   110                                     (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
   111  (assert_return (invoke "i8x16.add" (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   112                                     (v128.const i8x16 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01))
   113                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
   114  (assert_return (invoke "i8x16.add" (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)
   115                                     (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
   116                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   117  (assert_return (invoke "i8x16.add" (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   118                                     (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
   119                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   120  (assert_return (invoke "i8x16.add" (v128.const i8x16 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)
   121                                     (v128.const i8x16 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01))
   122                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   123  (assert_return (invoke "i8x16.add" (v128.const i8x16 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)
   124                                     (v128.const i8x16 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff))
   125                                     (v128.const i8x16 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2))
   126  (assert_return (invoke "i8x16.add" (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)
   127                                     (v128.const i16x8 0x8080 0x8080 0x8080 0x8080 0x8080 0x8080 0x8080 0x8080))
   128                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   129  (assert_return (invoke "i8x16.add" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   130                                     (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535))
   131                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   132  (assert_return (invoke "i8x16.add" (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)
   133                                     (v128.const i32x4 0x80808080 0x80808080 0x80808080 0x80808080))
   134                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   135  (assert_return (invoke "i8x16.add" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   136                                     (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff))
   137                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   138  (assert_return (invoke "i8x16.add" (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   139                                     (v128.const f32x4 +0.0 +0.0 +0.0 +0.0))
   140                                     (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
   141  (assert_return (invoke "i8x16.add" (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   142                                     (v128.const f32x4 -0.0 -0.0 -0.0 -0.0))
   143                                     (v128.const i8x16 0x80 0x80 0x80 0 0x80 0x80 0x80 0 0x80 0x80 0x80 0 0x80 0x80 0x80 0))
   144  (assert_return (invoke "i8x16.add" (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   145                                     (v128.const f32x4 1.0 1.0 1.0 1.0))
   146                                     (v128.const i8x16 0x80 0x80 0 0xbf 0x80 0x80 0 0xbf 0x80 0x80 0 0xbf 0x80 0x80 0 0xbf))
   147  (assert_return (invoke "i8x16.add" (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   148                                     (v128.const f32x4 -1.0 -1.0 -1.0 -1.0))
   149                                     (v128.const i8x16 0x80 0x80 0 0x3f 0x80 0x80 0 0x3f 0x80 0x80 0 0x3f 0x80 0x80 0 0x3f))
   150  (assert_return (invoke "i8x16.add" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   151                                     (v128.const f32x4 +inf +inf +inf +inf))
   152                                     (v128.const i8x16 0x01 0x01 0x81 0x80 0x01 0x01 0x81 0x80 0x01 0x01 0x81 0x80 0x01 0x01 0x81 0x80))
   153  (assert_return (invoke "i8x16.add" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   154                                     (v128.const f32x4 -inf -inf -inf -inf))
   155                                     (v128.const i8x16 0x01 0x01 0x81 0 0x01 0x01 0x81 0 0x01 0x01 0x81 0 0x01 0x01 0x81 0))
   156  (assert_return (invoke "i8x16.add" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   157                                     (v128.const f32x4 nan nan nan nan))
   158                                     (v128.const i8x16 0x01 0x01 0xc1 0x80 0x01 0x01 0xc1 0x80 0x01 0x01 0xc1 0x80 0x01 0x01 0xc1 0x80))
   159  (assert_return (invoke "i8x16.add" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
   160                                     (v128.const i8x16 0 0xff 0xfe 0xfd 0xfc 0xfb 0xfa 0xf9 0xf8 0xf7 0xf6 0xf5 0xf4 0xf3 0xf2 0xf1))
   161                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   162  (assert_return (invoke "i8x16.add" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
   163                                     (v128.const i8x16 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30))
   164                                     (v128.const i8x16 0 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45))
   165  
   166  ;; i8x16.sub
   167  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   168                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   169                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   170  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   171                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   172                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   173  (assert_return (invoke "i8x16.sub" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   174                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   175                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   176  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   177                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   178                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   179  (assert_return (invoke "i8x16.sub" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   180                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   181                                     (v128.const i8x16 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2))
   182  (assert_return (invoke "i8x16.sub" (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1)
   183                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   184                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   185  (assert_return (invoke "i8x16.sub" (v128.const i8x16 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63)
   186                                     (v128.const i8x16 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64))
   187                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   188  (assert_return (invoke "i8x16.sub" (v128.const i8x16 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64)
   189                                     (v128.const i8x16 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64))
   190                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   191  (assert_return (invoke "i8x16.sub" (v128.const i8x16 -63 -63 -63 -63 -63 -63 -63 -63 -63 -63 -63 -63 -63 -63 -63 -63)
   192                                     (v128.const i8x16 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64))
   193                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   194  (assert_return (invoke "i8x16.sub" (v128.const i8x16 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64)
   195                                     (v128.const i8x16 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64))
   196                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   197  (assert_return (invoke "i8x16.sub" (v128.const i8x16 -65 -65 -65 -65 -65 -65 -65 -65 -65 -65 -65 -65 -65 -65 -65 -65)
   198                                     (v128.const i8x16 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64 -64))
   199                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   200  (assert_return (invoke "i8x16.sub" (v128.const i8x16 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125)
   201                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   202                                     (v128.const i8x16 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124))
   203  (assert_return (invoke "i8x16.sub" (v128.const i8x16 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126)
   204                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   205                                     (v128.const i8x16 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125))
   206  (assert_return (invoke "i8x16.sub" (v128.const i8x16 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128)
   207                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   208                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
   209  (assert_return (invoke "i8x16.sub" (v128.const i8x16 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126)
   210                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   211                                     (v128.const i8x16 -125 -125 -125 -125 -125 -125 -125 -125 -125 -125 -125 -125 -125 -125 -125 -125))
   212  (assert_return (invoke "i8x16.sub" (v128.const i8x16 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127)
   213                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   214                                     (v128.const i8x16 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126))
   215  (assert_return (invoke "i8x16.sub" (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128)
   216                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   217                                     (v128.const i8x16 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127))
   218  (assert_return (invoke "i8x16.sub" (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127)
   219                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
   220                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   221  (assert_return (invoke "i8x16.sub" (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128)
   222                                     (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
   223                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   224  (assert_return (invoke "i8x16.sub" (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128)
   225                                     (v128.const i8x16 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127))
   226                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   227  (assert_return (invoke "i8x16.sub" (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255)
   228                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   229                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   230  (assert_return (invoke "i8x16.sub" (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255)
   231                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   232                                     (v128.const i8x16 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2))
   233  (assert_return (invoke "i8x16.sub" (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255)
   234                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   235                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   236  (assert_return (invoke "i8x16.sub" (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255)
   237                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
   238                                     (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
   239  (assert_return (invoke "i8x16.sub" (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255)
   240                                     (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
   241                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
   242  (assert_return (invoke "i8x16.sub" (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255)
   243                                     (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255))
   244                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   245  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f)
   246                                     (v128.const i8x16 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40))
   247                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   248  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40)
   249                                     (v128.const i8x16 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40))
   250                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   251  (assert_return (invoke "i8x16.sub" (v128.const i8x16 -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f -0x3f)
   252                                     (v128.const i8x16 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40))
   253                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   254  (assert_return (invoke "i8x16.sub" (v128.const i8x16 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40)
   255                                     (v128.const i8x16 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40))
   256                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   257  (assert_return (invoke "i8x16.sub" (v128.const i8x16 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40 -0x40)
   258                                     (v128.const i8x16 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41 -0x41))
   259                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   260  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)
   261                                     (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f))
   262                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   263  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)
   264                                     (v128.const i8x16 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01))
   265                                     (v128.const i8x16 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126))
   266  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   267                                     (v128.const i8x16 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01))
   268                                     (v128.const i8x16 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127))
   269  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)
   270                                     (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
   271                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   272  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   273                                     (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
   274                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   275  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)
   276                                     (v128.const i8x16 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01))
   277                                     (v128.const i8x16 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2))
   278  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)
   279                                     (v128.const i8x16 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff))
   280                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   281  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)
   282                                     (v128.const i16x8 0x8080 0x8080 0x8080 0x8080 0x8080 0x8080 0x8080 0x8080))
   283                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   284  (assert_return (invoke "i8x16.sub" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   285                                     (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535))
   286                                     (v128.const i8x16 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2))
   287  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)
   288                                     (v128.const i32x4 0x80808080 0x80808080 0x80808080 0x80808080))
   289                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   290  (assert_return (invoke "i8x16.sub" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   291                                     (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff))
   292                                     (v128.const i8x16 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2))
   293  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   294                                     (v128.const f32x4 +0.0 +0.0 +0.0 +0.0))
   295                                     (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
   296  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   297                                     (v128.const f32x4 -0.0 -0.0 -0.0 -0.0))
   298                                     (v128.const i8x16 0x80 0x80 0x80 0 0x80 0x80 0x80 0 0x80 0x80 0x80 0 0x80 0x80 0x80 0))
   299  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   300                                     (v128.const f32x4 1.0 1.0 1.0 1.0))
   301                                     (v128.const i8x16 0x80 0x80 0 0x41 0x80 0x80 0 0x41 0x80 0x80 0 0x41 0x80 0x80 0 0x41))
   302  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   303                                     (v128.const f32x4 -1.0 -1.0 -1.0 -1.0))
   304                                     (v128.const i8x16 0x80 0x80 0 0xc1 0x80 0x80 0 0xc1 0x80 0x80 0 0xc1 0x80 0x80 0 0xc1))
   305  (assert_return (invoke "i8x16.sub" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   306                                     (v128.const f32x4 +inf +inf +inf +inf))
   307                                     (v128.const i8x16 0x01 0x01 0x81 0x82 0x01 0x01 0x81 0x82 0x01 0x01 0x81 0x82 0x01 0x01 0x81 0x82))
   308  (assert_return (invoke "i8x16.sub" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   309                                     (v128.const f32x4 -inf -inf -inf -inf))
   310                                     (v128.const i8x16 0x01 0x01 0x81 0x02 0x01 0x01 0x81 0x02 0x01 0x01 0x81 0x02 0x01 0x01 0x81 0x02))
   311  (assert_return (invoke "i8x16.sub" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   312                                     (v128.const f32x4 nan nan nan nan))
   313                                     (v128.const i8x16 0x01 0x01 0x41 0x82 0x01 0x01 0x41 0x82 0x01 0x01 0x41 0x82 0x01 0x01 0x41 0x82))
   314  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
   315                                     (v128.const i8x16 0 0xff 0xfe 0xfd 0xfc 0xfb 0xfa 0xf9 0xf8 0xf7 0xf6 0xf5 0xf4 0xf3 0xf2 0xf1))
   316                                     (v128.const i8x16 0 0x02 0x04 0x06 0x08 0x0a 0x0c 0x0e 0x10 0x12 0x14 0x16 0x18 0x1a 0x1c 0x1e))
   317  (assert_return (invoke "i8x16.sub" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
   318                                     (v128.const i8x16 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30))
   319                                     (v128.const i8x16 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15))
   320  
   321  ;; i8x16.neg
   322  (assert_return (invoke "i8x16.neg" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   323                                     (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   324  (assert_return (invoke "i8x16.neg" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   325                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   326  (assert_return (invoke "i8x16.neg" (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   327                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   328  (assert_return (invoke "i8x16.neg" (v128.const i8x16 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126))
   329                                     (v128.const i8x16 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126 -126))
   330  (assert_return (invoke "i8x16.neg" (v128.const i8x16 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127))
   331                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
   332  (assert_return (invoke "i8x16.neg" (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
   333                                     (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
   334  (assert_return (invoke "i8x16.neg" (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
   335                                     (v128.const i8x16 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127))
   336  (assert_return (invoke "i8x16.neg" (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255))
   337                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   338  (assert_return (invoke "i8x16.neg" (v128.const i8x16 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01))
   339                                     (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   340  (assert_return (invoke "i8x16.neg" (v128.const i8x16 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01))
   341                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   342  (assert_return (invoke "i8x16.neg" (v128.const i8x16 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80))
   343                                     (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
   344  (assert_return (invoke "i8x16.neg" (v128.const i8x16 -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f))
   345                                     (v128.const i8x16 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127))
   346  (assert_return (invoke "i8x16.neg" (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f))
   347                                     (v128.const i8x16 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127 -127))
   348  (assert_return (invoke "i8x16.neg" (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
   349                                     (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128))
   350  (assert_return (invoke "i8x16.neg" (v128.const i8x16 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff))
   351                                     (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   352  
   353  ;; type check
   354  (assert_invalid (module (func (result v128) (i8x16.neg (i32.const 0)))) "type mismatch")
   355  (assert_invalid (module (func (result v128) (i8x16.add (i32.const 0) (f32.const 0.0)))) "type mismatch")
   356  (assert_invalid (module (func (result v128) (i8x16.sub (i32.const 0) (f32.const 0.0)))) "type mismatch")
   357  
   358  ;; Test operation with empty argument
   359  
   360  (assert_invalid
   361    (module
   362      (func $i8x16.neg-arg-empty (result v128)
   363        (i8x16.neg)
   364      )
   365    )
   366    "type mismatch"
   367  )
   368  (assert_invalid
   369    (module
   370      (func $i8x16.add-1st-arg-empty (result v128)
   371        (i8x16.add (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   372      )
   373    )
   374    "type mismatch"
   375  )
   376  (assert_invalid
   377    (module
   378      (func $i8x16.add-arg-empty (result v128)
   379        (i8x16.add)
   380      )
   381    )
   382    "type mismatch"
   383  )
   384  (assert_invalid
   385    (module
   386      (func $i8x16.sub-1st-arg-empty (result v128)
   387        (i8x16.sub (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   388      )
   389    )
   390    "type mismatch"
   391  )
   392  (assert_invalid
   393    (module
   394      (func $i8x16.sub-arg-empty (result v128)
   395        (i8x16.sub)
   396      )
   397    )
   398    "type mismatch"
   399  )
   400  
   401  ;; combination
   402  (module
   403    (func (export "add-sub") (param v128 v128 v128) (result v128)
   404      (i8x16.add (i8x16.sub (local.get 0) (local.get 1))(local.get 2)))
   405    (func (export "sub-add") (param v128 v128 v128) (result v128)
   406      (i8x16.sub (i8x16.add (local.get 0) (local.get 1))(local.get 2)))
   407    (func (export "add-neg") (param v128 v128) (result v128)
   408      (i8x16.add (i8x16.neg (local.get 0)) (local.get 1)))
   409    (func (export "sub-neg") (param v128 v128) (result v128)
   410      (i8x16.sub (i8x16.neg (local.get 0)) (local.get 1)))
   411  )
   412  
   413  (assert_return (invoke "add-sub" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
   414                                   (v128.const i8x16 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30)
   415                                   (v128.const i8x16 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30))
   416                                   (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))
   417  (assert_return (invoke "sub-add" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
   418                                   (v128.const i8x16 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30)
   419                                   (v128.const i8x16 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30))
   420                                   (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))
   421  (assert_return (invoke "add-neg" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
   422                                   (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))
   423                                   (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   424  (assert_return (invoke "sub-neg" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
   425                                   (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))
   426                                   (v128.const i8x16 0 -2 -4 -6 -8 -10 -12 -14 -16 -18 -20 -22 -24 -26 -28 -30))