github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/internal/integration_test/spectest/v2/testdata/simd_i16x8_sat_arith.wast (about) 1 ;; Tests for i16x8 arithmetic operations on major boundary values and all special values. 2 3 4 (module 5 (func (export "i16x8.add_sat_s") (param v128 v128) (result v128) (i16x8.add_sat_s (local.get 0) (local.get 1))) 6 (func (export "i16x8.add_sat_u") (param v128 v128) (result v128) (i16x8.add_sat_u (local.get 0) (local.get 1))) 7 (func (export "i16x8.sub_sat_s") (param v128 v128) (result v128) (i16x8.sub_sat_s (local.get 0) (local.get 1))) 8 (func (export "i16x8.sub_sat_u") (param v128 v128) (result v128) (i16x8.sub_sat_u (local.get 0) (local.get 1))) 9 ) 10 11 12 ;; i16x8.add_sat_s 13 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0 0 0 0 0 0 0 0) 14 (v128.const i16x8 0 0 0 0 0 0 0 0)) 15 (v128.const i16x8 0 0 0 0 0 0 0 0)) 16 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0 0 0 0 0 0 0 0) 17 (v128.const i16x8 1 1 1 1 1 1 1 1)) 18 (v128.const i16x8 1 1 1 1 1 1 1 1)) 19 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 20 (v128.const i16x8 1 1 1 1 1 1 1 1)) 21 (v128.const i16x8 2 2 2 2 2 2 2 2)) 22 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0 0 0 0 0 0 0 0) 23 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 24 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 25 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 26 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 27 (v128.const i16x8 0 0 0 0 0 0 0 0)) 28 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1) 29 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 30 (v128.const i16x8 -2 -2 -2 -2 -2 -2 -2 -2)) 31 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 16383 16383 16383 16383 16383 16383 16383 16383) 32 (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384)) 33 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 34 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384) 35 (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384)) 36 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 37 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 -16383 -16383 -16383 -16383 -16383 -16383 -16383 -16383) 38 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 39 (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767)) 40 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384) 41 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 42 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 43 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 -16385 -16385 -16385 -16385 -16385 -16385 -16385 -16385) 44 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 45 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 46 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 32765 32765 32765 32765 32765 32765 32765 32765) 47 (v128.const i16x8 1 1 1 1 1 1 1 1)) 48 (v128.const i16x8 32766 32766 32766 32766 32766 32766 32766 32766)) 49 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 32766 32766 32766 32766 32766 32766 32766 32766) 50 (v128.const i16x8 1 1 1 1 1 1 1 1)) 51 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 52 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768) 53 (v128.const i16x8 1 1 1 1 1 1 1 1)) 54 (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767)) 55 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 -32766 -32766 -32766 -32766 -32766 -32766 -32766 -32766) 56 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 57 (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767)) 58 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767) 59 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 60 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 61 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 62 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 63 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 64 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767) 65 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 66 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 67 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 68 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 69 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 70 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 71 (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767)) 72 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 73 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 74 (v128.const i16x8 0 0 0 0 0 0 0 0)) 75 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 76 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 77 (v128.const i16x8 1 1 1 1 1 1 1 1)) 78 (v128.const i16x8 0 0 0 0 0 0 0 0)) 79 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 80 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 81 (v128.const i16x8 -2 -2 -2 -2 -2 -2 -2 -2)) 82 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 83 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 84 (v128.const i16x8 32766 32766 32766 32766 32766 32766 32766 32766)) 85 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 86 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 87 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 88 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 89 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 90 (v128.const i16x8 -2 -2 -2 -2 -2 -2 -2 -2)) 91 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff) 92 (v128.const i16x8 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000)) 93 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 94 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000) 95 (v128.const i16x8 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000)) 96 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 97 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff) 98 (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000)) 99 (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767)) 100 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000) 101 (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000)) 102 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 103 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000) 104 (v128.const i16x8 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001)) 105 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 106 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff) 107 (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff)) 108 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 109 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff) 110 (v128.const i16x8 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01)) 111 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 112 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000) 113 (v128.const i16x8 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01)) 114 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 115 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff) 116 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)) 117 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 118 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000) 119 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)) 120 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 121 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff) 122 (v128.const i16x8 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01)) 123 (v128.const i16x8 0 0 0 0 0 0 0 0)) 124 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff) 125 (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff)) 126 (v128.const i16x8 -2 -2 -2 -2 -2 -2 -2 -2)) 127 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000) 128 (v128.const f32x4 -0.0 -0.0 -0.0 -0.0)) 129 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)) 130 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 131 (v128.const f32x4 +inf +inf +inf +inf)) 132 (v128.const i16x8 0x01 0x7f81 0x01 0x7f81 0x01 0x7f81 0x01 0x7f81)) 133 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 134 (v128.const f32x4 -inf -inf -inf -inf)) 135 (v128.const i16x8 0x01 0xff81 0x01 0xff81 0x01 0xff81 0x01 0xff81)) 136 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 137 (v128.const f32x4 nan nan nan nan)) 138 (v128.const i16x8 0x01 0x7fc1 0x01 0x7fc1 0x01 0x7fc1 0x01 0x7fc1)) 139 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 140 (v128.const f32x4 -nan -nan -nan -nan)) 141 (v128.const i16x8 0x01 0xffc1 0x01 0xffc1 0x01 0xffc1 0x01 0xffc1)) 142 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0 1 2 3 4 5 6 7) 143 (v128.const i16x8 0 0xffff 0xfffe 0xfffd 0xfffc 0xfffb 0xfffa 0xfff9)) 144 (v128.const i16x8 0 0 0 0 0 0 0 0)) 145 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0 1 2 3 4 5 6 7) 146 (v128.const i16x8 0 2 4 6 8 10 12 14)) 147 (v128.const i16x8 0 3 6 9 12 15 18 21)) 148 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345) 149 (v128.const i16x8 032_123 032_123 032_123 032_123 032_123 032_123 032_123 032_123)) 150 (v128.const i16x8 032_767 032_767 032_767 032_767 032_767 032_767 032_767 032_767)) 151 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345) 152 (v128.const i16x8 056_789 056_789 056_789 056_789 056_789 056_789 056_789 056_789)) 153 (v128.const i16x8 03_598 03_598 03_598 03_598 03_598 03_598 03_598 03_598)) 154 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234) 155 (v128.const i16x8 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678)) 156 (v128.const i16x8 0x0_68ac 0x0_68ac 0x0_68ac 0x0_68ac 0x0_68ac 0x0_68ac 0x0_68ac 0x0_68ac)) 157 (assert_return (invoke "i16x8.add_sat_s" (v128.const i16x8 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB) 158 (v128.const i16x8 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef)) 159 (v128.const i16x8 -0x0_8000 -0x0_8000 -0x0_8000 -0x0_8000 -0x0_8000 -0x0_8000 -0x0_8000 -0x0_8000)) 160 161 ;; i16x8.add_sat_u 162 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0 0 0 0 0 0 0 0) 163 (v128.const i16x8 0 0 0 0 0 0 0 0)) 164 (v128.const i16x8 0 0 0 0 0 0 0 0)) 165 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0 0 0 0 0 0 0 0) 166 (v128.const i16x8 1 1 1 1 1 1 1 1)) 167 (v128.const i16x8 1 1 1 1 1 1 1 1)) 168 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 1 1 1 1 1 1 1 1) 169 (v128.const i16x8 1 1 1 1 1 1 1 1)) 170 (v128.const i16x8 2 2 2 2 2 2 2 2)) 171 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0 0 0 0 0 0 0 0) 172 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 173 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 174 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 1 1 1 1 1 1 1 1) 175 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 176 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 177 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1) 178 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 179 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 180 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 16383 16383 16383 16383 16383 16383 16383 16383) 181 (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384)) 182 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 183 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384) 184 (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384)) 185 (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768)) 186 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 -16383 -16383 -16383 -16383 -16383 -16383 -16383 -16383) 187 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 188 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 189 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384) 190 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 191 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 192 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 -16385 -16385 -16385 -16385 -16385 -16385 -16385 -16385) 193 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 194 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 195 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 32765 32765 32765 32765 32765 32765 32765 32765) 196 (v128.const i16x8 1 1 1 1 1 1 1 1)) 197 (v128.const i16x8 32766 32766 32766 32766 32766 32766 32766 32766)) 198 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 32766 32766 32766 32766 32766 32766 32766 32766) 199 (v128.const i16x8 1 1 1 1 1 1 1 1)) 200 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 201 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768) 202 (v128.const i16x8 1 1 1 1 1 1 1 1)) 203 (v128.const i16x8 32769 32769 32769 32769 32769 32769 32769 32769)) 204 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 -32766 -32766 -32766 -32766 -32766 -32766 -32766 -32766) 205 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 206 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 207 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767) 208 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 209 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 210 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 211 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 212 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 213 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767) 214 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 215 (v128.const i16x8 65534 65534 65534 65534 65534 65534 65534 65534)) 216 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 217 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 218 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 219 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 220 (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767)) 221 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 222 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 223 (v128.const i16x8 0 0 0 0 0 0 0 0)) 224 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 225 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 226 (v128.const i16x8 1 1 1 1 1 1 1 1)) 227 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 228 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 229 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 230 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 231 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 232 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 233 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 234 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 235 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 236 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 237 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 238 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 239 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 240 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff) 241 (v128.const i16x8 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000)) 242 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 243 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000) 244 (v128.const i16x8 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000)) 245 (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768)) 246 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff) 247 (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000)) 248 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 249 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000) 250 (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000)) 251 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 252 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000) 253 (v128.const i16x8 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001)) 254 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 255 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff) 256 (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff)) 257 (v128.const i16x8 65534 65534 65534 65534 65534 65534 65534 65534)) 258 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff) 259 (v128.const i16x8 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01)) 260 (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768)) 261 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000) 262 (v128.const i16x8 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01)) 263 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 264 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff) 265 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)) 266 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 267 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000) 268 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)) 269 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 270 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff) 271 (v128.const i16x8 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01)) 272 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 273 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff) 274 (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff)) 275 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 276 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000) 277 (v128.const f32x4 -0.0 -0.0 -0.0 -0.0)) 278 (v128.const i16x8 0x8000 0xffff 0x8000 0xffff 0x8000 0xffff 0x8000 0xffff)) 279 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 1 1 1 1 1 1 1 1) 280 (v128.const f32x4 +inf +inf +inf +inf)) 281 (v128.const i16x8 0x01 0x7f81 0x01 0x7f81 0x01 0x7f81 0x01 0x7f81)) 282 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 1 1 1 1 1 1 1 1) 283 (v128.const f32x4 -inf -inf -inf -inf)) 284 (v128.const i16x8 0x01 0xff81 0x01 0xff81 0x01 0xff81 0x01 0xff81)) 285 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 1 1 1 1 1 1 1 1) 286 (v128.const f32x4 nan nan nan nan)) 287 (v128.const i16x8 0x01 0x7fc1 0x01 0x7fc1 0x01 0x7fc1 0x01 0x7fc1)) 288 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 1 1 1 1 1 1 1 1) 289 (v128.const f32x4 nan nan nan nan)) 290 (v128.const i16x8 0x01 0x7fc1 0x01 0x7fc1 0x01 0x7fc1 0x01 0x7fc1)) 291 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0 1 2 3 4 5 6 7) 292 (v128.const i16x8 0 0xffff 0xfffe 0xfffd 0xfffc 0xfffb 0xfffa 0xfff9)) 293 (v128.const i16x8 0 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff)) 294 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0 1 2 3 4 5 6 7) 295 (v128.const i16x8 0 2 4 6 8 10 12 14)) 296 (v128.const i16x8 0 3 6 9 12 15 18 21)) 297 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345) 298 (v128.const i16x8 056_789 056_789 056_789 056_789 056_789 056_789 056_789 056_789)) 299 (v128.const i16x8 065_535 065_535 065_535 065_535 065_535 065_535 065_535 065_535)) 300 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345) 301 (v128.const i16x8 -012_345 -012_345 -012_345 -012_345 -012_345 -012_345 -012_345 -012_345)) 302 (v128.const i16x8 065_535 065_535 065_535 065_535 065_535 065_535 065_535 065_535)) 303 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234) 304 (v128.const i16x8 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678)) 305 (v128.const i16x8 0x0_68ac 0x0_68ac 0x0_68ac 0x0_68ac 0x0_68ac 0x0_68ac 0x0_68ac 0x0_68ac)) 306 (assert_return (invoke "i16x8.add_sat_u" (v128.const i16x8 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB) 307 (v128.const i16x8 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef)) 308 (v128.const i16x8 0x0_ffff 0x0_ffff 0x0_ffff 0x0_ffff 0x0_ffff 0x0_ffff 0x0_ffff 0x0_ffff)) 309 310 ;; i16x8.sub_sat_s 311 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0 0 0 0 0 0 0 0) 312 (v128.const i16x8 0 0 0 0 0 0 0 0)) 313 (v128.const i16x8 0 0 0 0 0 0 0 0)) 314 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0 0 0 0 0 0 0 0) 315 (v128.const i16x8 1 1 1 1 1 1 1 1)) 316 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 317 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 318 (v128.const i16x8 1 1 1 1 1 1 1 1)) 319 (v128.const i16x8 0 0 0 0 0 0 0 0)) 320 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0 0 0 0 0 0 0 0) 321 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 322 (v128.const i16x8 1 1 1 1 1 1 1 1)) 323 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 324 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 325 (v128.const i16x8 2 2 2 2 2 2 2 2)) 326 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1) 327 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 328 (v128.const i16x8 0 0 0 0 0 0 0 0)) 329 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 16383 16383 16383 16383 16383 16383 16383 16383) 330 (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384)) 331 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 332 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384) 333 (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384)) 334 (v128.const i16x8 0 0 0 0 0 0 0 0)) 335 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 -16383 -16383 -16383 -16383 -16383 -16383 -16383 -16383) 336 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 337 (v128.const i16x8 1 1 1 1 1 1 1 1)) 338 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384) 339 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 340 (v128.const i16x8 0 0 0 0 0 0 0 0)) 341 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 -16385 -16385 -16385 -16385 -16385 -16385 -16385 -16385) 342 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 343 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 344 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 32765 32765 32765 32765 32765 32765 32765 32765) 345 (v128.const i16x8 1 1 1 1 1 1 1 1)) 346 (v128.const i16x8 32764 32764 32764 32764 32764 32764 32764 32764)) 347 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 32766 32766 32766 32766 32766 32766 32766 32766) 348 (v128.const i16x8 1 1 1 1 1 1 1 1)) 349 (v128.const i16x8 32765 32765 32765 32765 32765 32765 32765 32765)) 350 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768) 351 (v128.const i16x8 1 1 1 1 1 1 1 1)) 352 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 353 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 -32766 -32766 -32766 -32766 -32766 -32766 -32766 -32766) 354 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 355 (v128.const i16x8 -32765 -32765 -32765 -32765 -32765 -32765 -32765 -32765)) 356 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767) 357 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 358 (v128.const i16x8 -32766 -32766 -32766 -32766 -32766 -32766 -32766 -32766)) 359 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 360 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 361 (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767)) 362 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767) 363 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 364 (v128.const i16x8 0 0 0 0 0 0 0 0)) 365 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 366 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 367 (v128.const i16x8 0 0 0 0 0 0 0 0)) 368 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 369 (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767)) 370 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 371 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 372 (v128.const i16x8 0 0 0 0 0 0 0 0)) 373 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 374 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 375 (v128.const i16x8 1 1 1 1 1 1 1 1)) 376 (v128.const i16x8 -2 -2 -2 -2 -2 -2 -2 -2)) 377 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 378 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 379 (v128.const i16x8 0 0 0 0 0 0 0 0)) 380 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 381 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 382 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 383 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 384 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 385 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 386 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 387 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 388 (v128.const i16x8 0 0 0 0 0 0 0 0)) 389 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff) 390 (v128.const i16x8 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000)) 391 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 392 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000) 393 (v128.const i16x8 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000)) 394 (v128.const i16x8 0 0 0 0 0 0 0 0)) 395 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff) 396 (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000)) 397 (v128.const i16x8 1 1 1 1 1 1 1 1)) 398 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000) 399 (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000)) 400 (v128.const i16x8 0 0 0 0 0 0 0 0)) 401 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000) 402 (v128.const i16x8 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001)) 403 (v128.const i16x8 1 1 1 1 1 1 1 1)) 404 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff) 405 (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff)) 406 (v128.const i16x8 0 0 0 0 0 0 0 0)) 407 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff) 408 (v128.const i16x8 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01)) 409 (v128.const i16x8 32766 32766 32766 32766 32766 32766 32766 32766)) 410 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000) 411 (v128.const i16x8 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01)) 412 (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767)) 413 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff) 414 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)) 415 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 416 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000) 417 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)) 418 (v128.const i16x8 0 0 0 0 0 0 0 0)) 419 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff) 420 (v128.const i16x8 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01)) 421 (v128.const i16x8 -2 -2 -2 -2 -2 -2 -2 -2)) 422 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff) 423 (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff)) 424 (v128.const i16x8 0 0 0 0 0 0 0 0)) 425 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000) 426 (v128.const f32x4 -0.0 -0.0 -0.0 -0.0)) 427 (v128.const i16x8 0x8000 0 0x8000 0 0x8000 0 0x8000 0)) 428 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 429 (v128.const f32x4 +inf +inf +inf +inf)) 430 (v128.const i16x8 0x01 0x8081 0x01 0x8081 0x01 0x8081 0x01 0x8081)) 431 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 432 (v128.const f32x4 -inf -inf -inf -inf)) 433 (v128.const i16x8 0x01 0x81 0x01 0x81 0x01 0x81 0x01 0x81)) 434 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 435 (v128.const f32x4 nan nan nan nan)) 436 (v128.const i16x8 0x01 0x8041 0x01 0x8041 0x01 0x8041 0x01 0x8041)) 437 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 438 (v128.const f32x4 -nan -nan -nan -nan)) 439 (v128.const i16x8 0x01 0x41 0x01 0x41 0x01 0x41 0x01 0x41)) 440 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0 1 2 3 4 5 6 7) 441 (v128.const i16x8 0 0xffff 0xfffe 0xfffd 0xfffc 0xfffb 0xfffa 0xfff9)) 442 (v128.const i16x8 0 2 4 6 8 10 12 14)) 443 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0 1 2 3 4 5 6 7) 444 (v128.const i16x8 0 2 4 6 8 10 12 14)) 445 (v128.const i16x8 0 -1 -2 -3 -4 -5 -6 -7)) 446 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345) 447 (v128.const i16x8 056_789 056_789 056_789 056_789 056_789 056_789 056_789 056_789)) 448 (v128.const i16x8 021_092 021_092 021_092 021_092 021_092 021_092 021_092 021_092)) 449 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345) 450 (v128.const i16x8 -012_345 -012_345 -012_345 -012_345 -012_345 -012_345 -012_345 -012_345)) 451 (v128.const i16x8 024_690 024_690 024_690 024_690 024_690 024_690 024_690 024_690)) 452 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234) 453 (v128.const i16x8 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678)) 454 (v128.const i16x8 0x0_bbbc 0x0_bbbc 0x0_bbbc 0x0_bbbc 0x0_bbbc 0x0_bbbc 0x0_bbbc 0x0_bbbc)) 455 (assert_return (invoke "i16x8.sub_sat_s" (v128.const i16x8 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB) 456 (v128.const i16x8 -0x1234 -0x1234 -0x1234 -0x1234 -0x1234 -0x1234 -0x1234 -0x1234)) 457 (v128.const i16x8 0xa2df 0xa2df 0xa2df 0xa2df 0xa2df 0xa2df 0xa2df 0xa2df)) 458 459 ;; i16x8.sub_sat_u 460 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0 0 0 0 0 0 0 0) 461 (v128.const i16x8 0 0 0 0 0 0 0 0)) 462 (v128.const i16x8 0 0 0 0 0 0 0 0)) 463 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0 0 0 0 0 0 0 0) 464 (v128.const i16x8 1 1 1 1 1 1 1 1)) 465 (v128.const i16x8 0 0 0 0 0 0 0 0)) 466 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 1 1 1 1 1 1 1 1) 467 (v128.const i16x8 1 1 1 1 1 1 1 1)) 468 (v128.const i16x8 0 0 0 0 0 0 0 0)) 469 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0 0 0 0 0 0 0 0) 470 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 471 (v128.const i16x8 0 0 0 0 0 0 0 0)) 472 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 1 1 1 1 1 1 1 1) 473 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 474 (v128.const i16x8 0 0 0 0 0 0 0 0)) 475 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1) 476 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 477 (v128.const i16x8 0 0 0 0 0 0 0 0)) 478 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 16383 16383 16383 16383 16383 16383 16383 16383) 479 (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384)) 480 (v128.const i16x8 0 0 0 0 0 0 0 0)) 481 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384) 482 (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384)) 483 (v128.const i16x8 0 0 0 0 0 0 0 0)) 484 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 -16383 -16383 -16383 -16383 -16383 -16383 -16383 -16383) 485 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 486 (v128.const i16x8 1 1 1 1 1 1 1 1)) 487 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384) 488 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 489 (v128.const i16x8 0 0 0 0 0 0 0 0)) 490 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 -16385 -16385 -16385 -16385 -16385 -16385 -16385 -16385) 491 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 492 (v128.const i16x8 0 0 0 0 0 0 0 0)) 493 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 32765 32765 32765 32765 32765 32765 32765 32765) 494 (v128.const i16x8 1 1 1 1 1 1 1 1)) 495 (v128.const i16x8 32764 32764 32764 32764 32764 32764 32764 32764)) 496 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 32766 32766 32766 32766 32766 32766 32766 32766) 497 (v128.const i16x8 1 1 1 1 1 1 1 1)) 498 (v128.const i16x8 32765 32765 32765 32765 32765 32765 32765 32765)) 499 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768) 500 (v128.const i16x8 1 1 1 1 1 1 1 1)) 501 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 502 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 -32766 -32766 -32766 -32766 -32766 -32766 -32766 -32766) 503 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 504 (v128.const i16x8 0 0 0 0 0 0 0 0)) 505 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767) 506 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 507 (v128.const i16x8 0 0 0 0 0 0 0 0)) 508 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 509 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 510 (v128.const i16x8 0 0 0 0 0 0 0 0)) 511 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767) 512 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 513 (v128.const i16x8 0 0 0 0 0 0 0 0)) 514 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 515 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 516 (v128.const i16x8 0 0 0 0 0 0 0 0)) 517 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 518 (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767)) 519 (v128.const i16x8 0 0 0 0 0 0 0 0)) 520 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 521 (v128.const i16x8 0 0 0 0 0 0 0 0)) 522 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 523 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 524 (v128.const i16x8 1 1 1 1 1 1 1 1)) 525 (v128.const i16x8 65534 65534 65534 65534 65534 65534 65534 65534)) 526 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 527 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 528 (v128.const i16x8 0 0 0 0 0 0 0 0)) 529 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 530 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 531 (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768)) 532 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 533 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 534 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 535 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 536 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 537 (v128.const i16x8 0 0 0 0 0 0 0 0)) 538 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff 0x3fff) 539 (v128.const i16x8 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000)) 540 (v128.const i16x8 0 0 0 0 0 0 0 0)) 541 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000) 542 (v128.const i16x8 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000 0x4000)) 543 (v128.const i16x8 0 0 0 0 0 0 0 0)) 544 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff -0x3fff) 545 (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000)) 546 (v128.const i16x8 1 1 1 1 1 1 1 1)) 547 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000) 548 (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000)) 549 (v128.const i16x8 0 0 0 0 0 0 0 0)) 550 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000 -0x4000) 551 (v128.const i16x8 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001 -0x4001)) 552 (v128.const i16x8 1 1 1 1 1 1 1 1)) 553 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff) 554 (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff)) 555 (v128.const i16x8 0 0 0 0 0 0 0 0)) 556 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff) 557 (v128.const i16x8 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01)) 558 (v128.const i16x8 32766 32766 32766 32766 32766 32766 32766 32766)) 559 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000) 560 (v128.const i16x8 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01 -0x01)) 561 (v128.const i16x8 0 0 0 0 0 0 0 0)) 562 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff) 563 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)) 564 (v128.const i16x8 0 0 0 0 0 0 0 0)) 565 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000) 566 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)) 567 (v128.const i16x8 0 0 0 0 0 0 0 0)) 568 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff) 569 (v128.const i16x8 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01)) 570 (v128.const i16x8 65534 65534 65534 65534 65534 65534 65534 65534)) 571 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff) 572 (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff)) 573 (v128.const i16x8 0 0 0 0 0 0 0 0)) 574 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000) 575 (v128.const f32x4 -0.0 -0.0 -0.0 -0.0)) 576 (v128.const i16x8 0x8000 0 0x8000 0 0x8000 0 0x8000 0)) 577 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 1 1 1 1 1 1 1 1) 578 (v128.const f32x4 +inf +inf +inf +inf)) 579 (v128.const i16x8 0x01 0 0x01 0 0x01 0 0x01 0)) 580 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 1 1 1 1 1 1 1 1) 581 (v128.const f32x4 -inf -inf -inf -inf)) 582 (v128.const i16x8 0x01 0 0x01 0 0x01 0 0x01 0)) 583 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 1 1 1 1 1 1 1 1) 584 (v128.const f32x4 nan nan nan nan)) 585 (v128.const i16x8 0x01 0 0x01 0 0x01 0 0x01 0)) 586 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 1 1 1 1 1 1 1 1) 587 (v128.const f32x4 -nan -nan -nan -nan)) 588 (v128.const i16x8 0x01 0 0x01 0 0x01 0 0x01 0)) 589 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0 1 2 3 4 5 6 7) 590 (v128.const i16x8 0 0xffff 0xfffe 0xfffd 0xfffc 0xfffb 0xfffa 0xfff9)) 591 (v128.const i16x8 0 0 0 0 0 0 0 0)) 592 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0 1 2 3 4 5 6 7) 593 (v128.const i16x8 0 2 4 6 8 10 12 14)) 594 (v128.const i16x8 0 0 0 0 0 0 0 0)) 595 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345) 596 (v128.const i16x8 056_789 056_789 056_789 056_789 056_789 056_789 056_789 056_789)) 597 (v128.const i16x8 0 0 0 0 0 0 0 0)) 598 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 056_789 056_789 056_789 056_789 056_789 056_789 056_789 056_789) 599 (v128.const i16x8 -12_345 -12_345 -12_345 -12_345 -12_345 -12_345 -12_345 -12_345)) 600 (v128.const i16x8 03_598 03_598 03_598 03_598 03_598 03_598 03_598 03_598)) 601 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234) 602 (v128.const i16x8 -0x0_5678 -0x0_5678 -0x0_5678 -0x0_5678 -0x0_5678 -0x0_5678 -0x0_5678 -0x0_5678)) 603 (v128.const i16x8 0 0 0 0 0 0 0 0)) 604 (assert_return (invoke "i16x8.sub_sat_u" (v128.const i16x8 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef 0x0_cdef) 605 (v128.const i16x8 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB)) 606 (v128.const i16x8 0x0_3d44 0x0_3d44 0x0_3d44 0x0_3d44 0x0_3d44 0x0_3d44 0x0_3d44 0x0_3d44)) 607 608 ;; Malformed cases: non-existent op names 609 (assert_malformed (module quote 610 "(func (result v128) (i16x8.add_sat (v128.const i16x8 1 1 1 1 1 1 1 1) (v128.const i16x8 2 2 2 2 2 2 2 2)))") 611 "unknown operator") 612 (assert_malformed (module quote 613 "(func (result v128) (i16x8.sub_sat (v128.const i16x8 1 1 1 1 1 1 1 1) (v128.const i16x8 2 2 2 2 2 2 2 2)))") 614 "unknown operator") 615 (assert_malformed (module quote 616 "(func (result v128) (i16x8.mul_sat (v128.const i16x8 1 1 1 1 1 1 1 1) (v128.const i16x8 2 2 2 2 2 2 2 2)))") 617 "unknown operator") 618 (assert_malformed (module quote 619 "(func (result v128) (i16x8.div_sat (v128.const i16x8 1 1 1 1 1 1 1 1) (v128.const i16x8 2 2 2 2 2 2 2 2)))") 620 "unknown operator") 621 622 ;; type check 623 (assert_invalid (module (func (result v128) (i16x8.add_sat_s (i32.const 0) (f32.const 0.0)))) "type mismatch") 624 (assert_invalid (module (func (result v128) (i16x8.add_sat_u (i32.const 0) (f32.const 0.0)))) "type mismatch") 625 (assert_invalid (module (func (result v128) (i16x8.sub_sat_s (i32.const 0) (f32.const 0.0)))) "type mismatch") 626 (assert_invalid (module (func (result v128) (i16x8.sub_sat_u (i32.const 0) (f32.const 0.0)))) "type mismatch") 627 628 ;; Test operation with empty argument 629 630 (assert_invalid 631 (module 632 (func $i16x8.add_sat_s-1st-arg-empty (result v128) 633 (i16x8.add_sat_s (v128.const i16x8 0 0 0 0 0 0 0 0)) 634 ) 635 ) 636 "type mismatch" 637 ) 638 (assert_invalid 639 (module 640 (func $i16x8.add_sat_s-arg-empty (result v128) 641 (i16x8.add_sat_s) 642 ) 643 ) 644 "type mismatch" 645 ) 646 (assert_invalid 647 (module 648 (func $i16x8.add_sat_u-1st-arg-empty (result v128) 649 (i16x8.add_sat_u (v128.const i16x8 0 0 0 0 0 0 0 0)) 650 ) 651 ) 652 "type mismatch" 653 ) 654 (assert_invalid 655 (module 656 (func $i16x8.add_sat_u-arg-empty (result v128) 657 (i16x8.add_sat_u) 658 ) 659 ) 660 "type mismatch" 661 ) 662 (assert_invalid 663 (module 664 (func $i16x8.sub_sat_s-1st-arg-empty (result v128) 665 (i16x8.sub_sat_s (v128.const i16x8 0 0 0 0 0 0 0 0)) 666 ) 667 ) 668 "type mismatch" 669 ) 670 (assert_invalid 671 (module 672 (func $i16x8.sub_sat_s-arg-empty (result v128) 673 (i16x8.sub_sat_s) 674 ) 675 ) 676 "type mismatch" 677 ) 678 (assert_invalid 679 (module 680 (func $i16x8.sub_sat_u-1st-arg-empty (result v128) 681 (i16x8.sub_sat_u (v128.const i16x8 0 0 0 0 0 0 0 0)) 682 ) 683 ) 684 "type mismatch" 685 ) 686 (assert_invalid 687 (module 688 (func $i16x8.sub_sat_u-arg-empty (result v128) 689 (i16x8.sub_sat_u) 690 ) 691 ) 692 "type mismatch" 693 ) 694 695 ;; combination 696 (module 697 (func (export "sat-add_s-sub_s") (param v128 v128 v128) (result v128) 698 (i16x8.add_sat_s (i16x8.sub_sat_s (local.get 0) (local.get 1))(local.get 2))) 699 (func (export "sat-add_s-sub_u") (param v128 v128 v128) (result v128) 700 (i16x8.add_sat_s (i16x8.sub_sat_u (local.get 0) (local.get 1))(local.get 2))) 701 (func (export "sat-add_u-sub_s") (param v128 v128 v128) (result v128) 702 (i16x8.add_sat_u (i16x8.sub_sat_s (local.get 0) (local.get 1))(local.get 2))) 703 (func (export "sat-add_u-sub_u") (param v128 v128 v128) (result v128) 704 (i16x8.add_sat_u (i16x8.sub_sat_u (local.get 0) (local.get 1))(local.get 2))) 705 (func (export "sat-add_s-neg") (param v128 v128) (result v128) 706 (i16x8.add_sat_s (i16x8.neg (local.get 0)) (local.get 1))) 707 (func (export "sat-add_u-neg") (param v128 v128) (result v128) 708 (i16x8.add_sat_u (i16x8.neg (local.get 0)) (local.get 1))) 709 (func (export "sat-sub_s-neg") (param v128 v128) (result v128) 710 (i16x8.sub_sat_s (i16x8.neg (local.get 0)) (local.get 1))) 711 (func (export "sat-sub_u-neg") (param v128 v128) (result v128) 712 (i16x8.sub_sat_u (i16x8.neg (local.get 0)) (local.get 1))) 713 ) 714 715 (assert_return (invoke "sat-add_s-sub_s" (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384) 716 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767) 717 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 718 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 719 (assert_return (invoke "sat-add_s-sub_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 720 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 721 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 722 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 723 (assert_return (invoke "sat-add_u-sub_s" (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767) 724 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1) 725 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 726 (v128.const i16x8 65534 65534 65534 65534 65534 65534 65534 65534)) 727 (assert_return (invoke "sat-add_u-sub_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 728 (v128.const i16x8 0 0 0 0 0 0 0 0) 729 (v128.const i16x8 1 1 1 1 1 1 1 1)) 730 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 731 (assert_return (invoke "sat-add_s-neg" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 732 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 733 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 734 (assert_return (invoke "sat-add_u-neg" (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767) 735 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 736 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 737 (assert_return (invoke "sat-sub_s-neg" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 738 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 739 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 740 (assert_return (invoke "sat-sub_u-neg" (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767) 741 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 742 (v128.const i16x8 1 1 1 1 1 1 1 1))