wa-lang.org/wazero@v1.0.2/internal/integration_test/spectest/v2/testdata/conversions.wast (about) 1 (module 2 (func (export "i64.extend_i32_s") (param $x i32) (result i64) (i64.extend_i32_s (local.get $x))) 3 (func (export "i64.extend_i32_u") (param $x i32) (result i64) (i64.extend_i32_u (local.get $x))) 4 (func (export "i32.wrap_i64") (param $x i64) (result i32) (i32.wrap_i64 (local.get $x))) 5 (func (export "i32.trunc_f32_s") (param $x f32) (result i32) (i32.trunc_f32_s (local.get $x))) 6 (func (export "i32.trunc_f32_u") (param $x f32) (result i32) (i32.trunc_f32_u (local.get $x))) 7 (func (export "i32.trunc_f64_s") (param $x f64) (result i32) (i32.trunc_f64_s (local.get $x))) 8 (func (export "i32.trunc_f64_u") (param $x f64) (result i32) (i32.trunc_f64_u (local.get $x))) 9 (func (export "i64.trunc_f32_s") (param $x f32) (result i64) (i64.trunc_f32_s (local.get $x))) 10 (func (export "i64.trunc_f32_u") (param $x f32) (result i64) (i64.trunc_f32_u (local.get $x))) 11 (func (export "i64.trunc_f64_s") (param $x f64) (result i64) (i64.trunc_f64_s (local.get $x))) 12 (func (export "i64.trunc_f64_u") (param $x f64) (result i64) (i64.trunc_f64_u (local.get $x))) 13 (func (export "i32.trunc_sat_f32_s") (param $x f32) (result i32) (i32.trunc_sat_f32_s (local.get $x))) 14 (func (export "i32.trunc_sat_f32_u") (param $x f32) (result i32) (i32.trunc_sat_f32_u (local.get $x))) 15 (func (export "i32.trunc_sat_f64_s") (param $x f64) (result i32) (i32.trunc_sat_f64_s (local.get $x))) 16 (func (export "i32.trunc_sat_f64_u") (param $x f64) (result i32) (i32.trunc_sat_f64_u (local.get $x))) 17 (func (export "i64.trunc_sat_f32_s") (param $x f32) (result i64) (i64.trunc_sat_f32_s (local.get $x))) 18 (func (export "i64.trunc_sat_f32_u") (param $x f32) (result i64) (i64.trunc_sat_f32_u (local.get $x))) 19 (func (export "i64.trunc_sat_f64_s") (param $x f64) (result i64) (i64.trunc_sat_f64_s (local.get $x))) 20 (func (export "i64.trunc_sat_f64_u") (param $x f64) (result i64) (i64.trunc_sat_f64_u (local.get $x))) 21 (func (export "f32.convert_i32_s") (param $x i32) (result f32) (f32.convert_i32_s (local.get $x))) 22 (func (export "f32.convert_i64_s") (param $x i64) (result f32) (f32.convert_i64_s (local.get $x))) 23 (func (export "f64.convert_i32_s") (param $x i32) (result f64) (f64.convert_i32_s (local.get $x))) 24 (func (export "f64.convert_i64_s") (param $x i64) (result f64) (f64.convert_i64_s (local.get $x))) 25 (func (export "f32.convert_i32_u") (param $x i32) (result f32) (f32.convert_i32_u (local.get $x))) 26 (func (export "f32.convert_i64_u") (param $x i64) (result f32) (f32.convert_i64_u (local.get $x))) 27 (func (export "f64.convert_i32_u") (param $x i32) (result f64) (f64.convert_i32_u (local.get $x))) 28 (func (export "f64.convert_i64_u") (param $x i64) (result f64) (f64.convert_i64_u (local.get $x))) 29 (func (export "f64.promote_f32") (param $x f32) (result f64) (f64.promote_f32 (local.get $x))) 30 (func (export "f32.demote_f64") (param $x f64) (result f32) (f32.demote_f64 (local.get $x))) 31 (func (export "f32.reinterpret_i32") (param $x i32) (result f32) (f32.reinterpret_i32 (local.get $x))) 32 (func (export "f64.reinterpret_i64") (param $x i64) (result f64) (f64.reinterpret_i64 (local.get $x))) 33 (func (export "i32.reinterpret_f32") (param $x f32) (result i32) (i32.reinterpret_f32 (local.get $x))) 34 (func (export "i64.reinterpret_f64") (param $x f64) (result i64) (i64.reinterpret_f64 (local.get $x))) 35 ) 36 37 (assert_return (invoke "i64.extend_i32_s" (i32.const 0)) (i64.const 0)) 38 (assert_return (invoke "i64.extend_i32_s" (i32.const 10000)) (i64.const 10000)) 39 (assert_return (invoke "i64.extend_i32_s" (i32.const -10000)) (i64.const -10000)) 40 (assert_return (invoke "i64.extend_i32_s" (i32.const -1)) (i64.const -1)) 41 (assert_return (invoke "i64.extend_i32_s" (i32.const 0x7fffffff)) (i64.const 0x000000007fffffff)) 42 (assert_return (invoke "i64.extend_i32_s" (i32.const 0x80000000)) (i64.const 0xffffffff80000000)) 43 44 (assert_return (invoke "i64.extend_i32_u" (i32.const 0)) (i64.const 0)) 45 (assert_return (invoke "i64.extend_i32_u" (i32.const 10000)) (i64.const 10000)) 46 (assert_return (invoke "i64.extend_i32_u" (i32.const -10000)) (i64.const 0x00000000ffffd8f0)) 47 (assert_return (invoke "i64.extend_i32_u" (i32.const -1)) (i64.const 0xffffffff)) 48 (assert_return (invoke "i64.extend_i32_u" (i32.const 0x7fffffff)) (i64.const 0x000000007fffffff)) 49 (assert_return (invoke "i64.extend_i32_u" (i32.const 0x80000000)) (i64.const 0x0000000080000000)) 50 51 (assert_return (invoke "i32.wrap_i64" (i64.const -1)) (i32.const -1)) 52 (assert_return (invoke "i32.wrap_i64" (i64.const -100000)) (i32.const -100000)) 53 (assert_return (invoke "i32.wrap_i64" (i64.const 0x80000000)) (i32.const 0x80000000)) 54 (assert_return (invoke "i32.wrap_i64" (i64.const 0xffffffff7fffffff)) (i32.const 0x7fffffff)) 55 (assert_return (invoke "i32.wrap_i64" (i64.const 0xffffffff00000000)) (i32.const 0x00000000)) 56 (assert_return (invoke "i32.wrap_i64" (i64.const 0xfffffffeffffffff)) (i32.const 0xffffffff)) 57 (assert_return (invoke "i32.wrap_i64" (i64.const 0xffffffff00000001)) (i32.const 0x00000001)) 58 (assert_return (invoke "i32.wrap_i64" (i64.const 0)) (i32.const 0)) 59 (assert_return (invoke "i32.wrap_i64" (i64.const 1311768467463790320)) (i32.const 0x9abcdef0)) 60 (assert_return (invoke "i32.wrap_i64" (i64.const 0x00000000ffffffff)) (i32.const 0xffffffff)) 61 (assert_return (invoke "i32.wrap_i64" (i64.const 0x0000000100000000)) (i32.const 0x00000000)) 62 (assert_return (invoke "i32.wrap_i64" (i64.const 0x0000000100000001)) (i32.const 0x00000001)) 63 64 (assert_return (invoke "i32.trunc_f32_s" (f32.const 0.0)) (i32.const 0)) 65 (assert_return (invoke "i32.trunc_f32_s" (f32.const -0.0)) (i32.const 0)) 66 (assert_return (invoke "i32.trunc_f32_s" (f32.const 0x1p-149)) (i32.const 0)) 67 (assert_return (invoke "i32.trunc_f32_s" (f32.const -0x1p-149)) (i32.const 0)) 68 (assert_return (invoke "i32.trunc_f32_s" (f32.const 1.0)) (i32.const 1)) 69 (assert_return (invoke "i32.trunc_f32_s" (f32.const 0x1.19999ap+0)) (i32.const 1)) 70 (assert_return (invoke "i32.trunc_f32_s" (f32.const 1.5)) (i32.const 1)) 71 (assert_return (invoke "i32.trunc_f32_s" (f32.const -1.0)) (i32.const -1)) 72 (assert_return (invoke "i32.trunc_f32_s" (f32.const -0x1.19999ap+0)) (i32.const -1)) 73 (assert_return (invoke "i32.trunc_f32_s" (f32.const -1.5)) (i32.const -1)) 74 (assert_return (invoke "i32.trunc_f32_s" (f32.const -1.9)) (i32.const -1)) 75 (assert_return (invoke "i32.trunc_f32_s" (f32.const -2.0)) (i32.const -2)) 76 (assert_return (invoke "i32.trunc_f32_s" (f32.const 2147483520.0)) (i32.const 2147483520)) 77 (assert_return (invoke "i32.trunc_f32_s" (f32.const -2147483648.0)) (i32.const -2147483648)) 78 (assert_trap (invoke "i32.trunc_f32_s" (f32.const 2147483648.0)) "integer overflow") 79 (assert_trap (invoke "i32.trunc_f32_s" (f32.const -2147483904.0)) "integer overflow") 80 (assert_trap (invoke "i32.trunc_f32_s" (f32.const inf)) "integer overflow") 81 (assert_trap (invoke "i32.trunc_f32_s" (f32.const -inf)) "integer overflow") 82 (assert_trap (invoke "i32.trunc_f32_s" (f32.const nan)) "invalid conversion to integer") 83 (assert_trap (invoke "i32.trunc_f32_s" (f32.const nan:0x200000)) "invalid conversion to integer") 84 (assert_trap (invoke "i32.trunc_f32_s" (f32.const -nan)) "invalid conversion to integer") 85 (assert_trap (invoke "i32.trunc_f32_s" (f32.const -nan:0x200000)) "invalid conversion to integer") 86 87 (assert_return (invoke "i32.trunc_f32_u" (f32.const 0.0)) (i32.const 0)) 88 (assert_return (invoke "i32.trunc_f32_u" (f32.const -0.0)) (i32.const 0)) 89 (assert_return (invoke "i32.trunc_f32_u" (f32.const 0x1p-149)) (i32.const 0)) 90 (assert_return (invoke "i32.trunc_f32_u" (f32.const -0x1p-149)) (i32.const 0)) 91 (assert_return (invoke "i32.trunc_f32_u" (f32.const 1.0)) (i32.const 1)) 92 (assert_return (invoke "i32.trunc_f32_u" (f32.const 0x1.19999ap+0)) (i32.const 1)) 93 (assert_return (invoke "i32.trunc_f32_u" (f32.const 1.5)) (i32.const 1)) 94 (assert_return (invoke "i32.trunc_f32_u" (f32.const 1.9)) (i32.const 1)) 95 (assert_return (invoke "i32.trunc_f32_u" (f32.const 2.0)) (i32.const 2)) 96 (assert_return (invoke "i32.trunc_f32_u" (f32.const 2147483648)) (i32.const -2147483648)) ;; 0x1.00000p+31 -> 8000 0000 97 (assert_return (invoke "i32.trunc_f32_u" (f32.const 4294967040.0)) (i32.const -256)) 98 (assert_return (invoke "i32.trunc_f32_u" (f32.const -0x1.ccccccp-1)) (i32.const 0)) 99 (assert_return (invoke "i32.trunc_f32_u" (f32.const -0x1.fffffep-1)) (i32.const 0)) 100 (assert_trap (invoke "i32.trunc_f32_u" (f32.const 4294967296.0)) "integer overflow") 101 (assert_trap (invoke "i32.trunc_f32_u" (f32.const -1.0)) "integer overflow") 102 (assert_trap (invoke "i32.trunc_f32_u" (f32.const inf)) "integer overflow") 103 (assert_trap (invoke "i32.trunc_f32_u" (f32.const -inf)) "integer overflow") 104 (assert_trap (invoke "i32.trunc_f32_u" (f32.const nan)) "invalid conversion to integer") 105 (assert_trap (invoke "i32.trunc_f32_u" (f32.const nan:0x200000)) "invalid conversion to integer") 106 (assert_trap (invoke "i32.trunc_f32_u" (f32.const -nan)) "invalid conversion to integer") 107 (assert_trap (invoke "i32.trunc_f32_u" (f32.const -nan:0x200000)) "invalid conversion to integer") 108 109 (assert_return (invoke "i32.trunc_f64_s" (f64.const 0.0)) (i32.const 0)) 110 (assert_return (invoke "i32.trunc_f64_s" (f64.const -0.0)) (i32.const 0)) 111 (assert_return (invoke "i32.trunc_f64_s" (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) 112 (assert_return (invoke "i32.trunc_f64_s" (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) 113 (assert_return (invoke "i32.trunc_f64_s" (f64.const 1.0)) (i32.const 1)) 114 (assert_return (invoke "i32.trunc_f64_s" (f64.const 0x1.199999999999ap+0)) (i32.const 1)) 115 (assert_return (invoke "i32.trunc_f64_s" (f64.const 1.5)) (i32.const 1)) 116 (assert_return (invoke "i32.trunc_f64_s" (f64.const -1.0)) (i32.const -1)) 117 (assert_return (invoke "i32.trunc_f64_s" (f64.const -0x1.199999999999ap+0)) (i32.const -1)) 118 (assert_return (invoke "i32.trunc_f64_s" (f64.const -1.5)) (i32.const -1)) 119 (assert_return (invoke "i32.trunc_f64_s" (f64.const -1.9)) (i32.const -1)) 120 (assert_return (invoke "i32.trunc_f64_s" (f64.const -2.0)) (i32.const -2)) 121 (assert_return (invoke "i32.trunc_f64_s" (f64.const 2147483647.0)) (i32.const 2147483647)) 122 (assert_return (invoke "i32.trunc_f64_s" (f64.const -2147483648.0)) (i32.const -2147483648)) 123 (assert_return (invoke "i32.trunc_f64_s" (f64.const -2147483648.9)) (i32.const -2147483648)) 124 (assert_return (invoke "i32.trunc_f64_s" (f64.const 2147483647.9)) (i32.const 2147483647)) 125 (assert_trap (invoke "i32.trunc_f64_s" (f64.const 2147483648.0)) "integer overflow") 126 (assert_trap (invoke "i32.trunc_f64_s" (f64.const -2147483649.0)) "integer overflow") 127 (assert_trap (invoke "i32.trunc_f64_s" (f64.const inf)) "integer overflow") 128 (assert_trap (invoke "i32.trunc_f64_s" (f64.const -inf)) "integer overflow") 129 (assert_trap (invoke "i32.trunc_f64_s" (f64.const nan)) "invalid conversion to integer") 130 (assert_trap (invoke "i32.trunc_f64_s" (f64.const nan:0x4000000000000)) "invalid conversion to integer") 131 (assert_trap (invoke "i32.trunc_f64_s" (f64.const -nan)) "invalid conversion to integer") 132 (assert_trap (invoke "i32.trunc_f64_s" (f64.const -nan:0x4000000000000)) "invalid conversion to integer") 133 134 (assert_return (invoke "i32.trunc_f64_u" (f64.const 0.0)) (i32.const 0)) 135 (assert_return (invoke "i32.trunc_f64_u" (f64.const -0.0)) (i32.const 0)) 136 (assert_return (invoke "i32.trunc_f64_u" (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) 137 (assert_return (invoke "i32.trunc_f64_u" (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) 138 (assert_return (invoke "i32.trunc_f64_u" (f64.const 1.0)) (i32.const 1)) 139 (assert_return (invoke "i32.trunc_f64_u" (f64.const 0x1.199999999999ap+0)) (i32.const 1)) 140 (assert_return (invoke "i32.trunc_f64_u" (f64.const 1.5)) (i32.const 1)) 141 (assert_return (invoke "i32.trunc_f64_u" (f64.const 1.9)) (i32.const 1)) 142 (assert_return (invoke "i32.trunc_f64_u" (f64.const 2.0)) (i32.const 2)) 143 (assert_return (invoke "i32.trunc_f64_u" (f64.const 2147483648)) (i32.const -2147483648)) ;; 0x1.00000p+31 -> 8000 0000 144 (assert_return (invoke "i32.trunc_f64_u" (f64.const 4294967295.0)) (i32.const -1)) 145 (assert_return (invoke "i32.trunc_f64_u" (f64.const -0x1.ccccccccccccdp-1)) (i32.const 0)) 146 (assert_return (invoke "i32.trunc_f64_u" (f64.const -0x1.fffffffffffffp-1)) (i32.const 0)) 147 (assert_return (invoke "i32.trunc_f64_u" (f64.const 1e8)) (i32.const 100000000)) 148 (assert_return (invoke "i32.trunc_f64_u" (f64.const -0.9)) (i32.const 0)) 149 (assert_return (invoke "i32.trunc_f64_u" (f64.const 4294967295.9)) (i32.const 4294967295)) 150 (assert_trap (invoke "i32.trunc_f64_u" (f64.const 4294967296.0)) "integer overflow") 151 (assert_trap (invoke "i32.trunc_f64_u" (f64.const -1.0)) "integer overflow") 152 (assert_trap (invoke "i32.trunc_f64_u" (f64.const 1e16)) "integer overflow") 153 (assert_trap (invoke "i32.trunc_f64_u" (f64.const 1e30)) "integer overflow") 154 (assert_trap (invoke "i32.trunc_f64_u" (f64.const 9223372036854775808)) "integer overflow") 155 (assert_trap (invoke "i32.trunc_f64_u" (f64.const inf)) "integer overflow") 156 (assert_trap (invoke "i32.trunc_f64_u" (f64.const -inf)) "integer overflow") 157 (assert_trap (invoke "i32.trunc_f64_u" (f64.const nan)) "invalid conversion to integer") 158 (assert_trap (invoke "i32.trunc_f64_u" (f64.const nan:0x4000000000000)) "invalid conversion to integer") 159 (assert_trap (invoke "i32.trunc_f64_u" (f64.const -nan)) "invalid conversion to integer") 160 (assert_trap (invoke "i32.trunc_f64_u" (f64.const -nan:0x4000000000000)) "invalid conversion to integer") 161 162 (assert_return (invoke "i64.trunc_f32_s" (f32.const 0.0)) (i64.const 0)) 163 (assert_return (invoke "i64.trunc_f32_s" (f32.const -0.0)) (i64.const 0)) 164 (assert_return (invoke "i64.trunc_f32_s" (f32.const 0x1p-149)) (i64.const 0)) 165 (assert_return (invoke "i64.trunc_f32_s" (f32.const -0x1p-149)) (i64.const 0)) 166 (assert_return (invoke "i64.trunc_f32_s" (f32.const 1.0)) (i64.const 1)) 167 (assert_return (invoke "i64.trunc_f32_s" (f32.const 0x1.19999ap+0)) (i64.const 1)) 168 (assert_return (invoke "i64.trunc_f32_s" (f32.const 1.5)) (i64.const 1)) 169 (assert_return (invoke "i64.trunc_f32_s" (f32.const -1.0)) (i64.const -1)) 170 (assert_return (invoke "i64.trunc_f32_s" (f32.const -0x1.19999ap+0)) (i64.const -1)) 171 (assert_return (invoke "i64.trunc_f32_s" (f32.const -1.5)) (i64.const -1)) 172 (assert_return (invoke "i64.trunc_f32_s" (f32.const -1.9)) (i64.const -1)) 173 (assert_return (invoke "i64.trunc_f32_s" (f32.const -2.0)) (i64.const -2)) 174 (assert_return (invoke "i64.trunc_f32_s" (f32.const 4294967296)) (i64.const 4294967296)) ;; 0x1.00000p+32 -> 1 0000 0000 175 (assert_return (invoke "i64.trunc_f32_s" (f32.const -4294967296)) (i64.const -4294967296)) ;; -0x1.00000p+32 -> ffff ffff 0000 0000 176 (assert_return (invoke "i64.trunc_f32_s" (f32.const 9223371487098961920.0)) (i64.const 9223371487098961920)) 177 (assert_return (invoke "i64.trunc_f32_s" (f32.const -9223372036854775808.0)) (i64.const -9223372036854775808)) 178 (assert_trap (invoke "i64.trunc_f32_s" (f32.const 9223372036854775808.0)) "integer overflow") 179 (assert_trap (invoke "i64.trunc_f32_s" (f32.const -9223373136366403584.0)) "integer overflow") 180 (assert_trap (invoke "i64.trunc_f32_s" (f32.const inf)) "integer overflow") 181 (assert_trap (invoke "i64.trunc_f32_s" (f32.const -inf)) "integer overflow") 182 (assert_trap (invoke "i64.trunc_f32_s" (f32.const nan)) "invalid conversion to integer") 183 (assert_trap (invoke "i64.trunc_f32_s" (f32.const nan:0x200000)) "invalid conversion to integer") 184 (assert_trap (invoke "i64.trunc_f32_s" (f32.const -nan)) "invalid conversion to integer") 185 (assert_trap (invoke "i64.trunc_f32_s" (f32.const -nan:0x200000)) "invalid conversion to integer") 186 187 (assert_return (invoke "i64.trunc_f32_u" (f32.const 0.0)) (i64.const 0)) 188 (assert_return (invoke "i64.trunc_f32_u" (f32.const -0.0)) (i64.const 0)) 189 (assert_return (invoke "i64.trunc_f32_u" (f32.const 0x1p-149)) (i64.const 0)) 190 (assert_return (invoke "i64.trunc_f32_u" (f32.const -0x1p-149)) (i64.const 0)) 191 (assert_return (invoke "i64.trunc_f32_u" (f32.const 1.0)) (i64.const 1)) 192 (assert_return (invoke "i64.trunc_f32_u" (f32.const 0x1.19999ap+0)) (i64.const 1)) 193 (assert_return (invoke "i64.trunc_f32_u" (f32.const 1.5)) (i64.const 1)) 194 (assert_return (invoke "i64.trunc_f32_u" (f32.const 4294967296)) (i64.const 4294967296)) 195 (assert_return (invoke "i64.trunc_f32_u" (f32.const 18446742974197923840.0)) (i64.const -1099511627776)) 196 (assert_return (invoke "i64.trunc_f32_u" (f32.const -0x1.ccccccp-1)) (i64.const 0)) 197 (assert_return (invoke "i64.trunc_f32_u" (f32.const -0x1.fffffep-1)) (i64.const 0)) 198 (assert_trap (invoke "i64.trunc_f32_u" (f32.const 18446744073709551616.0)) "integer overflow") 199 (assert_trap (invoke "i64.trunc_f32_u" (f32.const -1.0)) "integer overflow") 200 (assert_trap (invoke "i64.trunc_f32_u" (f32.const inf)) "integer overflow") 201 (assert_trap (invoke "i64.trunc_f32_u" (f32.const -inf)) "integer overflow") 202 (assert_trap (invoke "i64.trunc_f32_u" (f32.const nan)) "invalid conversion to integer") 203 (assert_trap (invoke "i64.trunc_f32_u" (f32.const nan:0x200000)) "invalid conversion to integer") 204 (assert_trap (invoke "i64.trunc_f32_u" (f32.const -nan)) "invalid conversion to integer") 205 (assert_trap (invoke "i64.trunc_f32_u" (f32.const -nan:0x200000)) "invalid conversion to integer") 206 207 (assert_return (invoke "i64.trunc_f64_s" (f64.const 0.0)) (i64.const 0)) 208 (assert_return (invoke "i64.trunc_f64_s" (f64.const -0.0)) (i64.const 0)) 209 (assert_return (invoke "i64.trunc_f64_s" (f64.const 0x0.0000000000001p-1022)) (i64.const 0)) 210 (assert_return (invoke "i64.trunc_f64_s" (f64.const -0x0.0000000000001p-1022)) (i64.const 0)) 211 (assert_return (invoke "i64.trunc_f64_s" (f64.const 1.0)) (i64.const 1)) 212 (assert_return (invoke "i64.trunc_f64_s" (f64.const 0x1.199999999999ap+0)) (i64.const 1)) 213 (assert_return (invoke "i64.trunc_f64_s" (f64.const 1.5)) (i64.const 1)) 214 (assert_return (invoke "i64.trunc_f64_s" (f64.const -1.0)) (i64.const -1)) 215 (assert_return (invoke "i64.trunc_f64_s" (f64.const -0x1.199999999999ap+0)) (i64.const -1)) 216 (assert_return (invoke "i64.trunc_f64_s" (f64.const -1.5)) (i64.const -1)) 217 (assert_return (invoke "i64.trunc_f64_s" (f64.const -1.9)) (i64.const -1)) 218 (assert_return (invoke "i64.trunc_f64_s" (f64.const -2.0)) (i64.const -2)) 219 (assert_return (invoke "i64.trunc_f64_s" (f64.const 4294967296)) (i64.const 4294967296)) ;; 0x1.00000p+32 -> 1 0000 0000 220 (assert_return (invoke "i64.trunc_f64_s" (f64.const -4294967296)) (i64.const -4294967296)) ;; -0x1.00000p+32 -> ffff ffff 0000 0000 221 (assert_return (invoke "i64.trunc_f64_s" (f64.const 9223372036854774784.0)) (i64.const 9223372036854774784)) 222 (assert_return (invoke "i64.trunc_f64_s" (f64.const -9223372036854775808.0)) (i64.const -9223372036854775808)) 223 (assert_trap (invoke "i64.trunc_f64_s" (f64.const 9223372036854775808.0)) "integer overflow") 224 (assert_trap (invoke "i64.trunc_f64_s" (f64.const -9223372036854777856.0)) "integer overflow") 225 (assert_trap (invoke "i64.trunc_f64_s" (f64.const inf)) "integer overflow") 226 (assert_trap (invoke "i64.trunc_f64_s" (f64.const -inf)) "integer overflow") 227 (assert_trap (invoke "i64.trunc_f64_s" (f64.const nan)) "invalid conversion to integer") 228 (assert_trap (invoke "i64.trunc_f64_s" (f64.const nan:0x4000000000000)) "invalid conversion to integer") 229 (assert_trap (invoke "i64.trunc_f64_s" (f64.const -nan)) "invalid conversion to integer") 230 (assert_trap (invoke "i64.trunc_f64_s" (f64.const -nan:0x4000000000000)) "invalid conversion to integer") 231 232 (assert_return (invoke "i64.trunc_f64_u" (f64.const 0.0)) (i64.const 0)) 233 (assert_return (invoke "i64.trunc_f64_u" (f64.const -0.0)) (i64.const 0)) 234 (assert_return (invoke "i64.trunc_f64_u" (f64.const 0x0.0000000000001p-1022)) (i64.const 0)) 235 (assert_return (invoke "i64.trunc_f64_u" (f64.const -0x0.0000000000001p-1022)) (i64.const 0)) 236 (assert_return (invoke "i64.trunc_f64_u" (f64.const 1.0)) (i64.const 1)) 237 (assert_return (invoke "i64.trunc_f64_u" (f64.const 0x1.199999999999ap+0)) (i64.const 1)) 238 (assert_return (invoke "i64.trunc_f64_u" (f64.const 1.5)) (i64.const 1)) 239 (assert_return (invoke "i64.trunc_f64_u" (f64.const 4294967295)) (i64.const 0xffffffff)) 240 (assert_return (invoke "i64.trunc_f64_u" (f64.const 4294967296)) (i64.const 0x100000000)) 241 (assert_return (invoke "i64.trunc_f64_u" (f64.const 18446744073709549568.0)) (i64.const -2048)) 242 (assert_return (invoke "i64.trunc_f64_u" (f64.const -0x1.ccccccccccccdp-1)) (i64.const 0)) 243 (assert_return (invoke "i64.trunc_f64_u" (f64.const -0x1.fffffffffffffp-1)) (i64.const 0)) 244 (assert_return (invoke "i64.trunc_f64_u" (f64.const 1e8)) (i64.const 100000000)) 245 (assert_return (invoke "i64.trunc_f64_u" (f64.const 1e16)) (i64.const 10000000000000000)) 246 (assert_return (invoke "i64.trunc_f64_u" (f64.const 9223372036854775808)) (i64.const -9223372036854775808)) 247 (assert_trap (invoke "i64.trunc_f64_u" (f64.const 18446744073709551616.0)) "integer overflow") 248 (assert_trap (invoke "i64.trunc_f64_u" (f64.const -1.0)) "integer overflow") 249 (assert_trap (invoke "i64.trunc_f64_u" (f64.const inf)) "integer overflow") 250 (assert_trap (invoke "i64.trunc_f64_u" (f64.const -inf)) "integer overflow") 251 (assert_trap (invoke "i64.trunc_f64_u" (f64.const nan)) "invalid conversion to integer") 252 (assert_trap (invoke "i64.trunc_f64_u" (f64.const nan:0x4000000000000)) "invalid conversion to integer") 253 (assert_trap (invoke "i64.trunc_f64_u" (f64.const -nan)) "invalid conversion to integer") 254 (assert_trap (invoke "i64.trunc_f64_u" (f64.const -nan:0x4000000000000)) "invalid conversion to integer") 255 256 (assert_return (invoke "f32.convert_i32_s" (i32.const 1)) (f32.const 1.0)) 257 (assert_return (invoke "f32.convert_i32_s" (i32.const -1)) (f32.const -1.0)) 258 (assert_return (invoke "f32.convert_i32_s" (i32.const 0)) (f32.const 0.0)) 259 (assert_return (invoke "f32.convert_i32_s" (i32.const 2147483647)) (f32.const 2147483648)) 260 (assert_return (invoke "f32.convert_i32_s" (i32.const -2147483648)) (f32.const -2147483648)) 261 (assert_return (invoke "f32.convert_i32_s" (i32.const 1234567890)) (f32.const 0x1.26580cp+30)) 262 263 ;; Saturating conversions: test all the same values as the non-saturating conversions. 264 265 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const 0.0)) (i32.const 0)) 266 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const -0.0)) (i32.const 0)) 267 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const 0x1p-149)) (i32.const 0)) 268 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const -0x1p-149)) (i32.const 0)) 269 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const 1.0)) (i32.const 1)) 270 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const 0x1.19999ap+0)) (i32.const 1)) 271 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const 1.5)) (i32.const 1)) 272 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const -1.0)) (i32.const -1)) 273 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const -0x1.19999ap+0)) (i32.const -1)) 274 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const -1.5)) (i32.const -1)) 275 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const -1.9)) (i32.const -1)) 276 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const -2.0)) (i32.const -2)) 277 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const 2147483520.0)) (i32.const 2147483520)) 278 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const -2147483648.0)) (i32.const -2147483648)) 279 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const 2147483648.0)) (i32.const 0x7fffffff)) 280 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const -2147483904.0)) (i32.const 0x80000000)) 281 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const inf)) (i32.const 0x7fffffff)) 282 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const -inf)) (i32.const 0x80000000)) 283 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const nan)) (i32.const 0)) 284 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const nan:0x200000)) (i32.const 0)) 285 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const -nan)) (i32.const 0)) 286 (assert_return (invoke "i32.trunc_sat_f32_s" (f32.const -nan:0x200000)) (i32.const 0)) 287 288 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const 0.0)) (i32.const 0)) 289 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const -0.0)) (i32.const 0)) 290 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const 0x1p-149)) (i32.const 0)) 291 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const -0x1p-149)) (i32.const 0)) 292 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const 1.0)) (i32.const 1)) 293 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const 0x1.19999ap+0)) (i32.const 1)) 294 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const 1.5)) (i32.const 1)) 295 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const 1.9)) (i32.const 1)) 296 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const 2.0)) (i32.const 2)) 297 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const 2147483648)) (i32.const -2147483648)) ;; 0x1.00000p+31 -> 8000 0000 298 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const 4294967040.0)) (i32.const -256)) 299 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const -0x1.ccccccp-1)) (i32.const 0)) 300 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const -0x1.fffffep-1)) (i32.const 0)) 301 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const 4294967296.0)) (i32.const 0xffffffff)) 302 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const -1.0)) (i32.const 0x00000000)) 303 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const inf)) (i32.const 0xffffffff)) 304 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const -inf)) (i32.const 0x00000000)) 305 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const nan)) (i32.const 0)) 306 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const nan:0x200000)) (i32.const 0)) 307 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const -nan)) (i32.const 0)) 308 (assert_return (invoke "i32.trunc_sat_f32_u" (f32.const -nan:0x200000)) (i32.const 0)) 309 310 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const 0.0)) (i32.const 0)) 311 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const -0.0)) (i32.const 0)) 312 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) 313 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) 314 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const 1.0)) (i32.const 1)) 315 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const 0x1.199999999999ap+0)) (i32.const 1)) 316 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const 1.5)) (i32.const 1)) 317 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const -1.0)) (i32.const -1)) 318 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const -0x1.199999999999ap+0)) (i32.const -1)) 319 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const -1.5)) (i32.const -1)) 320 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const -1.9)) (i32.const -1)) 321 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const -2.0)) (i32.const -2)) 322 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const 2147483647.0)) (i32.const 2147483647)) 323 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const -2147483648.0)) (i32.const -2147483648)) 324 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const 2147483648.0)) (i32.const 0x7fffffff)) 325 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const -2147483649.0)) (i32.const 0x80000000)) 326 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const inf)) (i32.const 0x7fffffff)) 327 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const -inf)) (i32.const 0x80000000)) 328 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const nan)) (i32.const 0)) 329 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const nan:0x4000000000000)) (i32.const 0)) 330 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const -nan)) (i32.const 0)) 331 (assert_return (invoke "i32.trunc_sat_f64_s" (f64.const -nan:0x4000000000000)) (i32.const 0)) 332 333 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const 0.0)) (i32.const 0)) 334 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const -0.0)) (i32.const 0)) 335 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const 0x0.0000000000001p-1022)) (i32.const 0)) 336 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const -0x0.0000000000001p-1022)) (i32.const 0)) 337 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const 1.0)) (i32.const 1)) 338 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const 0x1.199999999999ap+0)) (i32.const 1)) 339 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const 1.5)) (i32.const 1)) 340 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const 1.9)) (i32.const 1)) 341 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const 2.0)) (i32.const 2)) 342 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const 2147483648)) (i32.const -2147483648)) ;; 0x1.00000p+31 -> 8000 0000 343 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const 4294967295.0)) (i32.const -1)) 344 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const -0x1.ccccccccccccdp-1)) (i32.const 0)) 345 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const -0x1.fffffffffffffp-1)) (i32.const 0)) 346 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const 1e8)) (i32.const 100000000)) 347 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const 4294967296.0)) (i32.const 0xffffffff)) 348 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const -1.0)) (i32.const 0x00000000)) 349 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const 1e16)) (i32.const 0xffffffff)) 350 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const 1e30)) (i32.const 0xffffffff)) 351 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const 9223372036854775808)) (i32.const 0xffffffff)) 352 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const inf)) (i32.const 0xffffffff)) 353 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const -inf)) (i32.const 0x00000000)) 354 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const nan)) (i32.const 0)) 355 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const nan:0x4000000000000)) (i32.const 0)) 356 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const -nan)) (i32.const 0)) 357 (assert_return (invoke "i32.trunc_sat_f64_u" (f64.const -nan:0x4000000000000)) (i32.const 0)) 358 359 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const 0.0)) (i64.const 0)) 360 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const -0.0)) (i64.const 0)) 361 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const 0x1p-149)) (i64.const 0)) 362 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const -0x1p-149)) (i64.const 0)) 363 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const 1.0)) (i64.const 1)) 364 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const 0x1.19999ap+0)) (i64.const 1)) 365 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const 1.5)) (i64.const 1)) 366 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const -1.0)) (i64.const -1)) 367 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const -0x1.19999ap+0)) (i64.const -1)) 368 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const -1.5)) (i64.const -1)) 369 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const -1.9)) (i64.const -1)) 370 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const -2.0)) (i64.const -2)) 371 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const 4294967296)) (i64.const 4294967296)) ;; 0x1.00000p+32 -> 1 0000 0000 372 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const -4294967296)) (i64.const -4294967296)) ;; -0x1.00000p+32 -> ffff ffff 0000 0000 373 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const 9223371487098961920.0)) (i64.const 9223371487098961920)) 374 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const -9223372036854775808.0)) (i64.const -9223372036854775808)) 375 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const 9223372036854775808.0)) (i64.const 0x7fffffffffffffff)) 376 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const -9223373136366403584.0)) (i64.const 0x8000000000000000)) 377 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const inf)) (i64.const 0x7fffffffffffffff)) 378 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const -inf)) (i64.const 0x8000000000000000)) 379 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const nan)) (i64.const 0)) 380 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const nan:0x200000)) (i64.const 0)) 381 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const -nan)) (i64.const 0)) 382 (assert_return (invoke "i64.trunc_sat_f32_s" (f32.const -nan:0x200000)) (i64.const 0)) 383 384 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const 0.0)) (i64.const 0)) 385 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const -0.0)) (i64.const 0)) 386 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const 0x1p-149)) (i64.const 0)) 387 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const -0x1p-149)) (i64.const 0)) 388 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const 1.0)) (i64.const 1)) 389 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const 0x1.19999ap+0)) (i64.const 1)) 390 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const 1.5)) (i64.const 1)) 391 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const 4294967296)) (i64.const 4294967296)) 392 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const 18446742974197923840.0)) (i64.const -1099511627776)) 393 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const -0x1.ccccccp-1)) (i64.const 0)) 394 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const -0x1.fffffep-1)) (i64.const 0)) 395 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const 18446744073709551616.0)) (i64.const 0xffffffffffffffff)) 396 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const -1.0)) (i64.const 0x0000000000000000)) 397 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const inf)) (i64.const 0xffffffffffffffff)) 398 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const -inf)) (i64.const 0x0000000000000000)) 399 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const nan)) (i64.const 0)) 400 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const nan:0x200000)) (i64.const 0)) 401 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const -nan)) (i64.const 0)) 402 (assert_return (invoke "i64.trunc_sat_f32_u" (f32.const -nan:0x200000)) (i64.const 0)) 403 404 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const 0.0)) (i64.const 0)) 405 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const -0.0)) (i64.const 0)) 406 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const 0x0.0000000000001p-1022)) (i64.const 0)) 407 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const -0x0.0000000000001p-1022)) (i64.const 0)) 408 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const 1.0)) (i64.const 1)) 409 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const 0x1.199999999999ap+0)) (i64.const 1)) 410 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const 1.5)) (i64.const 1)) 411 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const -1.0)) (i64.const -1)) 412 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const -0x1.199999999999ap+0)) (i64.const -1)) 413 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const -1.5)) (i64.const -1)) 414 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const -1.9)) (i64.const -1)) 415 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const -2.0)) (i64.const -2)) 416 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const 4294967296)) (i64.const 4294967296)) ;; 0x1.00000p+32 -> 1 0000 0000 417 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const -4294967296)) (i64.const -4294967296)) ;; -0x1.00000p+32 -> ffff ffff 0000 0000 418 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const 9223372036854774784.0)) (i64.const 9223372036854774784)) 419 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const -9223372036854775808.0)) (i64.const -9223372036854775808)) 420 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const 9223372036854775808.0)) (i64.const 0x7fffffffffffffff)) 421 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const -9223372036854777856.0)) (i64.const 0x8000000000000000)) 422 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const inf)) (i64.const 0x7fffffffffffffff)) 423 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const -inf)) (i64.const 0x8000000000000000)) 424 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const nan)) (i64.const 0)) 425 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const nan:0x4000000000000)) (i64.const 0)) 426 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const -nan)) (i64.const 0)) 427 (assert_return (invoke "i64.trunc_sat_f64_s" (f64.const -nan:0x4000000000000)) (i64.const 0)) 428 429 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const 0.0)) (i64.const 0)) 430 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const -0.0)) (i64.const 0)) 431 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const 0x0.0000000000001p-1022)) (i64.const 0)) 432 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const -0x0.0000000000001p-1022)) (i64.const 0)) 433 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const 1.0)) (i64.const 1)) 434 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const 0x1.199999999999ap+0)) (i64.const 1)) 435 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const 1.5)) (i64.const 1)) 436 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const 4294967295)) (i64.const 0xffffffff)) 437 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const 4294967296)) (i64.const 0x100000000)) 438 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const 18446744073709549568.0)) (i64.const -2048)) 439 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const -0x1.ccccccccccccdp-1)) (i64.const 0)) 440 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const -0x1.fffffffffffffp-1)) (i64.const 0)) 441 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const 1e8)) (i64.const 100000000)) 442 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const 1e16)) (i64.const 10000000000000000)) 443 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const 9223372036854775808)) (i64.const -9223372036854775808)) 444 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const 18446744073709551616.0)) (i64.const 0xffffffffffffffff)) 445 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const -1.0)) (i64.const 0x0000000000000000)) 446 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const inf)) (i64.const 0xffffffffffffffff)) 447 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const -inf)) (i64.const 0x0000000000000000)) 448 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const nan)) (i64.const 0)) 449 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const nan:0x4000000000000)) (i64.const 0)) 450 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const -nan)) (i64.const 0)) 451 (assert_return (invoke "i64.trunc_sat_f64_u" (f64.const -nan:0x4000000000000)) (i64.const 0)) 452 453 ;; Test rounding directions. 454 (assert_return (invoke "f32.convert_i32_s" (i32.const 16777217)) (f32.const 16777216.0)) 455 (assert_return (invoke "f32.convert_i32_s" (i32.const -16777217)) (f32.const -16777216.0)) 456 (assert_return (invoke "f32.convert_i32_s" (i32.const 16777219)) (f32.const 16777220.0)) 457 (assert_return (invoke "f32.convert_i32_s" (i32.const -16777219)) (f32.const -16777220.0)) 458 459 (assert_return (invoke "f32.convert_i64_s" (i64.const 1)) (f32.const 1.0)) 460 (assert_return (invoke "f32.convert_i64_s" (i64.const -1)) (f32.const -1.0)) 461 (assert_return (invoke "f32.convert_i64_s" (i64.const 0)) (f32.const 0.0)) 462 (assert_return (invoke "f32.convert_i64_s" (i64.const 9223372036854775807)) (f32.const 9223372036854775807)) 463 (assert_return (invoke "f32.convert_i64_s" (i64.const -9223372036854775808)) (f32.const -9223372036854775808)) 464 (assert_return (invoke "f32.convert_i64_s" (i64.const 314159265358979)) (f32.const 0x1.1db9e8p+48)) ;; PI 465 ;; Test rounding directions. 466 (assert_return (invoke "f32.convert_i64_s" (i64.const 16777217)) (f32.const 16777216.0)) 467 (assert_return (invoke "f32.convert_i64_s" (i64.const -16777217)) (f32.const -16777216.0)) 468 (assert_return (invoke "f32.convert_i64_s" (i64.const 16777219)) (f32.const 16777220.0)) 469 (assert_return (invoke "f32.convert_i64_s" (i64.const -16777219)) (f32.const -16777220.0)) 470 471 (assert_return (invoke "f32.convert_i64_s" (i64.const 0x7fffff4000000001)) (f32.const 0x1.fffffep+62)) 472 (assert_return (invoke "f32.convert_i64_s" (i64.const 0x8000004000000001)) (f32.const -0x1.fffffep+62)) 473 (assert_return (invoke "f32.convert_i64_s" (i64.const 0x0020000020000001)) (f32.const 0x1.000002p+53)) 474 (assert_return (invoke "f32.convert_i64_s" (i64.const 0xffdfffffdfffffff)) (f32.const -0x1.000002p+53)) 475 476 (assert_return (invoke "f64.convert_i32_s" (i32.const 1)) (f64.const 1.0)) 477 (assert_return (invoke "f64.convert_i32_s" (i32.const -1)) (f64.const -1.0)) 478 (assert_return (invoke "f64.convert_i32_s" (i32.const 0)) (f64.const 0.0)) 479 (assert_return (invoke "f64.convert_i32_s" (i32.const 2147483647)) (f64.const 2147483647)) 480 (assert_return (invoke "f64.convert_i32_s" (i32.const -2147483648)) (f64.const -2147483648)) 481 (assert_return (invoke "f64.convert_i32_s" (i32.const 987654321)) (f64.const 987654321)) 482 483 (assert_return (invoke "f64.convert_i64_s" (i64.const 1)) (f64.const 1.0)) 484 (assert_return (invoke "f64.convert_i64_s" (i64.const -1)) (f64.const -1.0)) 485 (assert_return (invoke "f64.convert_i64_s" (i64.const 0)) (f64.const 0.0)) 486 (assert_return (invoke "f64.convert_i64_s" (i64.const 9223372036854775807)) (f64.const 9223372036854775807)) 487 (assert_return (invoke "f64.convert_i64_s" (i64.const -9223372036854775808)) (f64.const -9223372036854775808)) 488 (assert_return (invoke "f64.convert_i64_s" (i64.const 4669201609102990)) (f64.const 4669201609102990)) ;; Feigenbaum 489 ;; Test rounding directions. 490 (assert_return (invoke "f64.convert_i64_s" (i64.const 9007199254740993)) (f64.const 9007199254740992)) 491 (assert_return (invoke "f64.convert_i64_s" (i64.const -9007199254740993)) (f64.const -9007199254740992)) 492 (assert_return (invoke "f64.convert_i64_s" (i64.const 9007199254740995)) (f64.const 9007199254740996)) 493 (assert_return (invoke "f64.convert_i64_s" (i64.const -9007199254740995)) (f64.const -9007199254740996)) 494 495 (assert_return (invoke "f32.convert_i32_u" (i32.const 1)) (f32.const 1.0)) 496 (assert_return (invoke "f32.convert_i32_u" (i32.const 0)) (f32.const 0.0)) 497 (assert_return (invoke "f32.convert_i32_u" (i32.const 2147483647)) (f32.const 2147483648)) 498 (assert_return (invoke "f32.convert_i32_u" (i32.const -2147483648)) (f32.const 2147483648)) 499 (assert_return (invoke "f32.convert_i32_u" (i32.const 0x12345678)) (f32.const 0x1.234568p+28)) 500 (assert_return (invoke "f32.convert_i32_u" (i32.const 0xffffffff)) (f32.const 4294967296.0)) 501 (assert_return (invoke "f32.convert_i32_u" (i32.const 0x80000080)) (f32.const 0x1.000000p+31)) 502 (assert_return (invoke "f32.convert_i32_u" (i32.const 0x80000081)) (f32.const 0x1.000002p+31)) 503 (assert_return (invoke "f32.convert_i32_u" (i32.const 0x80000082)) (f32.const 0x1.000002p+31)) 504 (assert_return (invoke "f32.convert_i32_u" (i32.const 0xfffffe80)) (f32.const 0x1.fffffcp+31)) 505 (assert_return (invoke "f32.convert_i32_u" (i32.const 0xfffffe81)) (f32.const 0x1.fffffep+31)) 506 (assert_return (invoke "f32.convert_i32_u" (i32.const 0xfffffe82)) (f32.const 0x1.fffffep+31)) 507 ;; Test rounding directions. 508 (assert_return (invoke "f32.convert_i32_u" (i32.const 16777217)) (f32.const 16777216.0)) 509 (assert_return (invoke "f32.convert_i32_u" (i32.const 16777219)) (f32.const 16777220.0)) 510 511 (assert_return (invoke "f32.convert_i64_u" (i64.const 1)) (f32.const 1.0)) 512 (assert_return (invoke "f32.convert_i64_u" (i64.const 0)) (f32.const 0.0)) 513 (assert_return (invoke "f32.convert_i64_u" (i64.const 9223372036854775807)) (f32.const 9223372036854775807)) 514 (assert_return (invoke "f32.convert_i64_u" (i64.const -9223372036854775808)) (f32.const 9223372036854775808)) 515 (assert_return (invoke "f32.convert_i64_u" (i64.const 0xffffffffffffffff)) (f32.const 18446744073709551616.0)) 516 ;; Test rounding directions. 517 (assert_return (invoke "f32.convert_i64_u" (i64.const 16777217)) (f32.const 16777216.0)) 518 (assert_return (invoke "f32.convert_i64_u" (i64.const 16777219)) (f32.const 16777220.0)) 519 520 (assert_return (invoke "f32.convert_i64_u" (i64.const 0x0020000020000001)) (f32.const 0x1.000002p+53)) 521 (assert_return (invoke "f32.convert_i64_u" (i64.const 0x7fffffbfffffffff)) (f32.const 0x1.fffffep+62)) 522 (assert_return (invoke "f32.convert_i64_u" (i64.const 0x8000008000000001)) (f32.const 0x1.000002p+63)) 523 (assert_return (invoke "f32.convert_i64_u" (i64.const 0xfffffe8000000001)) (f32.const 0x1.fffffep+63)) 524 525 (assert_return (invoke "f64.convert_i32_u" (i32.const 1)) (f64.const 1.0)) 526 (assert_return (invoke "f64.convert_i32_u" (i32.const 0)) (f64.const 0.0)) 527 (assert_return (invoke "f64.convert_i32_u" (i32.const 2147483647)) (f64.const 2147483647)) 528 (assert_return (invoke "f64.convert_i32_u" (i32.const -2147483648)) (f64.const 2147483648)) 529 (assert_return (invoke "f64.convert_i32_u" (i32.const 0xffffffff)) (f64.const 4294967295.0)) 530 531 (assert_return (invoke "f64.convert_i64_u" (i64.const 1)) (f64.const 1.0)) 532 (assert_return (invoke "f64.convert_i64_u" (i64.const 0)) (f64.const 0.0)) 533 (assert_return (invoke "f64.convert_i64_u" (i64.const 9223372036854775807)) (f64.const 9223372036854775807)) 534 (assert_return (invoke "f64.convert_i64_u" (i64.const -9223372036854775808)) (f64.const 9223372036854775808)) 535 (assert_return (invoke "f64.convert_i64_u" (i64.const 0xffffffffffffffff)) (f64.const 18446744073709551616.0)) 536 (assert_return (invoke "f64.convert_i64_u" (i64.const 0x8000000000000400)) (f64.const 0x1.0000000000000p+63)) 537 (assert_return (invoke "f64.convert_i64_u" (i64.const 0x8000000000000401)) (f64.const 0x1.0000000000001p+63)) 538 (assert_return (invoke "f64.convert_i64_u" (i64.const 0x8000000000000402)) (f64.const 0x1.0000000000001p+63)) 539 (assert_return (invoke "f64.convert_i64_u" (i64.const 0xfffffffffffff400)) (f64.const 0x1.ffffffffffffep+63)) 540 (assert_return (invoke "f64.convert_i64_u" (i64.const 0xfffffffffffff401)) (f64.const 0x1.fffffffffffffp+63)) 541 (assert_return (invoke "f64.convert_i64_u" (i64.const 0xfffffffffffff402)) (f64.const 0x1.fffffffffffffp+63)) 542 ;; Test rounding directions. 543 (assert_return (invoke "f64.convert_i64_u" (i64.const 9007199254740993)) (f64.const 9007199254740992)) 544 (assert_return (invoke "f64.convert_i64_u" (i64.const 9007199254740995)) (f64.const 9007199254740996)) 545 546 (assert_return (invoke "f64.promote_f32" (f32.const 0.0)) (f64.const 0.0)) 547 (assert_return (invoke "f64.promote_f32" (f32.const -0.0)) (f64.const -0.0)) 548 (assert_return (invoke "f64.promote_f32" (f32.const 0x1p-149)) (f64.const 0x1p-149)) 549 (assert_return (invoke "f64.promote_f32" (f32.const -0x1p-149)) (f64.const -0x1p-149)) 550 (assert_return (invoke "f64.promote_f32" (f32.const 1.0)) (f64.const 1.0)) 551 (assert_return (invoke "f64.promote_f32" (f32.const -1.0)) (f64.const -1.0)) 552 (assert_return (invoke "f64.promote_f32" (f32.const -0x1.fffffep+127)) (f64.const -0x1.fffffep+127)) 553 (assert_return (invoke "f64.promote_f32" (f32.const 0x1.fffffep+127)) (f64.const 0x1.fffffep+127)) 554 ;; Generated randomly by picking a random int and reinterpret it to float. 555 (assert_return (invoke "f64.promote_f32" (f32.const 0x1p-119)) (f64.const 0x1p-119)) 556 ;; Generated randomly by picking a random float. 557 (assert_return (invoke "f64.promote_f32" (f32.const 0x1.8f867ep+125)) (f64.const 6.6382536710104395e+37)) 558 (assert_return (invoke "f64.promote_f32" (f32.const inf)) (f64.const inf)) 559 (assert_return (invoke "f64.promote_f32" (f32.const -inf)) (f64.const -inf)) 560 (assert_return (invoke "f64.promote_f32" (f32.const nan)) (f64.const nan:canonical)) 561 (assert_return (invoke "f64.promote_f32" (f32.const nan:0x200000)) (f64.const nan:arithmetic)) 562 (assert_return (invoke "f64.promote_f32" (f32.const -nan)) (f64.const nan:canonical)) 563 (assert_return (invoke "f64.promote_f32" (f32.const -nan:0x200000)) (f64.const nan:arithmetic)) 564 565 (assert_return (invoke "f32.demote_f64" (f64.const 0.0)) (f32.const 0.0)) 566 (assert_return (invoke "f32.demote_f64" (f64.const -0.0)) (f32.const -0.0)) 567 (assert_return (invoke "f32.demote_f64" (f64.const 0x0.0000000000001p-1022)) (f32.const 0.0)) 568 (assert_return (invoke "f32.demote_f64" (f64.const -0x0.0000000000001p-1022)) (f32.const -0.0)) 569 (assert_return (invoke "f32.demote_f64" (f64.const 1.0)) (f32.const 1.0)) 570 (assert_return (invoke "f32.demote_f64" (f64.const -1.0)) (f32.const -1.0)) 571 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffe0000000p-127)) (f32.const 0x1p-126)) 572 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.fffffe0000000p-127)) (f32.const -0x1p-126)) 573 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffdfffffffp-127)) (f32.const 0x1.fffffcp-127)) 574 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.fffffdfffffffp-127)) (f32.const -0x1.fffffcp-127)) 575 (assert_return (invoke "f32.demote_f64" (f64.const 0x1p-149)) (f32.const 0x1p-149)) 576 (assert_return (invoke "f32.demote_f64" (f64.const -0x1p-149)) (f32.const -0x1p-149)) 577 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffd0000000p+127)) (f32.const 0x1.fffffcp+127)) 578 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.fffffd0000000p+127)) (f32.const -0x1.fffffcp+127)) 579 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffd0000001p+127)) (f32.const 0x1.fffffep+127)) 580 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.fffffd0000001p+127)) (f32.const -0x1.fffffep+127)) 581 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127)) 582 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127)) 583 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffefffffffp+127)) (f32.const 0x1.fffffep+127)) 584 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.fffffefffffffp+127)) (f32.const -0x1.fffffep+127)) 585 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.ffffffp+127)) (f32.const inf)) 586 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.ffffffp+127)) (f32.const -inf)) 587 (assert_return (invoke "f32.demote_f64" (f64.const 0x1p-119)) (f32.const 0x1p-119)) 588 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.8f867ep+125)) (f32.const 0x1.8f867ep+125)) 589 (assert_return (invoke "f32.demote_f64" (f64.const inf)) (f32.const inf)) 590 (assert_return (invoke "f32.demote_f64" (f64.const -inf)) (f32.const -inf)) 591 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000000000001p+0)) (f32.const 1.0)) 592 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffffffffffp-1)) (f32.const 1.0)) 593 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000010000000p+0)) (f32.const 0x1.000000p+0)) 594 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000010000001p+0)) (f32.const 0x1.000002p+0)) 595 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.000002fffffffp+0)) (f32.const 0x1.000002p+0)) 596 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000030000000p+0)) (f32.const 0x1.000004p+0)) 597 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000050000000p+0)) (f32.const 0x1.000004p+0)) 598 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000010000000p+24)) (f32.const 0x1.0p+24)) 599 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000010000001p+24)) (f32.const 0x1.000002p+24)) 600 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.000002fffffffp+24)) (f32.const 0x1.000002p+24)) 601 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000030000000p+24)) (f32.const 0x1.000004p+24)) 602 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.4eae4f7024c7p+108)) (f32.const 0x1.4eae5p+108)) 603 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.a12e71e358685p-113)) (f32.const 0x1.a12e72p-113)) 604 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.cb98354d521ffp-127)) (f32.const 0x1.cb9834p-127)) 605 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.6972b30cfb562p+1)) (f32.const -0x1.6972b4p+1)) 606 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.bedbe4819d4c4p+112)) (f32.const -0x1.bedbe4p+112)) 607 (assert_return (invoke "f32.demote_f64" (f64.const nan)) (f32.const nan:canonical)) 608 (assert_return (invoke "f32.demote_f64" (f64.const nan:0x4000000000000)) (f32.const nan:arithmetic)) 609 (assert_return (invoke "f32.demote_f64" (f64.const -nan)) (f32.const nan:canonical)) 610 (assert_return (invoke "f32.demote_f64" (f64.const -nan:0x4000000000000)) (f32.const nan:arithmetic)) 611 (assert_return (invoke "f32.demote_f64" (f64.const 0x1p-1022)) (f32.const 0.0)) 612 (assert_return (invoke "f32.demote_f64" (f64.const -0x1p-1022)) (f32.const -0.0)) 613 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.0p-150)) (f32.const 0.0)) 614 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.0p-150)) (f32.const -0.0)) 615 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000000000001p-150)) (f32.const 0x1p-149)) 616 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.0000000000001p-150)) (f32.const -0x1p-149)) 617 618 (assert_return (invoke "f32.reinterpret_i32" (i32.const 0)) (f32.const 0.0)) 619 (assert_return (invoke "f32.reinterpret_i32" (i32.const 0x80000000)) (f32.const -0.0)) 620 (assert_return (invoke "f32.reinterpret_i32" (i32.const 1)) (f32.const 0x1p-149)) 621 (assert_return (invoke "f32.reinterpret_i32" (i32.const -1)) (f32.const -nan:0x7fffff)) 622 (assert_return (invoke "f32.reinterpret_i32" (i32.const 123456789)) (f32.const 0x1.b79a2ap-113)) 623 (assert_return (invoke "f32.reinterpret_i32" (i32.const -2147483647)) (f32.const -0x1p-149)) 624 (assert_return (invoke "f32.reinterpret_i32" (i32.const 0x7f800000)) (f32.const inf)) 625 (assert_return (invoke "f32.reinterpret_i32" (i32.const 0xff800000)) (f32.const -inf)) 626 (assert_return (invoke "f32.reinterpret_i32" (i32.const 0x7fc00000)) (f32.const nan)) 627 (assert_return (invoke "f32.reinterpret_i32" (i32.const 0xffc00000)) (f32.const -nan)) 628 (assert_return (invoke "f32.reinterpret_i32" (i32.const 0x7fa00000)) (f32.const nan:0x200000)) 629 (assert_return (invoke "f32.reinterpret_i32" (i32.const 0xffa00000)) (f32.const -nan:0x200000)) 630 631 (assert_return (invoke "f64.reinterpret_i64" (i64.const 0)) (f64.const 0.0)) 632 (assert_return (invoke "f64.reinterpret_i64" (i64.const 1)) (f64.const 0x0.0000000000001p-1022)) 633 (assert_return (invoke "f64.reinterpret_i64" (i64.const -1)) (f64.const -nan:0xfffffffffffff)) 634 (assert_return (invoke "f64.reinterpret_i64" (i64.const 0x8000000000000000)) (f64.const -0.0)) 635 (assert_return (invoke "f64.reinterpret_i64" (i64.const 1234567890)) (f64.const 0x0.00000499602d2p-1022)) 636 (assert_return (invoke "f64.reinterpret_i64" (i64.const -9223372036854775807)) (f64.const -0x0.0000000000001p-1022)) 637 (assert_return (invoke "f64.reinterpret_i64" (i64.const 0x7ff0000000000000)) (f64.const inf)) 638 (assert_return (invoke "f64.reinterpret_i64" (i64.const 0xfff0000000000000)) (f64.const -inf)) 639 (assert_return (invoke "f64.reinterpret_i64" (i64.const 0x7ff8000000000000)) (f64.const nan)) 640 (assert_return (invoke "f64.reinterpret_i64" (i64.const 0xfff8000000000000)) (f64.const -nan)) 641 (assert_return (invoke "f64.reinterpret_i64" (i64.const 0x7ff4000000000000)) (f64.const nan:0x4000000000000)) 642 (assert_return (invoke "f64.reinterpret_i64" (i64.const 0xfff4000000000000)) (f64.const -nan:0x4000000000000)) 643 644 (assert_return (invoke "i32.reinterpret_f32" (f32.const 0.0)) (i32.const 0)) 645 (assert_return (invoke "i32.reinterpret_f32" (f32.const -0.0)) (i32.const 0x80000000)) 646 (assert_return (invoke "i32.reinterpret_f32" (f32.const 0x1p-149)) (i32.const 1)) 647 (assert_return (invoke "i32.reinterpret_f32" (f32.const -nan:0x7fffff)) (i32.const -1)) 648 (assert_return (invoke "i32.reinterpret_f32" (f32.const -0x1p-149)) (i32.const 0x80000001)) 649 (assert_return (invoke "i32.reinterpret_f32" (f32.const 1.0)) (i32.const 1065353216)) 650 (assert_return (invoke "i32.reinterpret_f32" (f32.const 3.1415926)) (i32.const 1078530010)) 651 (assert_return (invoke "i32.reinterpret_f32" (f32.const 0x1.fffffep+127)) (i32.const 2139095039)) 652 (assert_return (invoke "i32.reinterpret_f32" (f32.const -0x1.fffffep+127)) (i32.const -8388609)) 653 (assert_return (invoke "i32.reinterpret_f32" (f32.const inf)) (i32.const 0x7f800000)) 654 (assert_return (invoke "i32.reinterpret_f32" (f32.const -inf)) (i32.const 0xff800000)) 655 (assert_return (invoke "i32.reinterpret_f32" (f32.const nan)) (i32.const 0x7fc00000)) 656 (assert_return (invoke "i32.reinterpret_f32" (f32.const -nan)) (i32.const 0xffc00000)) 657 (assert_return (invoke "i32.reinterpret_f32" (f32.const nan:0x200000)) (i32.const 0x7fa00000)) 658 (assert_return (invoke "i32.reinterpret_f32" (f32.const -nan:0x200000)) (i32.const 0xffa00000)) 659 660 (assert_return (invoke "i64.reinterpret_f64" (f64.const 0.0)) (i64.const 0)) 661 (assert_return (invoke "i64.reinterpret_f64" (f64.const -0.0)) (i64.const 0x8000000000000000)) 662 (assert_return (invoke "i64.reinterpret_f64" (f64.const 0x0.0000000000001p-1022)) (i64.const 1)) 663 (assert_return (invoke "i64.reinterpret_f64" (f64.const -nan:0xfffffffffffff)) (i64.const -1)) 664 (assert_return (invoke "i64.reinterpret_f64" (f64.const -0x0.0000000000001p-1022)) (i64.const 0x8000000000000001)) 665 (assert_return (invoke "i64.reinterpret_f64" (f64.const 1.0)) (i64.const 4607182418800017408)) 666 (assert_return (invoke "i64.reinterpret_f64" (f64.const 3.14159265358979)) (i64.const 4614256656552045841)) 667 (assert_return (invoke "i64.reinterpret_f64" (f64.const 0x1.fffffffffffffp+1023)) (i64.const 9218868437227405311)) 668 (assert_return (invoke "i64.reinterpret_f64" (f64.const -0x1.fffffffffffffp+1023)) (i64.const -4503599627370497)) 669 (assert_return (invoke "i64.reinterpret_f64" (f64.const inf)) (i64.const 0x7ff0000000000000)) 670 (assert_return (invoke "i64.reinterpret_f64" (f64.const -inf)) (i64.const 0xfff0000000000000)) 671 (assert_return (invoke "i64.reinterpret_f64" (f64.const nan)) (i64.const 0x7ff8000000000000)) 672 (assert_return (invoke "i64.reinterpret_f64" (f64.const -nan)) (i64.const 0xfff8000000000000)) 673 (assert_return (invoke "i64.reinterpret_f64" (f64.const nan:0x4000000000000)) (i64.const 0x7ff4000000000000)) 674 (assert_return (invoke "i64.reinterpret_f64" (f64.const -nan:0x4000000000000)) (i64.const 0xfff4000000000000)) 675 676 ;; Type check 677 678 (assert_invalid (module (func (result i32) (i32.wrap_i64 (f32.const 0)))) "type mismatch") 679 (assert_invalid (module (func (result i32) (i32.trunc_f32_s (i64.const 0)))) "type mismatch") 680 (assert_invalid (module (func (result i32) (i32.trunc_f32_u (i64.const 0)))) "type mismatch") 681 (assert_invalid (module (func (result i32) (i32.trunc_f64_s (i64.const 0)))) "type mismatch") 682 (assert_invalid (module (func (result i32) (i32.trunc_f64_u (i64.const 0)))) "type mismatch") 683 (assert_invalid (module (func (result i32) (i32.reinterpret_f32 (i64.const 0)))) "type mismatch") 684 (assert_invalid (module (func (result i64) (i64.extend_i32_s (f32.const 0)))) "type mismatch") 685 (assert_invalid (module (func (result i64) (i64.extend_i32_u (f32.const 0)))) "type mismatch") 686 (assert_invalid (module (func (result i64) (i64.trunc_f32_s (i32.const 0)))) "type mismatch") 687 (assert_invalid (module (func (result i64) (i64.trunc_f32_u (i32.const 0)))) "type mismatch") 688 (assert_invalid (module (func (result i64) (i64.trunc_f64_s (i32.const 0)))) "type mismatch") 689 (assert_invalid (module (func (result i64) (i64.trunc_f64_u (i32.const 0)))) "type mismatch") 690 (assert_invalid (module (func (result i64) (i64.reinterpret_f64 (i32.const 0)))) "type mismatch") 691 (assert_invalid (module (func (result f32) (f32.convert_i32_s (i64.const 0)))) "type mismatch") 692 (assert_invalid (module (func (result f32) (f32.convert_i32_u (i64.const 0)))) "type mismatch") 693 (assert_invalid (module (func (result f32) (f32.convert_i64_s (i32.const 0)))) "type mismatch") 694 (assert_invalid (module (func (result f32) (f32.convert_i64_u (i32.const 0)))) "type mismatch") 695 (assert_invalid (module (func (result f32) (f32.demote_f64 (i32.const 0)))) "type mismatch") 696 (assert_invalid (module (func (result f32) (f32.reinterpret_i32 (i64.const 0)))) "type mismatch") 697 (assert_invalid (module (func (result f64) (f64.convert_i32_s (i64.const 0)))) "type mismatch") 698 (assert_invalid (module (func (result f64) (f64.convert_i32_u (i64.const 0)))) "type mismatch") 699 (assert_invalid (module (func (result f64) (f64.convert_i64_s (i32.const 0)))) "type mismatch") 700 (assert_invalid (module (func (result f64) (f64.convert_i64_u (i32.const 0)))) "type mismatch") 701 (assert_invalid (module (func (result f64) (f64.promote_f32 (i32.const 0)))) "type mismatch") 702 (assert_invalid (module (func (result f64) (f64.reinterpret_i64 (i32.const 0)))) "type mismatch")