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

     1  ;; Tests for i32x4 arithmetic operations on major boundary values and all special values.
     2  
     3  
     4  (module
     5    (func (export "i32x4.add") (param v128 v128) (result v128) (i32x4.add (local.get 0) (local.get 1)))
     6    (func (export "i32x4.sub") (param v128 v128) (result v128) (i32x4.sub (local.get 0) (local.get 1)))
     7    (func (export "i32x4.mul") (param v128 v128) (result v128) (i32x4.mul (local.get 0) (local.get 1)))
     8    (func (export "i32x4.neg") (param v128) (result v128) (i32x4.neg (local.get 0)))
     9  )
    10  
    11  
    12  ;; i32x4.add
    13  (assert_return (invoke "i32x4.add" (v128.const i32x4 0 0 0 0)
    14                                     (v128.const i32x4 0 0 0 0))
    15                                     (v128.const i32x4 0 0 0 0))
    16  (assert_return (invoke "i32x4.add" (v128.const i32x4 0 0 0 0)
    17                                     (v128.const i32x4 1 1 1 1))
    18                                     (v128.const i32x4 1 1 1 1))
    19  (assert_return (invoke "i32x4.add" (v128.const i32x4 1 1 1 1)
    20                                     (v128.const i32x4 1 1 1 1))
    21                                     (v128.const i32x4 2 2 2 2))
    22  (assert_return (invoke "i32x4.add" (v128.const i32x4 0 0 0 0)
    23                                     (v128.const i32x4 -1 -1 -1 -1))
    24                                     (v128.const i32x4 -1 -1 -1 -1))
    25  (assert_return (invoke "i32x4.add" (v128.const i32x4 1 1 1 1)
    26                                     (v128.const i32x4 -1 -1 -1 -1))
    27                                     (v128.const i32x4 0 0 0 0))
    28  (assert_return (invoke "i32x4.add" (v128.const i32x4 -1 -1 -1 -1)
    29                                     (v128.const i32x4 -1 -1 -1 -1))
    30                                     (v128.const i32x4 -2 -2 -2 -2))
    31  (assert_return (invoke "i32x4.add" (v128.const i32x4 1073741823 1073741823 1073741823 1073741823)
    32                                     (v128.const i32x4 1073741824 1073741824 1073741824 1073741824))
    33                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
    34  (assert_return (invoke "i32x4.add" (v128.const i32x4 1073741824 1073741824 1073741824 1073741824)
    35                                     (v128.const i32x4 1073741824 1073741824 1073741824 1073741824))
    36                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
    37  (assert_return (invoke "i32x4.add" (v128.const i32x4 -1073741823 -1073741823 -1073741823 -1073741823)
    38                                     (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824))
    39                                     (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
    40  (assert_return (invoke "i32x4.add" (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824)
    41                                     (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824))
    42                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
    43  (assert_return (invoke "i32x4.add" (v128.const i32x4 -1073741825 -1073741825 -1073741825 -1073741825)
    44                                     (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824))
    45                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
    46  (assert_return (invoke "i32x4.add" (v128.const i32x4 2147483645 2147483645 2147483645 2147483645)
    47                                     (v128.const i32x4 1 1 1 1))
    48                                     (v128.const i32x4 2147483646 2147483646 2147483646 2147483646))
    49  (assert_return (invoke "i32x4.add" (v128.const i32x4 2147483646 2147483646 2147483646 2147483646)
    50                                     (v128.const i32x4 1 1 1 1))
    51                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
    52  (assert_return (invoke "i32x4.add" (v128.const i32x4 2147483648 2147483648 2147483648 2147483648)
    53                                     (v128.const i32x4 1 1 1 1))
    54                                     (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
    55  (assert_return (invoke "i32x4.add" (v128.const i32x4 -2147483646 -2147483646 -2147483646 -2147483646)
    56                                     (v128.const i32x4 -1 -1 -1 -1))
    57                                     (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
    58  (assert_return (invoke "i32x4.add" (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647)
    59                                     (v128.const i32x4 -1 -1 -1 -1))
    60                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
    61  (assert_return (invoke "i32x4.add" (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648)
    62                                     (v128.const i32x4 -1 -1 -1 -1))
    63                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
    64  (assert_return (invoke "i32x4.add" (v128.const i32x4 2147483647 2147483647 2147483647 2147483647)
    65                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
    66                                     (v128.const i32x4 -2 -2 -2 -2))
    67  (assert_return (invoke "i32x4.add" (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648)
    68                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
    69                                     (v128.const i32x4 0 0 0 0))
    70  (assert_return (invoke "i32x4.add" (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648)
    71                                     (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
    72                                     (v128.const i32x4 1 1 1 1))
    73  (assert_return (invoke "i32x4.add" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
    74                                     (v128.const i32x4 0 0 0 0))
    75                                     (v128.const i32x4 -1 -1 -1 -1))
    76  (assert_return (invoke "i32x4.add" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
    77                                     (v128.const i32x4 1 1 1 1))
    78                                     (v128.const i32x4 0 0 0 0))
    79  (assert_return (invoke "i32x4.add" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
    80                                     (v128.const i32x4 -1 -1 -1 -1))
    81                                     (v128.const i32x4 -2 -2 -2 -2))
    82  (assert_return (invoke "i32x4.add" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
    83                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
    84                                     (v128.const i32x4 2147483646 2147483646 2147483646 2147483646))
    85  (assert_return (invoke "i32x4.add" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
    86                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
    87                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
    88  (assert_return (invoke "i32x4.add" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
    89                                     (v128.const i32x4 4294967295 4294967295 4294967295 4294967295))
    90                                     (v128.const i32x4 -2 -2 -2 -2))
    91  (assert_return (invoke "i32x4.add" (v128.const i32x4 0x3fffffff 0x3fffffff 0x3fffffff 0x3fffffff)
    92                                     (v128.const i32x4 0x40000000 0x40000000 0x40000000 0x40000000))
    93                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
    94  (assert_return (invoke "i32x4.add" (v128.const i32x4 0x40000000 0x40000000 0x40000000 0x40000000)
    95                                     (v128.const i32x4 0x40000000 0x40000000 0x40000000 0x40000000))
    96                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
    97  (assert_return (invoke "i32x4.add" (v128.const i32x4 -0x3fffffff -0x3fffffff -0x3fffffff -0x3fffffff)
    98                                     (v128.const i32x4 -0x40000000 -0x40000000 -0x40000000 -0x40000000))
    99                                     (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
   100  (assert_return (invoke "i32x4.add" (v128.const i32x4 -0x40000000 -0x40000000 -0x40000000 -0x40000000)
   101                                     (v128.const i32x4 -0x40000000 -0x40000000 -0x40000000 -0x40000000))
   102                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   103  (assert_return (invoke "i32x4.add" (v128.const i32x4 -0x40000000 -0x40000000 -0x40000000 -0x40000000)
   104                                     (v128.const i32x4 -0x40000001 -0x40000001 -0x40000001 -0x40000001))
   105                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
   106  (assert_return (invoke "i32x4.add" (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff)
   107                                     (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff))
   108                                     (v128.const i32x4 -2 -2 -2 -2))
   109  (assert_return (invoke "i32x4.add" (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff)
   110                                     (v128.const i32x4 0x01 0x01 0x01 0x01))
   111                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   112  (assert_return (invoke "i32x4.add" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   113                                     (v128.const i32x4 -0x01 -0x01 -0x01 -0x01))
   114                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
   115  (assert_return (invoke "i32x4.add" (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff)
   116                                     (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000))
   117                                     (v128.const i32x4 -1 -1 -1 -1))
   118  (assert_return (invoke "i32x4.add" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   119                                     (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000))
   120                                     (v128.const i32x4 0 0 0 0))
   121  (assert_return (invoke "i32x4.add" (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff)
   122                                     (v128.const i32x4 0x01 0x01 0x01 0x01))
   123                                     (v128.const i32x4 0 0 0 0))
   124  (assert_return (invoke "i32x4.add" (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff)
   125                                     (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff))
   126                                     (v128.const i32x4 -2 -2 -2 -2))
   127  (assert_return (invoke "i32x4.add" (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff)
   128                                     (v128.const i8x16 0 0 0 0x80 0 0 0 0x80 0 0 0 0x80 0 0 0 0x80))
   129                                     (v128.const i32x4 -1 -1 -1 -1))
   130  (assert_return (invoke "i32x4.add" (v128.const i32x4 1 1 1 1)
   131                                     (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255))
   132                                     (v128.const i32x4 0 0 0 0))
   133  (assert_return (invoke "i32x4.add" (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff)
   134                                     (v128.const i16x8 0 0x8000 0 0x8000 0 0x8000 0 0x8000))
   135                                     (v128.const i32x4 -1 -1 -1 -1))
   136  (assert_return (invoke "i32x4.add" (v128.const i32x4 1 1 1 1)
   137                                     (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff))
   138                                     (v128.const i32x4 0 0 0 0))
   139  (assert_return (invoke "i32x4.add" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   140                                     (v128.const f32x4 +0.0 +0.0 +0.0 +0.0))
   141                                     (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000))
   142  (assert_return (invoke "i32x4.add" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   143                                     (v128.const f32x4 -0.0 -0.0 -0.0 -0.0))
   144                                     (v128.const i32x4 0 0 0 0))
   145  (assert_return (invoke "i32x4.add" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   146                                     (v128.const f32x4 1.0 1.0 1.0 1.0))
   147                                     (v128.const i32x4 0xbf800000 0xbf800000 0xbf800000 0xbf800000))
   148  (assert_return (invoke "i32x4.add" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   149                                     (v128.const f32x4 -1.0 -1.0 -1.0 -1.0))
   150                                     (v128.const i32x4 0x3f800000 0x3f800000 0x3f800000 0x3f800000))
   151  (assert_return (invoke "i32x4.add" (v128.const i32x4 1 1 1 1)
   152                                     (v128.const f32x4 +inf +inf +inf +inf))
   153                                     (v128.const i32x4 0x7f800001 0x7f800001 0x7f800001 0x7f800001))
   154  (assert_return (invoke "i32x4.add" (v128.const i32x4 1 1 1 1)
   155                                     (v128.const f32x4 -inf -inf -inf -inf))
   156                                     (v128.const i32x4 0xff800001 0xff800001 0xff800001 0xff800001))
   157  (assert_return (invoke "i32x4.add" (v128.const i32x4 1 1 1 1)
   158                                     (v128.const f32x4 nan nan nan nan))
   159                                     (v128.const i32x4 0x7fc00001 0x7fc00001 0x7fc00001 0x7fc00001))
   160  (assert_return (invoke "i32x4.add" (v128.const i32x4 0 1 2 3)
   161                                     (v128.const i32x4 0 0xffffffff 0xfffffffe 0xfffffffd))
   162                                     (v128.const i32x4 0 0 0 0))
   163  (assert_return (invoke "i32x4.add" (v128.const i32x4 0 1 2 3)
   164                                     (v128.const i32x4 0 2 4 6))
   165                                     (v128.const i32x4 0 3 6 9))
   166  (assert_return (invoke "i32x4.add" (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890)
   167                                     (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890))
   168                                     (v128.const i32x4 02_469_135_780 02_469_135_780 02_469_135_780 02_469_135_780))
   169  (assert_return (invoke "i32x4.add" (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678)
   170                                     (v128.const i32x4 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef))
   171                                     (v128.const i32x4 0x0_a2e0_2467 0x0_a2e0_2467 0x0_a2e0_2467 0x0_a2e0_2467))
   172  
   173  ;; i32x4.sub
   174  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0 0 0 0)
   175                                     (v128.const i32x4 0 0 0 0))
   176                                     (v128.const i32x4 0 0 0 0))
   177  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0 0 0 0)
   178                                     (v128.const i32x4 1 1 1 1))
   179                                     (v128.const i32x4 -1 -1 -1 -1))
   180  (assert_return (invoke "i32x4.sub" (v128.const i32x4 1 1 1 1)
   181                                     (v128.const i32x4 1 1 1 1))
   182                                     (v128.const i32x4 0 0 0 0))
   183  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0 0 0 0)
   184                                     (v128.const i32x4 -1 -1 -1 -1))
   185                                     (v128.const i32x4 1 1 1 1))
   186  (assert_return (invoke "i32x4.sub" (v128.const i32x4 1 1 1 1)
   187                                     (v128.const i32x4 -1 -1 -1 -1))
   188                                     (v128.const i32x4 2 2 2 2))
   189  (assert_return (invoke "i32x4.sub" (v128.const i32x4 -1 -1 -1 -1)
   190                                     (v128.const i32x4 -1 -1 -1 -1))
   191                                     (v128.const i32x4 0 0 0 0))
   192  (assert_return (invoke "i32x4.sub" (v128.const i32x4 1073741823 1073741823 1073741823 1073741823)
   193                                     (v128.const i32x4 1073741824 1073741824 1073741824 1073741824))
   194                                     (v128.const i32x4 -1 -1 -1 -1))
   195  (assert_return (invoke "i32x4.sub" (v128.const i32x4 1073741824 1073741824 1073741824 1073741824)
   196                                     (v128.const i32x4 1073741824 1073741824 1073741824 1073741824))
   197                                     (v128.const i32x4 0 0 0 0))
   198  (assert_return (invoke "i32x4.sub" (v128.const i32x4 -1073741823 -1073741823 -1073741823 -1073741823)
   199                                     (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824))
   200                                     (v128.const i32x4 1 1 1 1))
   201  (assert_return (invoke "i32x4.sub" (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824)
   202                                     (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824))
   203                                     (v128.const i32x4 0 0 0 0))
   204  (assert_return (invoke "i32x4.sub" (v128.const i32x4 -1073741825 -1073741825 -1073741825 -1073741825)
   205                                     (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824))
   206                                     (v128.const i32x4 -1 -1 -1 -1))
   207  (assert_return (invoke "i32x4.sub" (v128.const i32x4 2147483645 2147483645 2147483645 2147483645)
   208                                     (v128.const i32x4 1 1 1 1))
   209                                     (v128.const i32x4 2147483644 2147483644 2147483644 2147483644))
   210  (assert_return (invoke "i32x4.sub" (v128.const i32x4 2147483646 2147483646 2147483646 2147483646)
   211                                     (v128.const i32x4 1 1 1 1))
   212                                     (v128.const i32x4 2147483645 2147483645 2147483645 2147483645))
   213  (assert_return (invoke "i32x4.sub" (v128.const i32x4 2147483648 2147483648 2147483648 2147483648)
   214                                     (v128.const i32x4 1 1 1 1))
   215                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
   216  (assert_return (invoke "i32x4.sub" (v128.const i32x4 -2147483646 -2147483646 -2147483646 -2147483646)
   217                                     (v128.const i32x4 -1 -1 -1 -1))
   218                                     (v128.const i32x4 -2147483645 -2147483645 -2147483645 -2147483645))
   219  (assert_return (invoke "i32x4.sub" (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647)
   220                                     (v128.const i32x4 -1 -1 -1 -1))
   221                                     (v128.const i32x4 -2147483646 -2147483646 -2147483646 -2147483646))
   222  (assert_return (invoke "i32x4.sub" (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648)
   223                                     (v128.const i32x4 -1 -1 -1 -1))
   224                                     (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
   225  (assert_return (invoke "i32x4.sub" (v128.const i32x4 2147483647 2147483647 2147483647 2147483647)
   226                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
   227                                     (v128.const i32x4 0 0 0 0))
   228  (assert_return (invoke "i32x4.sub" (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648)
   229                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   230                                     (v128.const i32x4 0 0 0 0))
   231  (assert_return (invoke "i32x4.sub" (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648)
   232                                     (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
   233                                     (v128.const i32x4 -1 -1 -1 -1))
   234  (assert_return (invoke "i32x4.sub" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
   235                                     (v128.const i32x4 0 0 0 0))
   236                                     (v128.const i32x4 -1 -1 -1 -1))
   237  (assert_return (invoke "i32x4.sub" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
   238                                     (v128.const i32x4 1 1 1 1))
   239                                     (v128.const i32x4 -2 -2 -2 -2))
   240  (assert_return (invoke "i32x4.sub" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
   241                                     (v128.const i32x4 -1 -1 -1 -1))
   242                                     (v128.const i32x4 0 0 0 0))
   243  (assert_return (invoke "i32x4.sub" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
   244                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
   245                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   246  (assert_return (invoke "i32x4.sub" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
   247                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   248                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
   249  (assert_return (invoke "i32x4.sub" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
   250                                     (v128.const i32x4 4294967295 4294967295 4294967295 4294967295))
   251                                     (v128.const i32x4 0 0 0 0))
   252  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x3fffffff 0x3fffffff 0x3fffffff 0x3fffffff)
   253                                     (v128.const i32x4 0x40000000 0x40000000 0x40000000 0x40000000))
   254                                     (v128.const i32x4 -1 -1 -1 -1))
   255  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x40000000 0x40000000 0x40000000 0x40000000)
   256                                     (v128.const i32x4 0x40000000 0x40000000 0x40000000 0x40000000))
   257                                     (v128.const i32x4 0 0 0 0))
   258  (assert_return (invoke "i32x4.sub" (v128.const i32x4 -0x3fffffff -0x3fffffff -0x3fffffff -0x3fffffff)
   259                                     (v128.const i32x4 -0x40000000 -0x40000000 -0x40000000 -0x40000000))
   260                                     (v128.const i32x4 1 1 1 1))
   261  (assert_return (invoke "i32x4.sub" (v128.const i32x4 -0x40000000 -0x40000000 -0x40000000 -0x40000000)
   262                                     (v128.const i32x4 -0x40000000 -0x40000000 -0x40000000 -0x40000000))
   263                                     (v128.const i32x4 0 0 0 0))
   264  (assert_return (invoke "i32x4.sub" (v128.const i32x4 -0x40000000 -0x40000000 -0x40000000 -0x40000000)
   265                                     (v128.const i32x4 -0x40000001 -0x40000001 -0x40000001 -0x40000001))
   266                                     (v128.const i32x4 1 1 1 1))
   267  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff)
   268                                     (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff))
   269                                     (v128.const i32x4 0 0 0 0))
   270  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff)
   271                                     (v128.const i32x4 0x01 0x01 0x01 0x01))
   272                                     (v128.const i32x4 2147483646 2147483646 2147483646 2147483646))
   273  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   274                                     (v128.const i32x4 -0x01 -0x01 -0x01 -0x01))
   275                                     (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
   276  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff)
   277                                     (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000))
   278                                     (v128.const i32x4 -1 -1 -1 -1))
   279  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   280                                     (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000))
   281                                     (v128.const i32x4 0 0 0 0))
   282  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff)
   283                                     (v128.const i32x4 0x01 0x01 0x01 0x01))
   284                                     (v128.const i32x4 -2 -2 -2 -2))
   285  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff)
   286                                     (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff))
   287                                     (v128.const i32x4 0 0 0 0))
   288  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff)
   289                                     (v128.const i8x16 0 0 0 0x80 0 0 0 0x80 0 0 0 0x80 0 0 0 0x80))
   290                                     (v128.const i32x4 -1 -1 -1 -1))
   291  (assert_return (invoke "i32x4.sub" (v128.const i32x4 1 1 1 1)
   292                                     (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255))
   293                                     (v128.const i32x4 2 2 2 2))
   294  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff)
   295                                     (v128.const i16x8 0 0x8000 0 0x8000 0 0x8000 0 0x8000))
   296                                     (v128.const i32x4 -1 -1 -1 -1))
   297  (assert_return (invoke "i32x4.sub" (v128.const i32x4 1 1 1 1)
   298                                     (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff))
   299                                     (v128.const i32x4 0x02 0x02 0x02 0x02))
   300  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   301                                     (v128.const f32x4 +0.0 +0.0 +0.0 +0.0))
   302                                     (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000))
   303  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   304                                     (v128.const f32x4 -0.0 -0.0 -0.0 -0.0))
   305                                     (v128.const i32x4 0 0 0 0))
   306  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   307                                     (v128.const f32x4 1.0 1.0 1.0 1.0))
   308                                     (v128.const i32x4 0x40800000 0x40800000 0x40800000 0x40800000))
   309  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   310                                     (v128.const f32x4 -1.0 -1.0 -1.0 -1.0))
   311                                     (v128.const i32x4 0xc0800000 0xc0800000 0xc0800000 0xc0800000))
   312  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x1 0x1 0x1 0x1)
   313                                     (v128.const f32x4 +inf +inf +inf +inf))
   314                                     (v128.const i32x4 0x80800001 0x80800001 0x80800001 0x80800001))
   315  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x1 0x1 0x1 0x1)
   316                                     (v128.const f32x4 -inf -inf -inf -inf))
   317                                     (v128.const i32x4 0x00800001 0x00800001 0x00800001 0x00800001))
   318  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x1 0x1 0x1 0x1)
   319                                     (v128.const f32x4 nan nan nan nan))
   320                                     (v128.const i32x4 0x80400001 0x80400001 0x80400001 0x80400001))
   321  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0 1 2 3)
   322                                     (v128.const i32x4 0 0xffffffff 0xfffffffe 0xfffffffd))
   323                                     (v128.const i32x4 0 0x02 0x04 0x06))
   324  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0 1 2 3)
   325                                     (v128.const i32x4 0 2 4 6))
   326                                     (v128.const i32x4 0 -1 -2 -3))
   327  (assert_return (invoke "i32x4.sub" (v128.const i32x4 03_214_567_890  03_214_567_890  03_214_567_890  03_214_567_890 )
   328                                     (v128.const i32x4 01_234_567_890  01_234_567_890  01_234_567_890  01_234_567_890 ))
   329                                     (v128.const i32x4 01_980_000_000 01_980_000_000 01_980_000_000 01_980_000_000))
   330  (assert_return (invoke "i32x4.sub" (v128.const i32x4 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef)
   331                                     (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678))
   332                                     (v128.const i32x4 0x0_7e77_7777 0x0_7e77_7777 0x0_7e77_7777 0x0_7e77_7777))
   333  
   334  ;; i32x4.mul
   335  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0 0 0 0)
   336                                     (v128.const i32x4 0 0 0 0))
   337                                     (v128.const i32x4 0 0 0 0))
   338  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0 0 0 0)
   339                                     (v128.const i32x4 1 1 1 1))
   340                                     (v128.const i32x4 0 0 0 0))
   341  (assert_return (invoke "i32x4.mul" (v128.const i32x4 1 1 1 1)
   342                                     (v128.const i32x4 1 1 1 1))
   343                                     (v128.const i32x4 1 1 1 1))
   344  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0 0 0 0)
   345                                     (v128.const i32x4 -1 -1 -1 -1))
   346                                     (v128.const i32x4 0 0 0 0))
   347  (assert_return (invoke "i32x4.mul" (v128.const i32x4 1 1 1 1)
   348                                     (v128.const i32x4 -1 -1 -1 -1))
   349                                     (v128.const i32x4 -1 -1 -1 -1))
   350  (assert_return (invoke "i32x4.mul" (v128.const i32x4 -1 -1 -1 -1)
   351                                     (v128.const i32x4 -1 -1 -1 -1))
   352                                     (v128.const i32x4 1 1 1 1))
   353  (assert_return (invoke "i32x4.mul" (v128.const i32x4 1073741823 1073741823 1073741823 1073741823)
   354                                     (v128.const i32x4 1073741824 1073741824 1073741824 1073741824))
   355                                     (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824))
   356  (assert_return (invoke "i32x4.mul" (v128.const i32x4 1073741824 1073741824 1073741824 1073741824)
   357                                     (v128.const i32x4 1073741824 1073741824 1073741824 1073741824))
   358                                     (v128.const i32x4 0 0 0 0))
   359  (assert_return (invoke "i32x4.mul" (v128.const i32x4 -1073741823 -1073741823 -1073741823 -1073741823)
   360                                     (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824))
   361                                     (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824))
   362  (assert_return (invoke "i32x4.mul" (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824)
   363                                     (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824))
   364                                     (v128.const i32x4 0 0 0 0))
   365  (assert_return (invoke "i32x4.mul" (v128.const i32x4 -1073741825 -1073741825 -1073741825 -1073741825)
   366                                     (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824))
   367                                     (v128.const i32x4 1073741824 1073741824 1073741824 1073741824))
   368  (assert_return (invoke "i32x4.mul" (v128.const i32x4 2147483645 2147483645 2147483645 2147483645)
   369                                     (v128.const i32x4 1 1 1 1))
   370                                     (v128.const i32x4 2147483645 2147483645 2147483645 2147483645))
   371  (assert_return (invoke "i32x4.mul" (v128.const i32x4 2147483646 2147483646 2147483646 2147483646)
   372                                     (v128.const i32x4 1 1 1 1))
   373                                     (v128.const i32x4 2147483646 2147483646 2147483646 2147483646))
   374  (assert_return (invoke "i32x4.mul" (v128.const i32x4 2147483648 2147483648 2147483648 2147483648)
   375                                     (v128.const i32x4 1 1 1 1))
   376                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   377  (assert_return (invoke "i32x4.mul" (v128.const i32x4 -2147483646 -2147483646 -2147483646 -2147483646)
   378                                     (v128.const i32x4 -1 -1 -1 -1))
   379                                     (v128.const i32x4 2147483646 2147483646 2147483646 2147483646))
   380  (assert_return (invoke "i32x4.mul" (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647)
   381                                     (v128.const i32x4 -1 -1 -1 -1))
   382                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
   383  (assert_return (invoke "i32x4.mul" (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648)
   384                                     (v128.const i32x4 -1 -1 -1 -1))
   385                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   386  (assert_return (invoke "i32x4.mul" (v128.const i32x4 2147483647 2147483647 2147483647 2147483647)
   387                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
   388                                     (v128.const i32x4 1 1 1 1))
   389  (assert_return (invoke "i32x4.mul" (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648)
   390                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   391                                     (v128.const i32x4 0 0 0 0))
   392  (assert_return (invoke "i32x4.mul" (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648)
   393                                     (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
   394                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   395  (assert_return (invoke "i32x4.mul" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
   396                                     (v128.const i32x4 0 0 0 0))
   397                                     (v128.const i32x4 0 0 0 0))
   398  (assert_return (invoke "i32x4.mul" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
   399                                     (v128.const i32x4 1 1 1 1))
   400                                     (v128.const i32x4 -1 -1 -1 -1))
   401  (assert_return (invoke "i32x4.mul" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
   402                                     (v128.const i32x4 -1 -1 -1 -1))
   403                                     (v128.const i32x4 1 1 1 1))
   404  (assert_return (invoke "i32x4.mul" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
   405                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
   406                                     (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
   407  (assert_return (invoke "i32x4.mul" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
   408                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   409                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   410  (assert_return (invoke "i32x4.mul" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295)
   411                                     (v128.const i32x4 4294967295 4294967295 4294967295 4294967295))
   412                                     (v128.const i32x4 1 1 1 1))
   413  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x3fffffff 0x3fffffff 0x3fffffff 0x3fffffff)
   414                                     (v128.const i32x4 0x40000000 0x40000000 0x40000000 0x40000000))
   415                                     (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824))
   416  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x40000000 0x40000000 0x40000000 0x40000000)
   417                                     (v128.const i32x4 0x40000000 0x40000000 0x40000000 0x40000000))
   418                                     (v128.const i32x4 0 0 0 0))
   419  (assert_return (invoke "i32x4.mul" (v128.const i32x4 -0x3fffffff -0x3fffffff -0x3fffffff -0x3fffffff)
   420                                     (v128.const i32x4 -0x40000000 -0x40000000 -0x40000000 -0x40000000))
   421                                     (v128.const i32x4 -1073741824 -1073741824 -1073741824 -1073741824))
   422  (assert_return (invoke "i32x4.mul" (v128.const i32x4 -0x40000000 -0x40000000 -0x40000000 -0x40000000)
   423                                     (v128.const i32x4 -0x40000000 -0x40000000 -0x40000000 -0x40000000))
   424                                     (v128.const i32x4 0 0 0 0))
   425  (assert_return (invoke "i32x4.mul" (v128.const i32x4 -0x40000000 -0x40000000 -0x40000000 -0x40000000)
   426                                     (v128.const i32x4 -0x40000001 -0x40000001 -0x40000001 -0x40000001))
   427                                     (v128.const i32x4 1073741824 1073741824 1073741824 1073741824))
   428  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff)
   429                                     (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff))
   430                                     (v128.const i32x4 1 1 1 1))
   431  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff)
   432                                     (v128.const i32x4 0x01 0x01 0x01 0x01))
   433                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
   434  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   435                                     (v128.const i32x4 -0x01 -0x01 -0x01 -0x01))
   436                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   437  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff)
   438                                     (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000))
   439                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   440  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   441                                     (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000))
   442                                     (v128.const i32x4 0 0 0 0))
   443  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff)
   444                                     (v128.const i32x4 0x01 0x01 0x01 0x01))
   445                                     (v128.const i32x4 -1 -1 -1 -1))
   446  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff)
   447                                     (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff))
   448                                     (v128.const i32x4 1 1 1 1))
   449  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x10000000 0x10000000 0x10000000 0x10000000)
   450                                     (v128.const i8x16 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10))
   451                                     (v128.const i32x4 0 0 0 0))
   452  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff)
   453                                     (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255))
   454                                     (v128.const i32x4 1 1 1 1))
   455  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000)
   456                                     (v128.const i16x8 0 0x02 0 0x02 0 0x02 0 0x02))
   457                                     (v128.const i32x4 0 0 0 0))
   458  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff)
   459                                     (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff))
   460                                     (v128.const i32x4 1 1 1 1))
   461  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x8000 0x8000 0x8000 0x8000)
   462                                     (v128.const f32x4 +0.0 +0.0 +0.0 +0.0))
   463                                     (v128.const i32x4 0 0 0 0))
   464  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x8000 0x8000 0x8000 0x8000)
   465                                     (v128.const f32x4 -0.0 -0.0 -0.0 -0.0))
   466                                     (v128.const i32x4 0 0 0 0))
   467  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x8000 0x8000 0x8000 0x8000)
   468                                     (v128.const f32x4 1.0 1.0 1.0 1.0))
   469                                     (v128.const i32x4 0 0 0 0))
   470  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x8000 0x8000 0x8000 0x8000)
   471                                     (v128.const f32x4 -1.0 -1.0 -1.0 -1.0))
   472                                     (v128.const i32x4 0 0 0 0))
   473  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x1 0x1 0x1 0x1)
   474                                     (v128.const f32x4 +inf +inf +inf +inf))
   475                                     (v128.const i32x4 0x7f800000 0x7f800000 0x7f800000 0x7f800000))
   476  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x1 0x1 0x1 0x1)
   477                                     (v128.const f32x4 -inf -inf -inf -inf))
   478                                     (v128.const i32x4 0xff800000 0xff800000 0xff800000 0xff800000))
   479  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x1 0x1 0x1 0x1)
   480                                     (v128.const f32x4 nan nan nan nan))
   481                                     (v128.const i32x4 0x7fc00000 0x7fc00000 0x7fc00000 0x7fc00000))
   482  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0 1 2 3)
   483                                     (v128.const i32x4 0 0xffffffff 0xfffffffe 0xfffffffd))
   484                                     (v128.const i32x4 0 0xffffffff 0xfffffffc 0xfffffff7))
   485  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0 1 2 3)
   486                                     (v128.const i32x4 0 2 4 6))
   487                                     (v128.const i32x4 0 0x02 0x08 0x12))
   488  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0_123_456_789 0_123_456_789 0_123_456_789 0_123_456_789)
   489                                     (v128.const i32x4 0_987_654_321 0_987_654_321 0_987_654_321 0_987_654_321))
   490                                     (v128.const i32x4 04_227_814_277 04_227_814_277 04_227_814_277 04_227_814_277))
   491  (assert_return (invoke "i32x4.mul" (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678)
   492                                     (v128.const i32x4 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef))
   493                                     (v128.const i32x4 0x0_2a42_d208 0x0_2a42_d208 0x0_2a42_d208 0x0_2a42_d208))
   494  
   495  ;; i32x4.neg
   496  (assert_return (invoke "i32x4.neg" (v128.const i32x4 0 0 0 0))
   497                                     (v128.const i32x4 0 0 0 0))
   498  (assert_return (invoke "i32x4.neg" (v128.const i32x4 1 1 1 1))
   499                                     (v128.const i32x4 -1 -1 -1 -1))
   500  (assert_return (invoke "i32x4.neg" (v128.const i32x4 -1 -1 -1 -1))
   501                                     (v128.const i32x4 1 1 1 1))
   502  (assert_return (invoke "i32x4.neg" (v128.const i32x4 2147483646 2147483646 2147483646 2147483646))
   503                                     (v128.const i32x4 -2147483646 -2147483646 -2147483646 -2147483646))
   504  (assert_return (invoke "i32x4.neg" (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
   505                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
   506  (assert_return (invoke "i32x4.neg" (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   507                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   508  (assert_return (invoke "i32x4.neg" (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
   509                                     (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
   510  (assert_return (invoke "i32x4.neg" (v128.const i32x4 4294967295 4294967295 4294967295 4294967295))
   511                                     (v128.const i32x4 1 1 1 1))
   512  (assert_return (invoke "i32x4.neg" (v128.const i32x4 0x01 0x01 0x01 0x01))
   513                                     (v128.const i32x4 -1 -1 -1 -1))
   514  (assert_return (invoke "i32x4.neg" (v128.const i32x4 -0x01 -0x01 -0x01 -0x01))
   515                                     (v128.const i32x4 1 1 1 1))
   516  (assert_return (invoke "i32x4.neg" (v128.const i32x4 -0x80000000 -0x80000000 -0x80000000 -0x80000000))
   517                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   518  (assert_return (invoke "i32x4.neg" (v128.const i32x4 -0x7fffffff -0x7fffffff -0x7fffffff -0x7fffffff))
   519                                     (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
   520  (assert_return (invoke "i32x4.neg" (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff))
   521                                     (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
   522  (assert_return (invoke "i32x4.neg" (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000))
   523                                     (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648))
   524  (assert_return (invoke "i32x4.neg" (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff))
   525                                     (v128.const i32x4 1 1 1 1))
   526  
   527  ;; type check
   528  (assert_invalid (module (func (result v128) (i32x4.neg (i32.const 0)))) "type mismatch")
   529  (assert_invalid (module (func (result v128) (i32x4.add (i32.const 0) (f32.const 0.0)))) "type mismatch")
   530  (assert_invalid (module (func (result v128) (i32x4.sub (i32.const 0) (f32.const 0.0)))) "type mismatch")
   531  (assert_invalid (module (func (result v128) (i32x4.mul (i32.const 0) (f32.const 0.0)))) "type mismatch")
   532  
   533  ;; Test operation with empty argument
   534  
   535  (assert_invalid
   536    (module
   537      (func $i32x4.neg-arg-empty (result v128)
   538        (i32x4.neg)
   539      )
   540    )
   541    "type mismatch"
   542  )
   543  (assert_invalid
   544    (module
   545      (func $i32x4.add-1st-arg-empty (result v128)
   546        (i32x4.add (v128.const i32x4 0 0 0 0))
   547      )
   548    )
   549    "type mismatch"
   550  )
   551  (assert_invalid
   552    (module
   553      (func $i32x4.add-arg-empty (result v128)
   554        (i32x4.add)
   555      )
   556    )
   557    "type mismatch"
   558  )
   559  (assert_invalid
   560    (module
   561      (func $i32x4.sub-1st-arg-empty (result v128)
   562        (i32x4.sub (v128.const i32x4 0 0 0 0))
   563      )
   564    )
   565    "type mismatch"
   566  )
   567  (assert_invalid
   568    (module
   569      (func $i32x4.sub-arg-empty (result v128)
   570        (i32x4.sub)
   571      )
   572    )
   573    "type mismatch"
   574  )
   575  (assert_invalid
   576    (module
   577      (func $i32x4.mul-1st-arg-empty (result v128)
   578        (i32x4.mul (v128.const i32x4 0 0 0 0))
   579      )
   580    )
   581    "type mismatch"
   582  )
   583  (assert_invalid
   584    (module
   585      (func $i32x4.mul-arg-empty (result v128)
   586        (i32x4.mul)
   587      )
   588    )
   589    "type mismatch"
   590  )
   591  
   592  ;; combination
   593  (module
   594    (func (export "add-sub") (param v128 v128 v128) (result v128)
   595      (i32x4.add (i32x4.sub (local.get 0) (local.get 1))(local.get 2)))
   596    (func (export "mul-add") (param v128 v128 v128) (result v128)
   597      (i32x4.mul (i32x4.add (local.get 0) (local.get 1))(local.get 2)))
   598    (func (export "mul-sub") (param v128 v128 v128) (result v128)
   599      (i32x4.mul (i32x4.sub (local.get 0) (local.get 1))(local.get 2)))
   600    (func (export "sub-add") (param v128 v128 v128) (result v128)
   601      (i32x4.sub (i32x4.add (local.get 0) (local.get 1))(local.get 2)))
   602    (func (export "add-neg") (param v128 v128) (result v128)
   603      (i32x4.add (i32x4.neg (local.get 0)) (local.get 1)))
   604    (func (export "mul-neg") (param v128 v128) (result v128)
   605      (i32x4.mul (i32x4.neg (local.get 0)) (local.get 1)))
   606    (func (export "sub-neg") (param v128 v128) (result v128)
   607      (i32x4.sub (i32x4.neg (local.get 0)) (local.get 1)))
   608  )
   609  
   610  (assert_return (invoke "add-sub" (v128.const i32x4 0 1 2 3)
   611                                   (v128.const i32x4 0 2 4 6)
   612                                   (v128.const i32x4 0 2 4 6))
   613                                   (v128.const i32x4 0 1 2 3))
   614  (assert_return (invoke "mul-add" (v128.const i32x4 0 1 2 3)
   615                                   (v128.const i32x4 0 1 2 3)
   616                                   (v128.const i32x4 2 2 2 2))
   617                                   (v128.const i32x4 0 4 8 12))
   618  (assert_return (invoke "mul-sub" (v128.const i32x4 0 2 4 6)
   619                                   (v128.const i32x4 0 1 2 3)
   620                                   (v128.const i32x4 0 1 2 3))
   621                                   (v128.const i32x4 0 1 4 9))
   622  (assert_return (invoke "sub-add" (v128.const i32x4 0 1 2 3)
   623                                   (v128.const i32x4 0 2 4 6)
   624                                   (v128.const i32x4 0 2 4 6))
   625                                   (v128.const i32x4 0 1 2 3))
   626  (assert_return (invoke "add-neg" (v128.const i32x4 0 1 2 3)
   627                                   (v128.const i32x4 0 1 2 3))
   628                                   (v128.const i32x4 0 0 0 0))
   629  (assert_return (invoke "mul-neg" (v128.const i32x4 0 1 2 3)
   630                                   (v128.const i32x4 2 2 2 2))
   631                                   (v128.const i32x4 0 -2 -4 -6))
   632  (assert_return (invoke "sub-neg" (v128.const i32x4 0 1 2 3)
   633                                   (v128.const i32x4 0 1 2 3))
   634                                   (v128.const i32x4 0 -2 -4 -6))