github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/internal/integration_test/spectest/v2/testdata/simd_conversions.wast (about) 1 ;; Web Assembly SIMD-related type conversion tests 2 3 (module 4 ;; Integer to floating point 5 (func (export "f32x4.convert_i32x4_s") (param v128) (result v128) 6 (f32x4.convert_i32x4_s (local.get 0))) 7 (func (export "f32x4.convert_i32x4_u") (param v128) (result v128) 8 (f32x4.convert_i32x4_u (local.get 0))) 9 10 (func (export "f64x2.convert_low_i32x4_s") (param v128) (result v128) 11 (f64x2.convert_low_i32x4_s (local.get 0))) 12 (func (export "f64x2.convert_low_i32x4_u") (param v128) (result v128) 13 (f64x2.convert_low_i32x4_u (local.get 0))) 14 15 ;; Integer to integer narrowing 16 (func (export "i8x16.narrow_i16x8_s") (param v128 v128) (result v128) 17 (i8x16.narrow_i16x8_s (local.get 0) (local.get 1))) 18 (func (export "i8x16.narrow_i16x8_u") (param v128 v128) (result v128) 19 (i8x16.narrow_i16x8_u (local.get 0) (local.get 1))) 20 (func (export "i16x8.narrow_i32x4_s") (param v128 v128) (result v128) 21 (i16x8.narrow_i32x4_s (local.get 0) (local.get 1))) 22 (func (export "i16x8.narrow_i32x4_u") (param v128 v128) (result v128) 23 (i16x8.narrow_i32x4_u (local.get 0)(local.get 1))) 24 25 ;; Float to float promote/demote 26 (func (export "f64x2.promote_low_f32x4") (param v128) (result v128) 27 (f64x2.promote_low_f32x4 (local.get 0))) 28 (func (export "f32x4.demote_f64x2_zero") (param v128) (result v128) 29 (f32x4.demote_f64x2_zero (local.get 0))) 30 ) 31 32 ;; f64x2.promote_low_f32x4 33 ;; Float constants copied from test/core/conversions.wast. 34 35 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 0.0 0.0 0.0 0.0)) 36 (v128.const f64x2 0.0 0.0)) 37 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 -0.0 -0.0 -0.0 -0.0)) 38 (v128.const f64x2 -0.0 -0.0)) 39 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 0x1p-149 0x1p-149 0x1p-149 0x1p-149)) 40 (v128.const f64x2 0x1p-149 0x1p-149)) 41 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 -0x1p-149 -0x1p-149 -0x1p-149 -0x1p-149)) 42 (v128.const f64x2 -0x1p-149 -0x1p-149)) 43 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 1.0 1.0 1.0 1.0)) 44 (v128.const f64x2 1.0 1.0)) 45 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 -1.0 -1.0 -1.0 -1.0)) 46 (v128.const f64x2 -1.0 -1.0)) 47 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 -0x1.fffffep+127 -0x1.fffffep+127 -0x1.fffffep+127 -0x1.fffffep+127)) 48 (v128.const f64x2 -0x1.fffffep+127 -0x1.fffffep+127)) 49 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 0x1.fffffep+127 0x1.fffffep+127 0x1.fffffep+127 0x1.fffffep+127)) 50 (v128.const f64x2 0x1.fffffep+127 0x1.fffffep+127)) 51 ;; Generated randomly by picking a random int and reinterpret it to float. 52 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 0x1p-119 0x1p-119 0x1p-119 0x1p-119)) 53 (v128.const f64x2 0x1p-119 0x1p-119)) 54 ;; Generated randomly by picking a random float. 55 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 0x1.8f867ep+125 0x1.8f867ep+125 0x1.8f867ep+125 0x1.8f867ep+125)) 56 (v128.const f64x2 6.6382536710104395e+37 6.6382536710104395e+37)) 57 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 inf inf inf inf)) 58 (v128.const f64x2 inf inf)) 59 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 -inf -inf -inf -inf)) 60 (v128.const f64x2 -inf -inf)) 61 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 nan nan nan nan)) 62 (v128.const f64x2 nan:canonical nan:canonical)) 63 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 nan:0x200000 nan:0x200000 nan:0x200000 nan:0x200000)) 64 (v128.const f64x2 nan:arithmetic nan:arithmetic)) 65 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 -nan -nan -nan -nan)) 66 (v128.const f64x2 nan:canonical nan:canonical)) 67 (assert_return (invoke "f64x2.promote_low_f32x4" (v128.const f32x4 -nan:0x200000 -nan:0x200000 -nan:0x200000 -nan:0x200000)) 68 (v128.const f64x2 nan:arithmetic nan:arithmetic)) 69 70 ;; f32x4.demote_f64x2_zero 71 ;; Float constants copied from test/core/conversions.wast. 72 73 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0.0 0.0)) 74 (v128.const f32x4 0.0 0.0 0 0)) 75 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0.0 -0.0)) 76 (v128.const f32x4 -0.0 -0.0 0 0)) 77 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x0.0000000000001p-1022 0x0.0000000000001p-1022)) 78 (v128.const f32x4 0.0 0.0 0 0)) 79 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0x0.0000000000001p-1022 -0x0.0000000000001p-1022)) 80 (v128.const f32x4 -0.0 -0.0 0 0)) 81 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 1.0 1.0)) 82 (v128.const f32x4 1.0 1.0 0 0)) 83 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -1.0 -1.0)) 84 (v128.const f32x4 -1.0 -1.0 0 0)) 85 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.fffffe0000000p-127 0x1.fffffe0000000p-127)) 86 (v128.const f32x4 0x1p-126 0x1p-126 0 0)) 87 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0x1.fffffe0000000p-127 -0x1.fffffe0000000p-127)) 88 (v128.const f32x4 -0x1p-126 -0x1p-126 0 0)) 89 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.fffffdfffffffp-127 0x1.fffffdfffffffp-127)) 90 (v128.const f32x4 0x1.fffffcp-127 0x1.fffffcp-127 0 0)) 91 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0x1.fffffdfffffffp-127 -0x1.fffffdfffffffp-127)) 92 (v128.const f32x4 -0x1.fffffcp-127 -0x1.fffffcp-127 0 0)) 93 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1p-149 0x1p-149)) 94 (v128.const f32x4 0x1p-149 0x1p-149 0 0)) 95 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0x1p-149 -0x1p-149)) 96 (v128.const f32x4 -0x1p-149 -0x1p-149 0 0)) 97 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.fffffd0000000p+127 0x1.fffffd0000000p+127)) 98 (v128.const f32x4 0x1.fffffcp+127 0x1.fffffcp+127 0 0)) 99 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0x1.fffffd0000000p+127 -0x1.fffffd0000000p+127)) 100 (v128.const f32x4 -0x1.fffffcp+127 -0x1.fffffcp+127 0 0)) 101 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.fffffd0000001p+127 0x1.fffffd0000001p+127)) 102 (v128.const f32x4 0x1.fffffep+127 0x1.fffffep+127 0 0)) 103 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0x1.fffffd0000001p+127 -0x1.fffffd0000001p+127)) 104 (v128.const f32x4 -0x1.fffffep+127 -0x1.fffffep+127 0 0)) 105 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.fffffep+127 0x1.fffffep+127)) 106 (v128.const f32x4 0x1.fffffep+127 0x1.fffffep+127 0 0)) 107 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0x1.fffffep+127 -0x1.fffffep+127)) 108 (v128.const f32x4 -0x1.fffffep+127 -0x1.fffffep+127 0 0)) 109 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.fffffefffffffp+127 0x1.fffffefffffffp+127)) 110 (v128.const f32x4 0x1.fffffep+127 0x1.fffffep+127 0 0)) 111 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0x1.fffffefffffffp+127 -0x1.fffffefffffffp+127)) 112 (v128.const f32x4 -0x1.fffffep+127 -0x1.fffffep+127 0 0)) 113 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.ffffffp+127 0x1.ffffffp+127)) 114 (v128.const f32x4 inf inf 0 0)) 115 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0x1.ffffffp+127 -0x1.ffffffp+127)) 116 (v128.const f32x4 -inf -inf 0 0)) 117 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1p-119 0x1p-119)) 118 (v128.const f32x4 0x1p-119 0x1p-119 0 0)) 119 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.8f867ep+125 0x1.8f867ep+125)) 120 (v128.const f32x4 0x1.8f867ep+125 0x1.8f867ep+125 0 0)) 121 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 inf inf)) 122 (v128.const f32x4 inf inf 0 0)) 123 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -inf -inf)) 124 (v128.const f32x4 -inf -inf 0 0)) 125 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.0000000000001p+0 0x1.0000000000001p+0)) 126 (v128.const f32x4 1.0 1.0 0 0)) 127 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.fffffffffffffp-1 0x1.fffffffffffffp-1)) 128 (v128.const f32x4 1.0 1.0 0 0)) 129 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.0000010000000p+0 0x1.0000010000000p+0)) 130 (v128.const f32x4 0x1.000000p+0 0x1.000000p+0 0 0)) 131 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.0000010000001p+0 0x1.0000010000001p+0)) 132 (v128.const f32x4 0x1.000002p+0 0x1.000002p+0 0 0)) 133 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.000002fffffffp+0 0x1.000002fffffffp+0)) 134 (v128.const f32x4 0x1.000002p+0 0x1.000002p+0 0 0)) 135 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.0000030000000p+0 0x1.0000030000000p+0)) 136 (v128.const f32x4 0x1.000004p+0 0x1.000004p+0 0 0)) 137 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.0000050000000p+0 0x1.0000050000000p+0)) 138 (v128.const f32x4 0x1.000004p+0 0x1.000004p+0 0 0)) 139 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.0000010000000p+24 0x1.0000010000000p+24)) 140 (v128.const f32x4 0x1.0p+24 0x1.0p+24 0 0)) 141 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.0000010000001p+24 0x1.0000010000001p+24)) 142 (v128.const f32x4 0x1.000002p+24 0x1.000002p+24 0 0)) 143 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.000002fffffffp+24 0x1.000002fffffffp+24)) 144 (v128.const f32x4 0x1.000002p+24 0x1.000002p+24 0 0)) 145 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.0000030000000p+24 0x1.0000030000000p+24)) 146 (v128.const f32x4 0x1.000004p+24 0x1.000004p+24 0 0)) 147 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.4eae4f7024c7p+108 0x1.4eae4f7024c7p+108)) 148 (v128.const f32x4 0x1.4eae5p+108 0x1.4eae5p+108 0 0)) 149 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.a12e71e358685p-113 0x1.a12e71e358685p-113)) 150 (v128.const f32x4 0x1.a12e72p-113 0x1.a12e72p-113 0 0)) 151 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.cb98354d521ffp-127 0x1.cb98354d521ffp-127)) 152 (v128.const f32x4 0x1.cb9834p-127 0x1.cb9834p-127 0 0)) 153 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0x1.6972b30cfb562p+1 -0x1.6972b30cfb562p+1)) 154 (v128.const f32x4 -0x1.6972b4p+1 -0x1.6972b4p+1 0 0)) 155 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0x1.bedbe4819d4c4p+112 -0x1.bedbe4819d4c4p+112)) 156 (v128.const f32x4 -0x1.bedbe4p+112 -0x1.bedbe4p+112 0 0)) 157 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 nan nan)) 158 (v128.const f32x4 nan:canonical nan:canonical 0 0)) 159 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 nan:0x4000000000000 nan:0x4000000000000)) 160 (v128.const f32x4 nan:arithmetic nan:arithmetic 0 0)) 161 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -nan -nan)) 162 (v128.const f32x4 nan:canonical nan:canonical 0 0)) 163 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -nan:0x4000000000000 -nan:0x4000000000000)) 164 (v128.const f32x4 nan:arithmetic nan:arithmetic 0 0)) 165 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1p-1022 0x1p-1022)) 166 (v128.const f32x4 0.0 0.0 0 0)) 167 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0x1p-1022 -0x1p-1022)) 168 (v128.const f32x4 -0.0 -0.0 0 0)) 169 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.0p-150 0x1.0p-150)) 170 (v128.const f32x4 0.0 0.0 0 0)) 171 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0x1.0p-150 -0x1.0p-150)) 172 (v128.const f32x4 -0.0 -0.0 0 0)) 173 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 0x1.0000000000001p-150 0x1.0000000000001p-150)) 174 (v128.const f32x4 0x1p-149 0x1p-149 0 0)) 175 (assert_return (invoke "f32x4.demote_f64x2_zero" (v128.const f64x2 -0x1.0000000000001p-150 -0x1.0000000000001p-150)) 176 (v128.const f32x4 -0x1p-149 -0x1p-149 0 0)) 177 178 179 ;; Integer to floating point 180 ;; f32x4.convert_i32x4_s 181 182 (assert_return (invoke "f32x4.convert_i32x4_s" (v128.const i32x4 0 0 0 0)) 183 (v128.const f32x4 0.0 0.0 0.0 0.0)) 184 (assert_return (invoke "f32x4.convert_i32x4_s" (v128.const i32x4 1 1 1 1)) 185 (v128.const f32x4 1.0 1.0 1.0 1.0)) 186 (assert_return (invoke "f32x4.convert_i32x4_s" (v128.const i32x4 -1 -1 -1 -1)) 187 (v128.const f32x4 -1.0 -1.0 -1.0 -1.0)) 188 (assert_return (invoke "f32x4.convert_i32x4_s" (v128.const i32x4 2147483647 2147483647 2147483647 2147483647)) 189 (v128.const f32x4 2147483647.0 2147483647.0 2147483647.0 2147483647.0)) 190 (assert_return (invoke "f32x4.convert_i32x4_s" (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648)) 191 (v128.const f32x4 -2147483648.0 -2147483648.0 -2147483648.0 -2147483648.0)) 192 (assert_return (invoke "f32x4.convert_i32x4_s" (v128.const i32x4 1234567890 1234567890 1234567890 1234567890)) 193 (v128.const f32x4 0x1.26580cp+30 0x1.26580cp+30 0x1.26580cp+30 0x1.26580cp+30)) 194 (assert_return (invoke "f32x4.convert_i32x4_s" (v128.const i32x4 0_123_456_792 0_123_456_792 0_123_456_792 0_123_456_792)) 195 (v128.const f32x4 123456792.0 123456792.0 123456792.0 123456792.0)) 196 (assert_return (invoke "f32x4.convert_i32x4_s" (v128.const i32x4 0x0_1234_5680 0x0_1234_5680 0x0_1234_5680 0x0_1234_5680)) 197 (v128.const f32x4 305419904.0 305419904.0 305419904.0 305419904.0)) 198 ;; Test rounding directions. 199 200 (assert_return (invoke "f32x4.convert_i32x4_s" (v128.const i32x4 16777217 16777217 16777217 16777217)) 201 (v128.const f32x4 16777216.0 16777216.0 16777216.0 16777216.0)) 202 (assert_return (invoke "f32x4.convert_i32x4_s" (v128.const i32x4 -16777217 -16777217 -16777217 -16777217)) 203 (v128.const f32x4 -16777216.0 -16777216.0 -16777216.0 -16777216.0)) 204 (assert_return (invoke "f32x4.convert_i32x4_s" (v128.const i32x4 16777219 16777219 16777219 16777219)) 205 (v128.const f32x4 16777220.0 16777220.0 16777220.0 16777220.0)) 206 (assert_return (invoke "f32x4.convert_i32x4_s" (v128.const i32x4 -16777219 -16777219 -16777219 -16777219)) 207 (v128.const f32x4 -16777220.0 -16777220.0 -16777220.0 -16777220.0)) 208 (assert_return (invoke "f32x4.convert_i32x4_s" (v128.const i32x4 0 -1 0x7fffffff 0x80000000)) 209 (v128.const f32x4 0.0 -1.0 2147483647.0 -2147483648.0)) 210 211 ;; f32x4.convert_i32x4_u 212 213 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 0 0 0 0)) 214 (v128.const f32x4 0.0 0.0 0.0 0.0)) 215 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 1 1 1 1)) 216 (v128.const f32x4 1.0 1.0 1.0 1.0)) 217 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 -1 -1 -1 -1)) 218 (v128.const f32x4 4294967295.0 4294967295.0 4294967295.0 4294967295.0)) 219 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 2147483647 2147483647 2147483647 2147483647)) 220 (v128.const f32x4 2147483648.0 2147483648.0 2147483648.0 2147483648.0)) 221 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648)) 222 (v128.const f32x4 2147483648.0 2147483648.0 2147483648.0 2147483648.0)) 223 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 0x12345678 0x12345678 0x12345678 0x12345678)) 224 (v128.const f32x4 0x1.234568p+28 0x1.234568p+28 0x1.234568p+28 0x1.234568p+28)) 225 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 0x80000080 0x80000080 0x80000080 0x80000080)) 226 (v128.const f32x4 0x1.000000p+31 0x1.000000p+31 0x1.000000p+31 0x1.000000p+31)) 227 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 0x80000081 0x80000081 0x80000081 0x80000081)) 228 (v128.const f32x4 0x1.000002p+31 0x1.000002p+31 0x1.000002p+31 0x1.000002p+31)) 229 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 0x80000082 0x80000082 0x80000082 0x80000082)) 230 (v128.const f32x4 0x1.000002p+31 0x1.000002p+31 0x1.000002p+31 0x1.000002p+31)) 231 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 0xfffffe80 0xfffffe80 0xfffffe80 0xfffffe80)) 232 (v128.const f32x4 0x1.fffffcp+31 0x1.fffffcp+31 0x1.fffffcp+31 0x1.fffffcp+31)) 233 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 0xfffffe81 0xfffffe81 0xfffffe81 0xfffffe81)) 234 (v128.const f32x4 0x1.fffffep+31 0x1.fffffep+31 0x1.fffffep+31 0x1.fffffep+31)) 235 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 0xfffffe82 0xfffffe82 0xfffffe82 0xfffffe82)) 236 (v128.const f32x4 0x1.fffffep+31 0x1.fffffep+31 0x1.fffffep+31 0x1.fffffep+31)) 237 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 0_123_456_792 0_123_456_792 0_123_456_792 0_123_456_792)) 238 (v128.const f32x4 123456792.0 123456792.0 123456792.0 123456792.0)) 239 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef)) 240 (v128.const f32x4 2427178496.0 2427178496.0 2427178496.0 2427178496.0)) 241 ;; Test rounding directions. 242 243 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 16777217 16777217 16777217 16777217)) 244 (v128.const f32x4 16777216.0 16777216.0 16777216.0 16777216.0)) 245 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 16777219 16777219 16777219 16777219)) 246 (v128.const f32x4 16777220.0 16777220.0 16777220.0 16777220.0)) 247 (assert_return (invoke "f32x4.convert_i32x4_u" (v128.const i32x4 0 -1 0x7fffffff 0x80000000)) 248 (v128.const f32x4 0.0 4294967295.0 2147483647.0 2147483648.0)) 249 250 ;; f64x2.convert_i32x4_s 251 ;; constants copied from test/core/conversions.wast. 252 253 (assert_return (invoke "f64x2.convert_low_i32x4_s" (v128.const i32x4 1 1 0 0)) 254 (v128.const f64x2 1.0 1.0)) 255 (assert_return (invoke "f64x2.convert_low_i32x4_s" (v128.const i32x4 -1 -1 0 0)) 256 (v128.const f64x2 -1.0 -1.0)) 257 (assert_return (invoke "f64x2.convert_low_i32x4_s" (v128.const i32x4 0 0 0 0)) 258 (v128.const f64x2 0.0 0.0)) 259 (assert_return (invoke "f64x2.convert_low_i32x4_s" (v128.const i32x4 2147483647 2147483647 0 0)) 260 (v128.const f64x2 2147483647 2147483647)) 261 (assert_return (invoke "f64x2.convert_low_i32x4_s" (v128.const i32x4 -2147483648 -2147483648 0 0)) 262 (v128.const f64x2 -2147483648 -2147483648)) 263 (assert_return (invoke "f64x2.convert_low_i32x4_s" (v128.const i32x4 987654321 987654321 0 0)) 264 (v128.const f64x2 987654321 987654321)) 265 266 ;; f64x2.convert_i32x4_u 267 ;; constants copied from test/core/conversions.wast. 268 269 (assert_return (invoke "f64x2.convert_low_i32x4_u" (v128.const i32x4 1 1 0 0)) 270 (v128.const f64x2 1.0 1.0)) 271 (assert_return (invoke "f64x2.convert_low_i32x4_u" (v128.const i32x4 0 0 0 0)) 272 (v128.const f64x2 0.0 0.0)) 273 (assert_return (invoke "f64x2.convert_low_i32x4_u" (v128.const i32x4 2147483647 2147483647 0 0)) 274 (v128.const f64x2 2147483647 2147483647)) 275 (assert_return (invoke "f64x2.convert_low_i32x4_u" (v128.const i32x4 -2147483648 -2147483648 0 0)) 276 (v128.const f64x2 2147483648 2147483648)) 277 (assert_return (invoke "f64x2.convert_low_i32x4_u" (v128.const i32x4 0xffffffff 0xffffffff 0 0)) 278 (v128.const f64x2 4294967295.0 4294967295.0)) 279 280 ;; Integer to integer narrowing 281 ;; i8x16.narrow_i16x8_s 282 283 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 0 0 0 0 0 0 0 0) 284 (v128.const i16x8 0 0 0 0 0 0 0 0)) 285 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) 286 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 0 0 0 0 0 0 0 0) 287 (v128.const i16x8 1 1 1 1 1 1 1 1)) 288 (v128.const i8x16 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1)) 289 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 290 (v128.const i16x8 0 0 0 0 0 0 0 0)) 291 (v128.const i8x16 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0)) 292 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 0 0 0 0 0 0 0 0) 293 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 294 (v128.const i8x16 0 0 0 0 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1)) 295 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1) 296 (v128.const i16x8 0 0 0 0 0 0 0 0)) 297 (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0)) 298 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 299 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 300 (v128.const i8x16 1 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 -1)) 301 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1) 302 (v128.const i16x8 1 1 1 1 1 1 1 1)) 303 (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 1 1 1 1 1 1 1 1)) 304 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e) 305 (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 306 (v128.const i8x16 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 307 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f) 308 (v128.const i16x8 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e)) 309 (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e)) 310 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f) 311 (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 312 (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 313 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80) 314 (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)) 315 (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 316 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f) 317 (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)) 318 (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 319 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80) 320 (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 321 (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 322 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f) 323 (v128.const i16x8 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 324 (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 325 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff) 326 (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 327 (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 328 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f) 329 (v128.const i16x8 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80)) 330 (v128.const i8x16 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80)) 331 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80) 332 (v128.const i16x8 -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f -0x7f)) 333 (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81)) 334 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80) 335 (v128.const i16x8 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80)) 336 (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)) 337 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81) 338 (v128.const i16x8 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81)) 339 (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)) 340 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81) 341 (v128.const i16x8 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80)) 342 (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)) 343 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80) 344 (v128.const i16x8 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81)) 345 (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)) 346 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80) 347 (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 348 (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 349 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80) 350 (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)) 351 (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 352 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81) 353 (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 354 (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 355 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80) 356 (v128.const i16x8 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 357 (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 358 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81) 359 (v128.const i16x8 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100)) 360 (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 361 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000) 362 (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff)) 363 (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 364 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345) 365 (v128.const i16x8 056_789 056_789 056_789 056_789 056_789 056_789 056_789 056_789)) 366 (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)) 367 (assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234) 368 (v128.const i16x8 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678 0x0_5678)) 369 (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 370 ;; i8x16.narrow_i16x8_u 371 372 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0 0 0 0 0 0 0 0) 373 (v128.const i16x8 0 0 0 0 0 0 0 0)) 374 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) 375 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0 0 0 0 0 0 0 0) 376 (v128.const i16x8 1 1 1 1 1 1 1 1)) 377 (v128.const i8x16 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1)) 378 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 1 1 1 1 1 1 1 1) 379 (v128.const i16x8 0 0 0 0 0 0 0 0)) 380 (v128.const i8x16 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0)) 381 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0 0 0 0 0 0 0 0) 382 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 383 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) 384 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1) 385 (v128.const i16x8 0 0 0 0 0 0 0 0)) 386 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) 387 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 1 1 1 1 1 1 1 1) 388 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 389 (v128.const i8x16 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0)) 390 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1) 391 (v128.const i16x8 1 1 1 1 1 1 1 1)) 392 (v128.const i8x16 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1)) 393 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e) 394 (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 395 (v128.const i8x16 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 396 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f) 397 (v128.const i16x8 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e)) 398 (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e 0x7e)) 399 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f) 400 (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 401 (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 402 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80) 403 (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)) 404 (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)) 405 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f) 406 (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)) 407 (v128.const i8x16 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)) 408 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80) 409 (v128.const i16x8 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 410 (v128.const i8x16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f)) 411 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0xfe 0xfe 0xfe 0xfe 0xfe 0xfe 0xfe 0xfe) 412 (v128.const i16x8 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 413 (v128.const i8x16 0xfe 0xfe 0xfe 0xfe 0xfe 0xfe 0xfe 0xfe 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 414 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff) 415 (v128.const i16x8 0xfe 0xfe 0xfe 0xfe 0xfe 0xfe 0xfe 0xfe)) 416 (v128.const i8x16 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xfe 0xfe 0xfe 0xfe 0xfe 0xfe 0xfe 0xfe)) 417 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff) 418 (v128.const i16x8 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 419 (v128.const i8x16 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 420 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100) 421 (v128.const i16x8 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100)) 422 (v128.const i8x16 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 423 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff) 424 (v128.const i16x8 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100)) 425 (v128.const i8x16 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 426 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100) 427 (v128.const i16x8 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 428 (v128.const i8x16 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 429 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0 0 0 0 0 0 0 0) 430 (v128.const i16x8 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 431 (v128.const i8x16 0 0 0 0 0 0 0 0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 432 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0 0 0 0 0 0 0 0) 433 (v128.const i16x8 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100)) 434 (v128.const i8x16 0 0 0 0 0 0 0 0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 435 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1) 436 (v128.const i16x8 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 437 (v128.const i8x16 0 0 0 0 0 0 0 0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 438 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1) 439 (v128.const i16x8 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100)) 440 (v128.const i8x16 0 0 0 0 0 0 0 0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 441 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000) 442 (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff)) 443 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) 444 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 056_789 056_789 056_789 056_789 056_789 056_789 056_789 056_789) 445 (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345)) 446 (v128.const i8x16 0 0 0 0 0 0 0 0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 447 (assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB) 448 (v128.const i16x8 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234)) 449 (v128.const i8x16 0 0 0 0 0 0 0 0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff)) 450 ;; i16x8.narrow_i32x4_s 451 452 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 0 0 0 0) 453 (v128.const i32x4 0 0 0 0)) 454 (v128.const i16x8 0 0 0 0 0 0 0 0)) 455 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 0 0 0 0) 456 (v128.const i32x4 1 1 1 1)) 457 (v128.const i16x8 0 0 0 0 1 1 1 1)) 458 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 1 1 1 1) 459 (v128.const i32x4 0 0 0 0)) 460 (v128.const i16x8 1 1 1 1 0 0 0 0)) 461 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 0 0 0 0) 462 (v128.const i32x4 -1 -1 -1 -1)) 463 (v128.const i16x8 0 0 0 0 -1 -1 -1 -1)) 464 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 -1 -1 -1 -1) 465 (v128.const i32x4 0 0 0 0)) 466 (v128.const i16x8 -1 -1 -1 -1 0 0 0 0)) 467 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 1 1 1 1) 468 (v128.const i32x4 -1 -1 -1 -1)) 469 (v128.const i16x8 1 1 1 1 -1 -1 -1 -1)) 470 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 -1 -1 -1 -1) 471 (v128.const i32x4 1 1 1 1)) 472 (v128.const i16x8 -1 -1 -1 -1 1 1 1 1)) 473 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 0x7ffe 0x7ffe 0x7ffe 0x7ffe) 474 (v128.const i32x4 0x7fff 0x7fff 0x7fff 0x7fff)) 475 (v128.const i16x8 0x7ffe 0x7ffe 0x7ffe 0x7ffe 0x7fff 0x7fff 0x7fff 0x7fff)) 476 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 0x7fff 0x7fff 0x7fff 0x7fff) 477 (v128.const i32x4 0x7ffe 0x7ffe 0x7ffe 0x7ffe)) 478 (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7ffe 0x7ffe 0x7ffe 0x7ffe)) 479 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 0x7fff 0x7fff 0x7fff 0x7fff) 480 (v128.const i32x4 0x7fff 0x7fff 0x7fff 0x7fff)) 481 (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff)) 482 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 0x8000 0x8000 0x8000 0x8000) 483 (v128.const i32x4 0x8000 0x8000 0x8000 0x8000)) 484 (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff)) 485 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 0x7fff 0x7fff 0x7fff 0x7fff) 486 (v128.const i32x4 0x8000 0x8000 0x8000 0x8000)) 487 (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff)) 488 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 0x8000 0x8000 0x8000 0x8000) 489 (v128.const i32x4 0x7fff 0x7fff 0x7fff 0x7fff)) 490 (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff)) 491 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 0x7fff 0x7fff 0x7fff 0x7fff) 492 (v128.const i32x4 0xffff 0xffff 0xffff 0xffff)) 493 (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff)) 494 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 0xffff 0xffff 0xffff 0xffff) 495 (v128.const i32x4 0x7fff 0x7fff 0x7fff 0x7fff)) 496 (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff)) 497 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 -0x7fff -0x7fff -0x7fff -0x7fff) 498 (v128.const i32x4 -0x8000 -0x8000 -0x8000 -0x8000)) 499 (v128.const i16x8 0x8001 0x8001 0x8001 0x8001 0x8000 0x8000 0x8000 0x8000)) 500 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 -0x8000 -0x8000 -0x8000 -0x8000) 501 (v128.const i32x4 -0x7fff -0x7fff -0x7fff -0x7fff)) 502 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8001 0x8001 0x8001 0x8001)) 503 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 -0x8000 -0x8000 -0x8000 -0x8000) 504 (v128.const i32x4 -0x8000 -0x8000 -0x8000 -0x8000)) 505 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)) 506 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 -0x8001 -0x8001 -0x8001 -0x8001) 507 (v128.const i32x4 -0x8001 -0x8001 -0x8001 -0x8001)) 508 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)) 509 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 -0x8001 -0x8001 -0x8001 -0x8001) 510 (v128.const i32x4 -0x8000 -0x8000 -0x8000 -0x8000)) 511 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)) 512 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 -0x8000 -0x8000 -0x8000 -0x8000) 513 (v128.const i32x4 -0x8001 -0x8001 -0x8001 -0x8001)) 514 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)) 515 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 -0x8000 -0x8000 -0x8000 -0x8000) 516 (v128.const i32x4 0x7fff 0x7fff 0x7fff 0x7fff)) 517 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x7fff 0x7fff 0x7fff 0x7fff)) 518 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 -0x8000 -0x8000 -0x8000 -0x8000) 519 (v128.const i32x4 0x8000 0x8000 0x8000 0x8000)) 520 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x7fff 0x7fff 0x7fff 0x7fff)) 521 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 -0x8001 -0x8001 -0x8001 -0x8001) 522 (v128.const i32x4 0x7fff 0x7fff 0x7fff 0x7fff)) 523 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x7fff 0x7fff 0x7fff 0x7fff)) 524 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 -0x8000 -0x8000 -0x8000 -0x8000) 525 (v128.const i32x4 0xffff 0xffff 0xffff 0xffff)) 526 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x7fff 0x7fff 0x7fff 0x7fff)) 527 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 -0x8001 -0x8001 -0x8001 -0x8001) 528 (v128.const i32x4 0x10000 0x10000 0x10000 0x10000)) 529 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x7fff 0x7fff 0x7fff 0x7fff)) 530 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 -0x8000000 -0x8000000 -0x8000000 -0x8000000) 531 (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff)) 532 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0xffff 0xffff 0xffff 0xffff)) 533 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 0_123_456_789 0_123_456_789 0_123_456_789 0_123_456_789) 534 (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890)) 535 (v128.const i16x8 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff 0x7fff)) 536 (assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef) 537 (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678)) 538 (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x7fff 0x7fff 0x7fff 0x7fff)) 539 ;; i16x8.narrow_i32x4_u 540 541 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 0 0 0 0) 542 (v128.const i32x4 0 0 0 0)) 543 (v128.const i16x8 0 0 0 0 0 0 0 0)) 544 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 0 0 0 0) 545 (v128.const i32x4 1 1 1 1)) 546 (v128.const i16x8 0 0 0 0 1 1 1 1)) 547 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 1 1 1 1) 548 (v128.const i32x4 0 0 0 0)) 549 (v128.const i16x8 1 1 1 1 0 0 0 0)) 550 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 0 0 0 0) 551 (v128.const i32x4 -1 -1 -1 -1)) 552 (v128.const i16x8 0 0 0 0 0 0 0 0)) 553 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 -1 -1 -1 -1) 554 (v128.const i32x4 0 0 0 0)) 555 (v128.const i16x8 0 0 0 0 0 0 0 0)) 556 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 1 1 1 1) 557 (v128.const i32x4 -1 -1 -1 -1)) 558 (v128.const i16x8 1 1 1 1 0 0 0 0)) 559 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 -1 -1 -1 -1) 560 (v128.const i32x4 1 1 1 1)) 561 (v128.const i16x8 0 0 0 0 1 1 1 1)) 562 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 0xfffe 0xfffe 0xfffe 0xfffe) 563 (v128.const i32x4 0xffff 0xffff 0xffff 0xffff)) 564 (v128.const i16x8 0xfffe 0xfffe 0xfffe 0xfffe 0xffff 0xffff 0xffff 0xffff)) 565 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 0xffff 0xffff 0xffff 0xffff) 566 (v128.const i32x4 0xfffe 0xfffe 0xfffe 0xfffe)) 567 (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xfffe 0xfffe 0xfffe 0xfffe)) 568 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 0xffff 0xffff 0xffff 0xffff) 569 (v128.const i32x4 0xffff 0xffff 0xffff 0xffff)) 570 (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff)) 571 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 0x10000 0x10000 0x10000 0x10000) 572 (v128.const i32x4 0x10000 0x10000 0x10000 0x10000)) 573 (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff)) 574 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 0xffff 0xffff 0xffff 0xffff) 575 (v128.const i32x4 0x10000 0x10000 0x10000 0x10000)) 576 (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff)) 577 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 0x10000 0x10000 0x10000 0x10000) 578 (v128.const i32x4 0xffff 0xffff 0xffff 0xffff)) 579 (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff)) 580 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 0 0 0 0) 581 (v128.const i32x4 0xffff 0xffff 0xffff 0xffff)) 582 (v128.const i16x8 0 0 0 0 0xffff 0xffff 0xffff 0xffff)) 583 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 0 0 0 0) 584 (v128.const i32x4 0x10000 0x10000 0x10000 0x10000)) 585 (v128.const i16x8 0 0 0 0 0xffff 0xffff 0xffff 0xffff)) 586 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 -1 -1 -1 -1) 587 (v128.const i32x4 0xffff 0xffff 0xffff 0xffff)) 588 (v128.const i16x8 0 0 0 0 0xffff 0xffff 0xffff 0xffff)) 589 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 -1 -1 -1 -1) 590 (v128.const i32x4 0x10000 0x10000 0x10000 0x10000)) 591 (v128.const i16x8 0 0 0 0 0xffff 0xffff 0xffff 0xffff)) 592 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 -0x80000000 -0x80000000 -0x80000000 -0x80000000) 593 (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff)) 594 (v128.const i16x8 0 0 0 0 0 0 0 0)) 595 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 0_123_456_789 0_123_456_789 0_123_456_789 0_123_456_789) 596 (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890)) 597 (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff)) 598 (assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef) 599 (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678)) 600 (v128.const i16x8 0 0 0 0 0xffff 0xffff 0xffff 0xffff)) 601 602 603 ;; Unknown operator 604 605 (assert_malformed (module quote 606 "(func (result v128) (i32x4.trunc_sat_f32x4 (v128.const f32x4 0.0 0.0 0.0 0.0)))") 607 "unknown operator") 608 (assert_malformed (module quote 609 "(func (result v128) (i32x4.trunc_s_sat_f32x4 (v128.const f32x4 -2.0 -1.0 1.0 2.0)))") 610 "unknown operator") 611 (assert_malformed (module quote 612 "(func (result v128) (i32x4.trunc_u_sat_f32x4 (v128.const f32x4 -2.0 -1.0 1.0 2.0)))") 613 "unknown operator") 614 (assert_malformed (module quote 615 "(func (result v128) (i32x4.convert_f32x4 (v128.const f32x4 -1 0 1 2)))") 616 "unknown operator") 617 (assert_malformed (module quote 618 "(func (result v128) (i32x4.convert_s_f32x4 (v128.const f32x4 -1 0 1 2)))") 619 "unknown operator") 620 (assert_malformed (module quote 621 "(func (result v128) (i32x4.convert_u_f32x4 (v128.const f32x4 -1 0 1 2)))") 622 "unknown operator") 623 624 (assert_malformed (module quote 625 "(func (result v128) (i64x2.trunc_sat_f64x2_s (v128.const f64x2 0.0 0.0)))") 626 "unknown operator") 627 (assert_malformed (module quote 628 "(func (result v128) (i64x2.trunc_sat_f64x2_u (v128.const f64x2 -2.0 -1.0)))") 629 "unknown operator") 630 (assert_malformed (module quote 631 "(func (result v128) (f64x2.convert_i64x2_s (v128.const i64x2 1 2)))") 632 "unknown operator") 633 (assert_malformed (module quote 634 "(func (result v128) (f64x2.convert_i64x2_u (v128.const i64x2 1 2)))") 635 "unknown operator") 636 637 (assert_malformed (module quote 638 "(func (result v128) (i8x16.narrow_i16x8 (v128.const i16x8 0 0 0 0 0 0 0 0) (v128.const i16x8 0 0 0 0 0 0 0 0)))") 639 "unknown operator") 640 (assert_malformed (module quote 641 "(func (result v128) (i16x8.narrow_i8x16 (v128.const i16x8 0 0 0 0 0 0 0 0) (v128.const i16x8 0 0 0 0 0 0 0 0)))") 642 "unknown operator") 643 (assert_malformed (module quote 644 "(func (result v128) (i16x8.narrow_i8x16_s (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)))") 645 "unknown operator") 646 (assert_malformed (module quote 647 "(func (result v128) (i16x8.narrow_i8x16_u (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)))") 648 "unknown operator") 649 (assert_malformed (module quote 650 "(func (result v128) (i16x8.narrow_i32x4 (v128.const i16x8 0 0 0 0 0 0 0 0) (v128.const i16x8 0 0 0 0 0 0 0 0)))") 651 "unknown operator") 652 (assert_malformed (module quote 653 "(func (result v128) (i32x4.narrow_i16x8 (v128.const i16x8 0 0 0 0 0 0 0 0) (v128.const i16x8 0 0 0 0 0 0 0 0)))") 654 "unknown operator") 655 (assert_malformed (module quote 656 "(func (result v128) (i32x4.narrow_i16x8_s (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)))") 657 "unknown operator") 658 (assert_malformed (module quote 659 "(func (result v128) (i32x4.narrow_i16x8_u (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)))") 660 "unknown operator") 661 662 (assert_malformed (module quote 663 "(func (result v128) (i16x8.extend_low_i8x16 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)))") 664 "unknown operator") 665 (assert_malformed (module quote 666 "(func (result v128) (i8x16.extend_low_i16x8_s (v128.const i16x8 0 0 0 0 0 0 0 0)))") 667 "unknown operator") 668 (assert_malformed (module quote 669 "(func (result v128) (i8x16.extend_low_i16x8_u (v128.const i16x8 0 0 0 0 0 0 0 0)))") 670 "unknown operator") 671 (assert_malformed (module quote 672 "(func (result v128) (i16x8.extend_high_i8x16 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)))") 673 "unknown operator") 674 (assert_malformed (module quote 675 "(func (result v128) (i8x16.extend_high_i16x8_s (v128.const i16x8 0 0 0 0 0 0 0 0)))") 676 "unknown operator") 677 (assert_malformed (module quote 678 "(func (result v128) (i8x16.extend_high_i16x8_u (v128.const i16x8 0 0 0 0 0 0 0 0)))") 679 "unknown operator") 680 (assert_malformed (module quote 681 "(func (result v128) (i32x4.extend_low_i16x8 (v128.const i16x8 0 0 0 0 0 0 0 0)))") 682 "unknown operator") 683 (assert_malformed (module quote 684 "(func (result v128) (i16x8.extend_low_i32x4_s (v128.const i32x4 0 0 0 0)))") 685 "unknown operator") 686 (assert_malformed (module quote 687 "(func (result v128) (i16x8.extend_low_i32x4_u (v128.const i32x4 0 0 0 0)))") 688 "unknown operator") 689 (assert_malformed (module quote 690 "(func (result v128) (i32x4.extend_high_i16x8 (v128.const i16x8 0 0 0 0 0 0 0 0)))") 691 "unknown operator") 692 (assert_malformed (module quote 693 "(func (result v128) (i16x8.extend_high_i32x4_s (v128.const i32x4 0 0 0 0)))") 694 "unknown operator") 695 (assert_malformed (module quote 696 "(func (result v128) (i16x8.extend_high_i32x4_u (v128.const i32x4 0 0 0 0)))") 697 "unknown operator") 698 699 700 ;; Type mismatch 701 702 (assert_invalid (module (func (result v128) (f32x4.convert_i32x4_s (i32.const 0)))) "type mismatch") 703 (assert_invalid (module (func (result v128) (f32x4.convert_i32x4_s (i64.const 0)))) "type mismatch") 704 (assert_invalid (module (func (result v128) (f32x4.convert_i32x4_u (i32.const 0)))) "type mismatch") 705 (assert_invalid (module (func (result v128) (f32x4.convert_i32x4_u (i64.const 0)))) "type mismatch") 706 707 (assert_invalid (module (func (result v128) (i8x16.narrow_i16x8_s (i32.const 0) (i64.const 0)))) "type mismatch") 708 (assert_invalid (module (func (result v128) (i8x16.narrow_i16x8_u (i32.const 0) (i64.const 0)))) "type mismatch") 709 (assert_invalid (module (func (result v128) (i16x8.narrow_i32x4_s (f32.const 0.0) (f64.const 0.0)))) "type mismatch") 710 (assert_invalid (module (func (result v128) (i16x8.narrow_i32x4_s (f32.const 0.0) (f64.const 0.0)))) "type mismatch") 711 712 713 ;; Combinations 714 715 (module 716 (func (export "f32x4_convert_i32x4_s_add") (param v128 v128) (result v128) 717 (f32x4.convert_i32x4_s (i32x4.add (local.get 0) (local.get 1)))) 718 (func (export "f32x4_convert_i32x4_s_sub") (param v128 v128) (result v128) 719 (f32x4.convert_i32x4_s (i32x4.sub (local.get 0) (local.get 1)))) 720 (func (export "f32x4_convert_i32x4_u_mul") (param v128 v128) (result v128) 721 (f32x4.convert_i32x4_u (i32x4.mul (local.get 0) (local.get 1)))) 722 723 (func (export "i16x8_low_extend_narrow_ss") (param v128 v128) (result v128) 724 (i16x8.extend_low_i8x16_s (i8x16.narrow_i16x8_s (local.get 0) (local.get 1)))) 725 (func (export "i16x8_low_extend_narrow_su") (param v128 v128) (result v128) 726 (i16x8.extend_low_i8x16_s (i8x16.narrow_i16x8_u (local.get 0) (local.get 1)))) 727 (func (export "i16x8_high_extend_narrow_ss") (param v128 v128) (result v128) 728 (i16x8.extend_low_i8x16_s (i8x16.narrow_i16x8_s (local.get 0) (local.get 1)))) 729 (func (export "i16x8_high_extend_narrow_su") (param v128 v128) (result v128) 730 (i16x8.extend_low_i8x16_s (i8x16.narrow_i16x8_u (local.get 0) (local.get 1)))) 731 (func (export "i16x8_low_extend_narrow_uu") (param v128 v128) (result v128) 732 (i16x8.extend_low_i8x16_u (i8x16.narrow_i16x8_u (local.get 0) (local.get 1)))) 733 (func (export "i16x8_low_extend_narrow_us") (param v128 v128) (result v128) 734 (i16x8.extend_low_i8x16_u (i8x16.narrow_i16x8_s (local.get 0) (local.get 1)))) 735 (func (export "i16x8_high_extend_narrow_uu") (param v128 v128) (result v128) 736 (i16x8.extend_low_i8x16_u (i8x16.narrow_i16x8_u (local.get 0) (local.get 1)))) 737 (func (export "i16x8_high_extend_narrow_us") (param v128 v128) (result v128) 738 (i16x8.extend_low_i8x16_u (i8x16.narrow_i16x8_s (local.get 0) (local.get 1)))) 739 740 (func (export "i32x4_low_extend_narrow_ss") (param v128 v128) (result v128) 741 (i32x4.extend_low_i16x8_s (i16x8.narrow_i32x4_s (local.get 0) (local.get 1)))) 742 (func (export "i32x4_low_extend_narrow_su") (param v128 v128) (result v128) 743 (i32x4.extend_low_i16x8_s (i16x8.narrow_i32x4_u (local.get 0) (local.get 1)))) 744 (func (export "i32x4_high_extend_narrow_ss") (param v128 v128) (result v128) 745 (i32x4.extend_low_i16x8_s (i16x8.narrow_i32x4_s (local.get 0) (local.get 1)))) 746 (func (export "i32x4_high_extend_narrow_su") (param v128 v128) (result v128) 747 (i32x4.extend_low_i16x8_s (i16x8.narrow_i32x4_u (local.get 0) (local.get 1)))) 748 (func (export "i32x4_low_extend_narrow_uu") (param v128 v128) (result v128) 749 (i32x4.extend_low_i16x8_u (i16x8.narrow_i32x4_u (local.get 0) (local.get 1)))) 750 (func (export "i32x4_low_extend_narrow_us") (param v128 v128) (result v128) 751 (i32x4.extend_low_i16x8_u (i16x8.narrow_i32x4_s (local.get 0) (local.get 1)))) 752 (func (export "i32x4_high_extend_narrow_uu") (param v128 v128) (result v128) 753 (i32x4.extend_low_i16x8_u (i16x8.narrow_i32x4_u (local.get 0) (local.get 1)))) 754 (func (export "i32x4_high_extend_narrow_us") (param v128 v128) (result v128) 755 (i32x4.extend_low_i16x8_u (i16x8.narrow_i32x4_s (local.get 0) (local.get 1)))) 756 ) 757 758 (assert_return (invoke "f32x4_convert_i32x4_s_add" (v128.const i32x4 1 2 3 4) 759 (v128.const i32x4 2 3 4 5)) 760 (v128.const f32x4 3.0 5.0 7.0 9.0)) 761 (assert_return (invoke "f32x4_convert_i32x4_s_sub" (v128.const i32x4 0 1 2 3) 762 (v128.const i32x4 1 1 1 1)) 763 (v128.const f32x4 -1.0 0.0 1.0 2.0)) 764 (assert_return (invoke "f32x4_convert_i32x4_u_mul" (v128.const i32x4 1 2 3 4) 765 (v128.const i32x4 1 2 3 4)) 766 (v128.const f32x4 1.0 4.0 9.0 16.0)) 767 768 (assert_return (invoke "i16x8_low_extend_narrow_ss" (v128.const i16x8 -0x8000 -0x7fff 0x7fff 0x8000 -0x8000 -0x7fff 0x7fff 0x8000) 769 (v128.const i16x8 -0x8000 -0x7fff 0x7fff 0x8000 -0x8000 -0x7fff 0x7fff 0x8000)) 770 (v128.const i16x8 0xff80 0xff80 0x7f 0xff80 0xff80 0xff80 0x7f 0xff80)) 771 (assert_return (invoke "i16x8_low_extend_narrow_su" (v128.const i16x8 -0x8000 -0x7fff 0x7fff 0xffff -0x8000 -0x7fff 0x7fff 0xffff) 772 (v128.const i16x8 -0x8000 -0x7fff 0x7fff 0xffff -0x8000 -0x7fff 0x7fff 0xffff)) 773 (v128.const i16x8 0 0 0xffff 0 0 0 0xffff 0)) 774 (assert_return (invoke "i16x8_high_extend_narrow_ss" (v128.const i16x8 -0x8000 -0x7fff 0x7fff 0x8000 -0x8000 -0x7fff 0x7fff 0x8000) 775 (v128.const i16x8 -0x8000 -0x7fff 0x7fff 0x8000 -0x8000 -0x7fff 0x7fff 0x8000)) 776 (v128.const i16x8 0xff80 0xff80 0x7f 0xff80 0xff80 0xff80 0x7f 0xff80)) 777 (assert_return (invoke "i16x8_high_extend_narrow_su" (v128.const i16x8 -0x8000 -0x7fff 0x7fff 0xffff -0x8000 -0x7fff 0x7fff 0xffff) 778 (v128.const i16x8 -0x8000 -0x7fff 0x7fff 0xffff -0x8000 -0x7fff 0x7fff 0xffff)) 779 (v128.const i16x8 0 0 0xffff 0 0 0 0xffff 0)) 780 (assert_return (invoke "i16x8_low_extend_narrow_uu" (v128.const i16x8 -0x8000 -0x7fff 0x8000 0xffff -0x8000 -0x7fff 0x8000 0xffff) 781 (v128.const i16x8 -0x8000 -0x7fff 0x8000 0xffff -0x8000 -0x7fff 0x8000 0xffff)) 782 (v128.const i16x8 0 0 0 0 0 0 0 0)) 783 (assert_return (invoke "i16x8_low_extend_narrow_us" (v128.const i16x8 -0x8000 -0x7fff 0x7fff 0x8000 -0x8000 -0x7fff 0x7fff 0x8000) 784 (v128.const i16x8 -0x8000 -0x7fff 0x7fff 0x8000 -0x8000 -0x7fff 0x7fff 0x8000)) 785 (v128.const i16x8 0x80 0x80 0x7f 0x80 0x80 0x80 0x7f 0x80)) 786 (assert_return (invoke "i16x8_high_extend_narrow_uu" (v128.const i16x8 -0x8000 -0x7fff 0x7fff 0xffff -0x8000 -0x7fff 0x7fff 0xffff) 787 (v128.const i16x8 -0x8000 -0x7fff 0x7fff 0xffff -0x8000 -0x7fff 0x7fff 0xffff)) 788 (v128.const i16x8 0 0 0xff 0 0 0 0xff 0)) 789 (assert_return (invoke "i16x8_high_extend_narrow_us" (v128.const i16x8 -0x8000 -0x7fff 0x7fff 0x8000 -0x8000 -0x7fff 0x7fff 0x8000) 790 (v128.const i16x8 -0x8000 -0x7fff 0x7fff 0x8000 -0x8000 -0x7fff 0x7fff 0x8000)) 791 (v128.const i16x8 0x80 0x80 0x7f 0x80 0x80 0x80 0x7f 0x80)) 792 793 (assert_return (invoke "i32x4_low_extend_narrow_ss" (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0x8000000) 794 (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0x8000000)) 795 (v128.const i32x4 0xffff8000 0xffff8000 0x7fff 0x7fff)) 796 (assert_return (invoke "i32x4_low_extend_narrow_su" (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0xffffffff) 797 (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0xffffffff)) 798 (v128.const i32x4 0 0 0xffffffff 0)) 799 (assert_return (invoke "i32x4_high_extend_narrow_ss" (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0x8000000) 800 (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0x8000000)) 801 (v128.const i32x4 0xffff8000 0xffff8000 0x7fff 0x7fff)) 802 (assert_return (invoke "i32x4_high_extend_narrow_su" (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0xffffffff) 803 (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0xffffffff)) 804 (v128.const i32x4 0 0 0xffffffff 0)) 805 (assert_return (invoke "i32x4_low_extend_narrow_uu" (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0xffffffff) 806 (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0xffffffff)) 807 (v128.const i32x4 0 0 0xffff 0)) 808 (assert_return (invoke "i32x4_low_extend_narrow_us" (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0x8000000) 809 (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0x8000000)) 810 (v128.const i32x4 0x8000 0x8000 0x7fff 0x7fff)) 811 (assert_return (invoke "i32x4_high_extend_narrow_uu" (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0xffffffff) 812 (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0xffffffff)) 813 (v128.const i32x4 0 0 0xffff 0)) 814 (assert_return (invoke "i32x4_high_extend_narrow_us" (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0x8000000) 815 (v128.const i32x4 -0x80000000 -0x7fffffff 0x7fffffff 0x8000000)) 816 (v128.const i32x4 0x8000 0x8000 0x7fff 0x7fff)) 817 818 ;; Test operation with empty argument 819 820 (assert_invalid 821 (module 822 (func $f32x4.convert_i32x4_s-arg-empty (result v128) 823 (f32x4.convert_i32x4_s) 824 ) 825 ) 826 "type mismatch" 827 ) 828 (assert_invalid 829 (module 830 (func $f32x4.convert_i32x4_u-arg-empty (result v128) 831 (f32x4.convert_i32x4_u) 832 ) 833 ) 834 "type mismatch" 835 ) 836 (assert_invalid 837 (module 838 (func $i8x16.narrow_i16x8_s-1st-arg-empty (result v128) 839 (i8x16.narrow_i16x8_s (v128.const i16x8 0 0 0 0 0 0 0 0)) 840 ) 841 ) 842 "type mismatch" 843 ) 844 (assert_invalid 845 (module 846 (func $i8x16.narrow_i16x8_s-arg-empty (result v128) 847 (i8x16.narrow_i16x8_s) 848 ) 849 ) 850 "type mismatch" 851 ) 852 (assert_invalid 853 (module 854 (func $i8x16.narrow_i16x8_u-1st-arg-empty (result v128) 855 (i8x16.narrow_i16x8_u (v128.const i16x8 0 0 0 0 0 0 0 0)) 856 ) 857 ) 858 "type mismatch" 859 ) 860 (assert_invalid 861 (module 862 (func $i8x16.narrow_i16x8_u-arg-empty (result v128) 863 (i8x16.narrow_i16x8_u) 864 ) 865 ) 866 "type mismatch" 867 ) 868 (assert_invalid 869 (module 870 (func $i16x8.narrow_i32x4_s-1st-arg-empty (result v128) 871 (i16x8.narrow_i32x4_s (v128.const i32x4 0 0 0 0)) 872 ) 873 ) 874 "type mismatch" 875 ) 876 (assert_invalid 877 (module 878 (func $i16x8.narrow_i32x4_s-arg-empty (result v128) 879 (i16x8.narrow_i32x4_s) 880 ) 881 ) 882 "type mismatch" 883 ) 884 (assert_invalid 885 (module 886 (func $i16x8.narrow_i32x4_u-1st-arg-empty (result v128) 887 (i16x8.narrow_i32x4_u (v128.const i32x4 0 0 0 0)) 888 ) 889 ) 890 "type mismatch" 891 ) 892 (assert_invalid 893 (module 894 (func $i16x8.narrow_i32x4_u-arg-empty (result v128) 895 (i16x8.narrow_i32x4_u) 896 ) 897 ) 898 "type mismatch" 899 )