| 1 |
;; Test floating-point literal parsing. |
| 2 |
|
| 3 |
(module |
| 4 |
;; f32 special values |
| 5 |
(func (export "f32.nan") (result i32) (i32.reinterpret_f32 (f32.const nan))) |
| 6 |
(func (export "f32.positive_nan") (result i32) (i32.reinterpret_f32 (f32.const +nan))) |
| 7 |
(func (export "f32.negative_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan))) |
| 8 |
(func (export "f32.plain_nan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x400000))) |
| 9 |
(func (export "f32.informally_known_as_plain_snan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x200000))) |
| 10 |
(func (export "f32.all_ones_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan:0x7fffff))) |
| 11 |
(func (export "f32.misc_nan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x012345))) |
| 12 |
(func (export "f32.misc_positive_nan") (result i32) (i32.reinterpret_f32 (f32.const +nan:0x304050))) |
| 13 |
(func (export "f32.misc_negative_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan:0x2abcde))) |
| 14 |
(func (export "f32.infinity") (result i32) (i32.reinterpret_f32 (f32.const inf))) |
| 15 |
(func (export "f32.positive_infinity") (result i32) (i32.reinterpret_f32 (f32.const +inf))) |
| 16 |
(func (export "f32.negative_infinity") (result i32) (i32.reinterpret_f32 (f32.const -inf))) |
| 17 |
|
| 18 |
;; f32 numbers |
| 19 |
(func (export "f32.zero") (result i32) (i32.reinterpret_f32 (f32.const 0x0.0p0))) |
| 20 |
(func (export "f32.positive_zero") (result i32) (i32.reinterpret_f32 (f32.const +0x0.0p0))) |
| 21 |
(func (export "f32.negative_zero") (result i32) (i32.reinterpret_f32 (f32.const -0x0.0p0))) |
| 22 |
(func (export "f32.misc") (result i32) (i32.reinterpret_f32 (f32.const 0x1.921fb6p+2))) |
| 23 |
(func (export "f32.min_positive") (result i32) (i32.reinterpret_f32 (f32.const 0x1p-149))) |
| 24 |
(func (export "f32.min_normal") (result i32) (i32.reinterpret_f32 (f32.const 0x1p-126))) |
| 25 |
(func (export "f32.max_finite") (result i32) (i32.reinterpret_f32 (f32.const 0x1.fffffep+127))) |
| 26 |
(func (export "f32.max_subnormal") (result i32) (i32.reinterpret_f32 (f32.const 0x1.fffffcp-127))) |
| 27 |
(func (export "f32.trailing_dot") (result i32) (i32.reinterpret_f32 (f32.const 0x1.p10))) |
| 28 |
(func (export "f32.misc_int") (result i32) (i32.reinterpret_f32 (f32.const 0x12345))) |
| 29 |
(func (export "f32.large_int") (result i32) (i32.reinterpret_f32 (f32.const 0x1_0000_0000_0000_0000_0000))) |
| 30 |
(func (export "f32.min_int32") (result i32) (i32.reinterpret_f32 (f32.const -0x8000_0000))) |
| 31 |
(func (export "f32.min_int64") (result i32) (i32.reinterpret_f32 (f32.const -0x8000_0000_0000_0000))) |
| 32 |
|
| 33 |
;; f32 in decimal format |
| 34 |
(func (export "f32_dec.zero") (result i32) (i32.reinterpret_f32 (f32.const 0.0e0))) |
| 35 |
(func (export "f32_dec.positive_zero") (result i32) (i32.reinterpret_f32 (f32.const +0.0e0))) |
| 36 |
(func (export "f32_dec.negative_zero") (result i32) (i32.reinterpret_f32 (f32.const -0.0e0))) |
| 37 |
(func (export "f32_dec.misc") (result i32) (i32.reinterpret_f32 (f32.const 6.28318548202514648))) |
| 38 |
(func (export "f32_dec.min_positive") (result i32) (i32.reinterpret_f32 (f32.const 1.4013e-45))) |
| 39 |
(func (export "f32_dec.min_normal") (result i32) (i32.reinterpret_f32 (f32.const 1.1754944e-38))) |
| 40 |
(func (export "f32_dec.max_subnormal") (result i32) (i32.reinterpret_f32 (f32.const 1.1754942e-38))) |
| 41 |
(func (export "f32_dec.max_finite") (result i32) (i32.reinterpret_f32 (f32.const 3.4028234e+38))) |
| 42 |
(func (export "f32_dec.trailing_dot") (result i32) (i32.reinterpret_f32 (f32.const 1.e10))) |
| 43 |
(func (export "f32_dec.misc_int") (result i32) (i32.reinterpret_f32 (f32.const 12345))) |
| 44 |
(func (export "f32_dec.large_int") (result i32) (i32.reinterpret_f32 (f32.const 100_000_000_000_000_000_000))) |
| 45 |
(func (export "f32_dec.min_int32") (result i32) (i32.reinterpret_f32 (f32.const -2147483648))) |
| 46 |
(func (export "f32_dec.min_int64") (result i32) (i32.reinterpret_f32 (f32.const -9223372036854775808))) |
| 47 |
|
| 48 |
;; https://twitter.com/Archivd/status/994637336506912768 |
| 49 |
(func (export "f32_dec.root_beer_float") (result i32) (i32.reinterpret_f32 (f32.const 1.000000119))) |
| 50 |
|
| 51 |
;; f64 special values |
| 52 |
(func (export "f64.nan") (result i64) (i64.reinterpret_f64 (f64.const nan))) |
| 53 |
(func (export "f64.positive_nan") (result i64) (i64.reinterpret_f64 (f64.const +nan))) |
| 54 |
(func (export "f64.negative_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan))) |
| 55 |
(func (export "f64.plain_nan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x8000000000000))) |
| 56 |
(func (export "f64.informally_known_as_plain_snan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x4000000000000))) |
| 57 |
(func (export "f64.all_ones_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan:0xfffffffffffff))) |
| 58 |
(func (export "f64.misc_nan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x0123456789abc))) |
| 59 |
(func (export "f64.misc_positive_nan") (result i64) (i64.reinterpret_f64 (f64.const +nan:0x3040506070809))) |
| 60 |
(func (export "f64.misc_negative_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan:0x2abcdef012345))) |
| 61 |
(func (export "f64.infinity") (result i64) (i64.reinterpret_f64 (f64.const inf))) |
| 62 |
(func (export "f64.positive_infinity") (result i64) (i64.reinterpret_f64 (f64.const +inf))) |
| 63 |
(func (export "f64.negative_infinity") (result i64) (i64.reinterpret_f64 (f64.const -inf))) |
| 64 |
|
| 65 |
;; f64 numbers |
| 66 |
(func (export "f64.zero") (result i64) (i64.reinterpret_f64 (f64.const 0x0.0p0))) |
| 67 |
(func (export "f64.positive_zero") (result i64) (i64.reinterpret_f64 (f64.const +0x0.0p0))) |
| 68 |
(func (export "f64.negative_zero") (result i64) (i64.reinterpret_f64 (f64.const -0x0.0p0))) |
| 69 |
(func (export "f64.misc") (result i64) (i64.reinterpret_f64 (f64.const 0x1.921fb54442d18p+2))) |
| 70 |
(func (export "f64.min_positive") (result i64) (i64.reinterpret_f64 (f64.const 0x0.0000000000001p-1022))) |
| 71 |
(func (export "f64.min_normal") (result i64) (i64.reinterpret_f64 (f64.const 0x1p-1022))) |
| 72 |
(func (export "f64.max_subnormal") (result i64) (i64.reinterpret_f64 (f64.const 0x0.fffffffffffffp-1022))) |
| 73 |
(func (export "f64.max_finite") (result i64) (i64.reinterpret_f64 (f64.const 0x1.fffffffffffffp+1023))) |
| 74 |
(func (export "f64.trailing_dot") (result i64) (i64.reinterpret_f64 (f64.const 0x1.p100))) |
| 75 |
(func (export "f64.misc_int") (result i64) (i64.reinterpret_f64 (f64.const 0x12345))) |
| 76 |
(func (export "f64.large_int") (result i64) (i64.reinterpret_f64 (f64.const 0x1_0000_0000_0000_0000_0000))) |
| 77 |
(func (export "f64.min_int32") (result i64) (i64.reinterpret_f64 (f64.const -0x8000_0000))) |
| 78 |
(func (export "f64.min_int64") (result i64) (i64.reinterpret_f64 (f64.const -0x8000_0000_0000_0000))) |
| 79 |
|
| 80 |
;; f64 numbers in decimal format |
| 81 |
(func (export "f64_dec.zero") (result i64) (i64.reinterpret_f64 (f64.const 0.0e0))) |
| 82 |
(func (export "f64_dec.positive_zero") (result i64) (i64.reinterpret_f64 (f64.const +0.0e0))) |
| 83 |
(func (export "f64_dec.negative_zero") (result i64) (i64.reinterpret_f64 (f64.const -0.0e0))) |
| 84 |
(func (export "f64_dec.misc") (result i64) (i64.reinterpret_f64 (f64.const 6.28318530717958623))) |
| 85 |
(func (export "f64_dec.min_positive") (result i64) (i64.reinterpret_f64 (f64.const 4.94066e-324))) |
| 86 |
(func (export "f64_dec.min_normal") (result i64) (i64.reinterpret_f64 (f64.const 2.2250738585072012e-308))) |
| 87 |
(func (export "f64_dec.max_subnormal") (result i64) (i64.reinterpret_f64 (f64.const 2.2250738585072011e-308))) |
| 88 |
(func (export "f64_dec.max_finite") (result i64) (i64.reinterpret_f64 (f64.const 1.7976931348623157e+308))) |
| 89 |
(func (export "f64_dec.trailing_dot") (result i64) (i64.reinterpret_f64 (f64.const 1.e100))) |
| 90 |
(func (export "f64_dec.misc_int") (result i64) (i64.reinterpret_f64 (f64.const 12345))) |
| 91 |
(func (export "f64_dec.large_int") (result i64) (i64.reinterpret_f64 (f64.const 100_000_000_000_000_000_000))) |
| 92 |
(func (export "f64_dec.min_int32") (result i64) (i64.reinterpret_f64 (f64.const -2147483648))) |
| 93 |
(func (export "f64_dec.min_int64") (result i64) (i64.reinterpret_f64 (f64.const -9223372036854775808))) |
| 94 |
|
| 95 |
;; https://twitter.com/Archivd/status/994637336506912768 |
| 96 |
(func (export "f64_dec.root_beer_float") (result i64) (i64.reinterpret_f64 (f64.const 1.000000119))) |
| 97 |
|
| 98 |
(func (export "f32-dec-sep1") (result f32) (f32.const 1_000_000)) |
| 99 |
(func (export "f32-dec-sep2") (result f32) (f32.const 1_0_0_0)) |
| 100 |
(func (export "f32-dec-sep3") (result f32) (f32.const 100_3.141_592)) |
| 101 |
(func (export "f32-dec-sep4") (result f32) (f32.const 99e+1_3)) |
| 102 |
(func (export "f32-dec-sep5") (result f32) (f32.const 122_000.11_3_54E0_2_3)) |
| 103 |
(func (export "f32-hex-sep1") (result f32) (f32.const 0xa_0f_00_99)) |
| 104 |
(func (export "f32-hex-sep2") (result f32) (f32.const 0x1_a_A_0_f)) |
| 105 |
(func (export "f32-hex-sep3") (result f32) (f32.const 0xa0_ff.f141_a59a)) |
| 106 |
(func (export "f32-hex-sep4") (result f32) (f32.const 0xf0P+1_3)) |
| 107 |
(func (export "f32-hex-sep5") (result f32) (f32.const 0x2a_f00a.1f_3_eep2_3)) |
| 108 |
|
| 109 |
(func (export "f64-dec-sep1") (result f64) (f64.const 1_000_000)) |
| 110 |
(func (export "f64-dec-sep2") (result f64) (f64.const 1_0_0_0)) |
| 111 |
(func (export "f64-dec-sep3") (result f64) (f64.const 100_3.141_592)) |
| 112 |
(func (export "f64-dec-sep4") (result f64) (f64.const 99e-1_23)) |
| 113 |
(func (export "f64-dec-sep5") (result f64) (f64.const 122_000.11_3_54e0_2_3)) |
| 114 |
(func (export "f64-hex-sep1") (result f64) (f64.const 0xa_f00f_0000_9999)) |
| 115 |
(func (export "f64-hex-sep2") (result f64) (f64.const 0x1_a_A_0_f)) |
| 116 |
(func (export "f64-hex-sep3") (result f64) (f64.const 0xa0_ff.f141_a59a)) |
| 117 |
(func (export "f64-hex-sep4") (result f64) (f64.const 0xf0P+1_3)) |
| 118 |
(func (export "f64-hex-sep5") (result f64) (f64.const 0x2a_f00a.1f_3_eep2_3)) |
| 119 |
) |
| 120 |
|
| 121 |
(assert_return (invoke "f32.nan") (i32.const 0x7fc00000)) |
| 122 |
(assert_return (invoke "f32.positive_nan") (i32.const 0x7fc00000)) |
| 123 |
(assert_return (invoke "f32.negative_nan") (i32.const 0xffc00000)) |
| 124 |
(assert_return (invoke "f32.plain_nan") (i32.const 0x7fc00000)) |
| 125 |
(assert_return (invoke "f32.informally_known_as_plain_snan") (i32.const 0x7fa00000)) |
| 126 |
(assert_return (invoke "f32.all_ones_nan") (i32.const 0xffffffff)) |
| 127 |
(assert_return (invoke "f32.misc_nan") (i32.const 0x7f812345)) |
| 128 |
(assert_return (invoke "f32.misc_positive_nan") (i32.const 0x7fb04050)) |
| 129 |
(assert_return (invoke "f32.misc_negative_nan") (i32.const 0xffaabcde)) |
| 130 |
(assert_return (invoke "f32.infinity") (i32.const 0x7f800000)) |
| 131 |
(assert_return (invoke "f32.positive_infinity") (i32.const 0x7f800000)) |
| 132 |
(assert_return (invoke "f32.negative_infinity") (i32.const 0xff800000)) |
| 133 |
(assert_return (invoke "f32.zero") (i32.const 0)) |
| 134 |
(assert_return (invoke "f32.positive_zero") (i32.const 0)) |
| 135 |
(assert_return (invoke "f32.negative_zero") (i32.const 0x80000000)) |
| 136 |
(assert_return (invoke "f32.misc") (i32.const 0x40c90fdb)) |
| 137 |
(assert_return (invoke "f32.min_positive") (i32.const 1)) |
| 138 |
(assert_return (invoke "f32.min_normal") (i32.const 0x800000)) |
| 139 |
(assert_return (invoke "f32.max_subnormal") (i32.const 0x7fffff)) |
| 140 |
(assert_return (invoke "f32.max_finite") (i32.const 0x7f7fffff)) |
| 141 |
(assert_return (invoke "f32.trailing_dot") (i32.const 0x44800000)) |
| 142 |
(assert_return (invoke "f32.misc_int") (i32.const 0x4791a280)) |
| 143 |
(assert_return (invoke "f32.large_int") (i32.const 0x67800000)) |
| 144 |
(assert_return (invoke "f32.min_int32") (i32.const 0xcf000000)) |
| 145 |
(assert_return (invoke "f32.min_int64") (i32.const 0xdf000000)) |
| 146 |
(assert_return (invoke "f32_dec.zero") (i32.const 0)) |
| 147 |
(assert_return (invoke "f32_dec.positive_zero") (i32.const 0)) |
| 148 |
(assert_return (invoke "f32_dec.negative_zero") (i32.const 0x80000000)) |
| 149 |
(assert_return (invoke "f32_dec.misc") (i32.const 0x40c90fdb)) |
| 150 |
(assert_return (invoke "f32_dec.min_positive") (i32.const 1)) |
| 151 |
(assert_return (invoke "f32_dec.min_normal") (i32.const 0x800000)) |
| 152 |
(assert_return (invoke "f32_dec.max_subnormal") (i32.const 0x7fffff)) |
| 153 |
(assert_return (invoke "f32_dec.max_finite") (i32.const 0x7f7fffff)) |
| 154 |
(assert_return (invoke "f32_dec.trailing_dot") (i32.const 0x501502f9)) |
| 155 |
(assert_return (invoke "f32_dec.root_beer_float") (i32.const 0x3f800001)) |
| 156 |
(assert_return (invoke "f32_dec.misc_int") (i32.const 0x4640e400)) |
| 157 |
(assert_return (invoke "f32_dec.large_int") (i32.const 0x60ad78ec)) |
| 158 |
(assert_return (invoke "f32_dec.min_int32") (i32.const 0xcf000000)) |
| 159 |
(assert_return (invoke "f32_dec.min_int64") (i32.const 0xdf000000)) |
| 160 |
|
| 161 |
(assert_return (invoke "f64.nan") (i64.const 0x7ff8000000000000)) |
| 162 |
(assert_return (invoke "f64.positive_nan") (i64.const 0x7ff8000000000000)) |
| 163 |
(assert_return (invoke "f64.negative_nan") (i64.const 0xfff8000000000000)) |
| 164 |
(assert_return (invoke "f64.plain_nan") (i64.const 0x7ff8000000000000)) |
| 165 |
(assert_return (invoke "f64.informally_known_as_plain_snan") (i64.const 0x7ff4000000000000)) |
| 166 |
(assert_return (invoke "f64.all_ones_nan") (i64.const 0xffffffffffffffff)) |
| 167 |
(assert_return (invoke "f64.misc_nan") (i64.const 0x7ff0123456789abc)) |
| 168 |
(assert_return (invoke "f64.misc_positive_nan") (i64.const 0x7ff3040506070809)) |
| 169 |
(assert_return (invoke "f64.misc_negative_nan") (i64.const 0xfff2abcdef012345)) |
| 170 |
(assert_return (invoke "f64.infinity") (i64.const 0x7ff0000000000000)) |
| 171 |
(assert_return (invoke "f64.positive_infinity") (i64.const 0x7ff0000000000000)) |
| 172 |
(assert_return (invoke "f64.negative_infinity") (i64.const 0xfff0000000000000)) |
| 173 |
(assert_return (invoke "f64.zero") (i64.const 0)) |
| 174 |
(assert_return (invoke "f64.positive_zero") (i64.const 0)) |
| 175 |
(assert_return (invoke "f64.negative_zero") (i64.const 0x8000000000000000)) |
| 176 |
(assert_return (invoke "f64.misc") (i64.const 0x401921fb54442d18)) |
| 177 |
(assert_return (invoke "f64.min_positive") (i64.const 1)) |
| 178 |
(assert_return (invoke "f64.min_normal") (i64.const 0x10000000000000)) |
| 179 |
(assert_return (invoke "f64.max_subnormal") (i64.const 0xfffffffffffff)) |
| 180 |
(assert_return (invoke "f64.max_finite") (i64.const 0x7fefffffffffffff)) |
| 181 |
(assert_return (invoke "f64.trailing_dot") (i64.const 0x4630000000000000)) |
| 182 |
(assert_return (invoke "f64.misc_int") (i64.const 0x40f2345000000000)) |
| 183 |
(assert_return (invoke "f64.large_int") (i64.const 0x44f0000000000000)) |
| 184 |
(assert_return (invoke "f64.min_int32") (i64.const 0xc1e0000000000000)) |
| 185 |
(assert_return (invoke "f64.min_int64") (i64.const 0xc3e0000000000000)) |
| 186 |
(assert_return (invoke "f64_dec.zero") (i64.const 0)) |
| 187 |
(assert_return (invoke "f64_dec.positive_zero") (i64.const 0)) |
| 188 |
(assert_return (invoke "f64_dec.negative_zero") (i64.const 0x8000000000000000)) |
| 189 |
(assert_return (invoke "f64_dec.misc") (i64.const 0x401921fb54442d18)) |
| 190 |
(assert_return (invoke "f64_dec.min_positive") (i64.const 1)) |
| 191 |
(assert_return (invoke "f64_dec.min_normal") (i64.const 0x10000000000000)) |
| 192 |
(assert_return (invoke "f64_dec.max_subnormal") (i64.const 0xfffffffffffff)) |
| 193 |
(assert_return (invoke "f64_dec.max_finite") (i64.const 0x7fefffffffffffff)) |
| 194 |
(assert_return (invoke "f64_dec.trailing_dot") (i64.const 0x54b249ad2594c37d)) |
| 195 |
(assert_return (invoke "f64_dec.root_beer_float") (i64.const 0x3ff000001ff19e24)) |
| 196 |
(assert_return (invoke "f64_dec.misc_int") (i64.const 0x40c81c8000000000)) |
| 197 |
(assert_return (invoke "f64_dec.large_int") (i64.const 0x4415af1d78b58c40)) |
| 198 |
(assert_return (invoke "f64_dec.min_int32") (i64.const 0xc1e0000000000000)) |
| 199 |
(assert_return (invoke "f64_dec.min_int64") (i64.const 0xc3e0000000000000)) |
| 200 |
|
| 201 |
(assert_return (invoke "f32-dec-sep1") (f32.const 1000000)) |
| 202 |
(assert_return (invoke "f32-dec-sep2") (f32.const 1000)) |
| 203 |
(assert_return (invoke "f32-dec-sep3") (f32.const 1003.141592)) |
| 204 |
(assert_return (invoke "f32-dec-sep4") (f32.const 99e+13)) |
| 205 |
(assert_return (invoke "f32-dec-sep5") (f32.const 122000.11354e23)) |
| 206 |
(assert_return (invoke "f32-hex-sep1") (f32.const 0xa0f0099)) |
| 207 |
(assert_return (invoke "f32-hex-sep2") (f32.const 0x1aa0f)) |
| 208 |
(assert_return (invoke "f32-hex-sep3") (f32.const 0xa0ff.f141a59a)) |
| 209 |
(assert_return (invoke "f32-hex-sep4") (f32.const 0xf0P+13)) |
| 210 |
(assert_return (invoke "f32-hex-sep5") (f32.const 0x2af00a.1f3eep23)) |
| 211 |
|
| 212 |
(assert_return (invoke "f64-dec-sep1") (f64.const 1000000)) |
| 213 |
(assert_return (invoke "f64-dec-sep2") (f64.const 1000)) |
| 214 |
(assert_return (invoke "f64-dec-sep3") (f64.const 1003.141592)) |
| 215 |
(assert_return (invoke "f64-dec-sep4") (f64.const 99e-123)) |
| 216 |
(assert_return (invoke "f64-dec-sep5") (f64.const 122000.11354e23)) |
| 217 |
(assert_return (invoke "f64-hex-sep1") (f64.const 0xaf00f00009999)) |
| 218 |
(assert_return (invoke "f64-hex-sep2") (f64.const 0x1aa0f)) |
| 219 |
(assert_return (invoke "f64-hex-sep3") (f64.const 0xa0ff.f141a59a)) |
| 220 |
(assert_return (invoke "f64-hex-sep4") (f64.const 0xf0P+13)) |
| 221 |
(assert_return (invoke "f64-hex-sep5") (f64.const 0x2af00a.1f3eep23)) |
| 222 |
|
| 223 |
;; Test parsing a float from binary |
| 224 |
(module binary |
| 225 |
;; (func (export "4294967249") (result f64) (f64.const 4294967249)) |
| 226 |
"\00\61\73\6d\01\00\00\00\01\85\80\80\80\00\01\60" |
| 227 |
"\00\01\7c\03\82\80\80\80\00\01\00\07\8e\80\80\80" |
| 228 |
"\00\01\0a\34\32\39\34\39\36\37\32\34\39\00\00\0a" |
| 229 |
"\91\80\80\80\00\01\8b\80\80\80\00\00\44\00\00\20" |
| 230 |
"\fa\ff\ff\ef\41\0b" |
| 231 |
) |
| 232 |
|
| 233 |
(assert_return (invoke "4294967249") (f64.const 4294967249)) |
| 234 |
|
| 235 |
(assert_malformed |
| 236 |
(module quote "(global f32 (f32.const _100))") |
| 237 |
"unknown operator" |
| 238 |
) |
| 239 |
(assert_malformed |
| 240 |
(module quote "(global f32 (f32.const +_100))") |
| 241 |
"unknown operator" |
| 242 |
) |
| 243 |
(assert_malformed |
| 244 |
(module quote "(global f32 (f32.const -_100))") |
| 245 |
"unknown operator" |
| 246 |
) |
| 247 |
(assert_malformed |
| 248 |
(module quote "(global f32 (f32.const 99_))") |
| 249 |
"unknown operator" |
| 250 |
) |
| 251 |
(assert_malformed |
| 252 |
(module quote "(global f32 (f32.const 1__000))") |
| 253 |
"unknown operator" |
| 254 |
) |
| 255 |
(assert_malformed |
| 256 |
(module quote "(global f32 (f32.const _1.0))") |
| 257 |
"unknown operator" |
| 258 |
) |
| 259 |
(assert_malformed |
| 260 |
(module quote "(global f32 (f32.const 1.0_))") |
| 261 |
"unknown operator" |
| 262 |
) |
| 263 |
(assert_malformed |
| 264 |
(module quote "(global f32 (f32.const 1_.0))") |
| 265 |
"unknown operator" |
| 266 |
) |
| 267 |
(assert_malformed |
| 268 |
(module quote "(global f32 (f32.const 1._0))") |
| 269 |
"unknown operator" |
| 270 |
) |
| 271 |
(assert_malformed |
| 272 |
(module quote "(global f32 (f32.const _1e1))") |
| 273 |
"unknown operator" |
| 274 |
) |
| 275 |
(assert_malformed |
| 276 |
(module quote "(global f32 (f32.const 1e1_))") |
| 277 |
"unknown operator" |
| 278 |
) |
| 279 |
(assert_malformed |
| 280 |
(module quote "(global f32 (f32.const 1_e1))") |
| 281 |
"unknown operator" |
| 282 |
) |
| 283 |
(assert_malformed |
| 284 |
(module quote "(global f32 (f32.const 1e_1))") |
| 285 |
"unknown operator" |
| 286 |
) |
| 287 |
(assert_malformed |
| 288 |
(module quote "(global f32 (f32.const _1.0e1))") |
| 289 |
"unknown operator" |
| 290 |
) |
| 291 |
(assert_malformed |
| 292 |
(module quote "(global f32 (f32.const 1.0e1_))") |
| 293 |
"unknown operator" |
| 294 |
) |
| 295 |
(assert_malformed |
| 296 |
(module quote "(global f32 (f32.const 1.0_e1))") |
| 297 |
"unknown operator" |
| 298 |
) |
| 299 |
(assert_malformed |
| 300 |
(module quote "(global f32 (f32.const 1.0e_1))") |
| 301 |
"unknown operator" |
| 302 |
) |
| 303 |
(assert_malformed |
| 304 |
(module quote "(global f32 (f32.const 1.0e+_1))") |
| 305 |
"unknown operator" |
| 306 |
) |
| 307 |
(assert_malformed |
| 308 |
(module quote "(global f32 (f32.const 1.0e_+1))") |
| 309 |
"unknown operator" |
| 310 |
) |
| 311 |
(assert_malformed |
| 312 |
(module quote "(global f32 (f32.const _0x100))") |
| 313 |
"unknown operator" |
| 314 |
) |
| 315 |
(assert_malformed |
| 316 |
(module quote "(global f32 (f32.const 0_x100))") |
| 317 |
"unknown operator" |
| 318 |
) |
| 319 |
(assert_malformed |
| 320 |
(module quote "(global f32 (f32.const 0x_100))") |
| 321 |
"unknown operator" |
| 322 |
) |
| 323 |
(assert_malformed |
| 324 |
(module quote "(global f32 (f32.const 0x00_))") |
| 325 |
"unknown operator" |
| 326 |
) |
| 327 |
(assert_malformed |
| 328 |
(module quote "(global f32 (f32.const 0xff__ffff))") |
| 329 |
"unknown operator" |
| 330 |
) |
| 331 |
(assert_malformed |
| 332 |
(module quote "(global f32 (f32.const 0x_1.0))") |
| 333 |
"unknown operator" |
| 334 |
) |
| 335 |
(assert_malformed |
| 336 |
(module quote "(global f32 (f32.const 0x1.0_))") |
| 337 |
"unknown operator" |
| 338 |
) |
| 339 |
(assert_malformed |
| 340 |
(module quote "(global f32 (f32.const 0x1_.0))") |
| 341 |
"unknown operator" |
| 342 |
) |
| 343 |
(assert_malformed |
| 344 |
(module quote "(global f32 (f32.const 0x1._0))") |
| 345 |
"unknown operator" |
| 346 |
) |
| 347 |
(assert_malformed |
| 348 |
(module quote "(global f32 (f32.const 0x_1p1))") |
| 349 |
"unknown operator" |
| 350 |
) |
| 351 |
(assert_malformed |
| 352 |
(module quote "(global f32 (f32.const 0x1p1_))") |
| 353 |
"unknown operator" |
| 354 |
) |
| 355 |
(assert_malformed |
| 356 |
(module quote "(global f32 (f32.const 0x1_p1))") |
| 357 |
"unknown operator" |
| 358 |
) |
| 359 |
(assert_malformed |
| 360 |
(module quote "(global f32 (f32.const 0x1p_1))") |
| 361 |
"unknown operator" |
| 362 |
) |
| 363 |
(assert_malformed |
| 364 |
(module quote "(global f32 (f32.const 0x_1.0p1))") |
| 365 |
"unknown operator" |
| 366 |
) |
| 367 |
(assert_malformed |
| 368 |
(module quote "(global f32 (f32.const 0x1.0p1_))") |
| 369 |
"unknown operator" |
| 370 |
) |
| 371 |
(assert_malformed |
| 372 |
(module quote "(global f32 (f32.const 0x1.0_p1))") |
| 373 |
"unknown operator" |
| 374 |
) |
| 375 |
(assert_malformed |
| 376 |
(module quote "(global f32 (f32.const 0x1.0p_1))") |
| 377 |
"unknown operator" |
| 378 |
) |
| 379 |
(assert_malformed |
| 380 |
(module quote "(global f32 (f32.const 0x1.0p+_1))") |
| 381 |
"unknown operator" |
| 382 |
) |
| 383 |
(assert_malformed |
| 384 |
(module quote "(global f32 (f32.const 0x1.0p_+1))") |
| 385 |
"unknown operator" |
| 386 |
) |
| 387 |
(assert_malformed |
| 388 |
(module quote "(global f32 (f32.const nan:0x80_0000))") |
| 389 |
"constant out of range" |
| 390 |
) |
| 391 |
|
| 392 |
(assert_malformed |
| 393 |
(module quote "(global f64 (f64.const _100))") |
| 394 |
"unknown operator" |
| 395 |
) |
| 396 |
(assert_malformed |
| 397 |
(module quote "(global f64 (f64.const +_100))") |
| 398 |
"unknown operator" |
| 399 |
) |
| 400 |
(assert_malformed |
| 401 |
(module quote "(global f64 (f64.const -_100))") |
| 402 |
"unknown operator" |
| 403 |
) |
| 404 |
(assert_malformed |
| 405 |
(module quote "(global f64 (f64.const 99_))") |
| 406 |
"unknown operator" |
| 407 |
) |
| 408 |
(assert_malformed |
| 409 |
(module quote "(global f64 (f64.const 1__000))") |
| 410 |
"unknown operator" |
| 411 |
) |
| 412 |
(assert_malformed |
| 413 |
(module quote "(global f64 (f64.const _1.0))") |
| 414 |
"unknown operator" |
| 415 |
) |
| 416 |
(assert_malformed |
| 417 |
(module quote "(global f64 (f64.const 1.0_))") |
| 418 |
"unknown operator" |
| 419 |
) |
| 420 |
(assert_malformed |
| 421 |
(module quote "(global f64 (f64.const 1_.0))") |
| 422 |
"unknown operator" |
| 423 |
) |
| 424 |
(assert_malformed |
| 425 |
(module quote "(global f64 (f64.const 1._0))") |
| 426 |
"unknown operator" |
| 427 |
) |
| 428 |
(assert_malformed |
| 429 |
(module quote "(global f64 (f64.const _1e1))") |
| 430 |
"unknown operator" |
| 431 |
) |
| 432 |
(assert_malformed |
| 433 |
(module quote "(global f64 (f64.const 1e1_))") |
| 434 |
"unknown operator" |
| 435 |
) |
| 436 |
(assert_malformed |
| 437 |
(module quote "(global f64 (f64.const 1_e1))") |
| 438 |
"unknown operator" |
| 439 |
) |
| 440 |
(assert_malformed |
| 441 |
(module quote "(global f64 (f64.const 1e_1))") |
| 442 |
"unknown operator" |
| 443 |
) |
| 444 |
(assert_malformed |
| 445 |
(module quote "(global f64 (f64.const _1.0e1))") |
| 446 |
"unknown operator" |
| 447 |
) |
| 448 |
(assert_malformed |
| 449 |
(module quote "(global f64 (f64.const 1.0e1_))") |
| 450 |
"unknown operator" |
| 451 |
) |
| 452 |
(assert_malformed |
| 453 |
(module quote "(global f64 (f64.const 1.0_e1))") |
| 454 |
"unknown operator" |
| 455 |
) |
| 456 |
(assert_malformed |
| 457 |
(module quote "(global f64 (f64.const 1.0e_1))") |
| 458 |
"unknown operator" |
| 459 |
) |
| 460 |
(assert_malformed |
| 461 |
(module quote "(global f64 (f64.const 1.0e+_1))") |
| 462 |
"unknown operator" |
| 463 |
) |
| 464 |
(assert_malformed |
| 465 |
(module quote "(global f64 (f64.const 1.0e_+1))") |
| 466 |
"unknown operator" |
| 467 |
) |
| 468 |
(assert_malformed |
| 469 |
(module quote "(global f64 (f64.const _0x100))") |
| 470 |
"unknown operator" |
| 471 |
) |
| 472 |
(assert_malformed |
| 473 |
(module quote "(global f64 (f64.const 0_x100))") |
| 474 |
"unknown operator" |
| 475 |
) |
| 476 |
(assert_malformed |
| 477 |
(module quote "(global f64 (f64.const 0x_100))") |
| 478 |
"unknown operator" |
| 479 |
) |
| 480 |
(assert_malformed |
| 481 |
(module quote "(global f64 (f64.const 0x00_))") |
| 482 |
"unknown operator" |
| 483 |
) |
| 484 |
(assert_malformed |
| 485 |
(module quote "(global f64 (f64.const 0xff__ffff))") |
| 486 |
"unknown operator" |
| 487 |
) |
| 488 |
(assert_malformed |
| 489 |
(module quote "(global f64 (f64.const 0x_1.0))") |
| 490 |
"unknown operator" |
| 491 |
) |
| 492 |
(assert_malformed |
| 493 |
(module quote "(global f64 (f64.const 0x1.0_))") |
| 494 |
"unknown operator" |
| 495 |
) |
| 496 |
(assert_malformed |
| 497 |
(module quote "(global f64 (f64.const 0x1_.0))") |
| 498 |
"unknown operator" |
| 499 |
) |
| 500 |
(assert_malformed |
| 501 |
(module quote "(global f64 (f64.const 0x1._0))") |
| 502 |
"unknown operator" |
| 503 |
) |
| 504 |
(assert_malformed |
| 505 |
(module quote "(global f64 (f64.const 0x_1p1))") |
| 506 |
"unknown operator" |
| 507 |
) |
| 508 |
(assert_malformed |
| 509 |
(module quote "(global f64 (f64.const 0x1p1_))") |
| 510 |
"unknown operator" |
| 511 |
) |
| 512 |
(assert_malformed |
| 513 |
(module quote "(global f64 (f64.const 0x1_p1))") |
| 514 |
"unknown operator" |
| 515 |
) |
| 516 |
(assert_malformed |
| 517 |
(module quote "(global f64 (f64.const 0x1p_1))") |
| 518 |
"unknown operator" |
| 519 |
) |
| 520 |
(assert_malformed |
| 521 |
(module quote "(global f64 (f64.const 0x_1.0p1))") |
| 522 |
"unknown operator" |
| 523 |
) |
| 524 |
(assert_malformed |
| 525 |
(module quote "(global f64 (f64.const 0x1.0p1_))") |
| 526 |
"unknown operator" |
| 527 |
) |
| 528 |
(assert_malformed |
| 529 |
(module quote "(global f64 (f64.const 0x1.0_p1))") |
| 530 |
"unknown operator" |
| 531 |
) |
| 532 |
(assert_malformed |
| 533 |
(module quote "(global f64 (f64.const 0x1.0p_1))") |
| 534 |
"unknown operator" |
| 535 |
) |
| 536 |
(assert_malformed |
| 537 |
(module quote "(global f64 (f64.const 0x1.0p+_1))") |
| 538 |
"unknown operator" |
| 539 |
) |
| 540 |
(assert_malformed |
| 541 |
(module quote "(global f64 (f64.const 0x1.0p_+1))") |
| 542 |
"unknown operator" |
| 543 |
) |
| 544 |
(assert_malformed |
| 545 |
(module quote "(global f64 (f64.const nan:0x10_0000_0000_0000))") |
| 546 |
"constant out of range" |
| 547 |
) |