|
25 | 25 | (func (export "f32.max_finite") (result i32) (i32.reinterpret_f32 (f32.const 0x1.fffffep+127)))
|
26 | 26 | (func (export "f32.max_subnormal") (result i32) (i32.reinterpret_f32 (f32.const 0x1.fffffcp-127)))
|
27 | 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))) |
28 | 32 |
|
29 | 33 | ;; f32 in decimal format
|
30 | 34 | (func (export "f32_dec.zero") (result i32) (i32.reinterpret_f32 (f32.const 0.0e0)))
|
|
36 | 40 | (func (export "f32_dec.max_subnormal") (result i32) (i32.reinterpret_f32 (f32.const 1.1754942e-38)))
|
37 | 41 | (func (export "f32_dec.max_finite") (result i32) (i32.reinterpret_f32 (f32.const 3.4028234e+38)))
|
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))) |
39 | 47 |
|
40 | 48 | ;; https://twitter.com/Archivd/status/994637336506912768
|
41 | 49 | (func (export "f32_dec.root_beer_float") (result i32) (i32.reinterpret_f32 (f32.const 1.000000119)))
|
|
64 | 72 | (func (export "f64.max_subnormal") (result i64) (i64.reinterpret_f64 (f64.const 0x0.fffffffffffffp-1022)))
|
65 | 73 | (func (export "f64.max_finite") (result i64) (i64.reinterpret_f64 (f64.const 0x1.fffffffffffffp+1023)))
|
66 | 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))) |
67 | 79 |
|
68 | 80 | ;; f64 numbers in decimal format
|
69 | 81 | (func (export "f64_dec.zero") (result i64) (i64.reinterpret_f64 (f64.const 0.0e0)))
|
|
75 | 87 | (func (export "f64_dec.max_subnormal") (result i64) (i64.reinterpret_f64 (f64.const 2.2250738585072011e-308)))
|
76 | 88 | (func (export "f64_dec.max_finite") (result i64) (i64.reinterpret_f64 (f64.const 1.7976931348623157e+308)))
|
77 | 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))) |
78 | 94 |
|
79 | 95 | ;; https://twitter.com/Archivd/status/994637336506912768
|
80 | 96 | (func (export "f64_dec.root_beer_float") (result i64) (i64.reinterpret_f64 (f64.const 1.000000119)))
|
|
123 | 139 | (assert_return (invoke "f32.max_subnormal") (i32.const 0x7fffff))
|
124 | 140 | (assert_return (invoke "f32.max_finite") (i32.const 0x7f7fffff))
|
125 | 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)) |
126 | 146 | (assert_return (invoke "f32_dec.zero") (i32.const 0))
|
127 | 147 | (assert_return (invoke "f32_dec.positive_zero") (i32.const 0))
|
128 | 148 | (assert_return (invoke "f32_dec.negative_zero") (i32.const 0x80000000))
|
|
133 | 153 | (assert_return (invoke "f32_dec.max_finite") (i32.const 0x7f7fffff))
|
134 | 154 | (assert_return (invoke "f32_dec.trailing_dot") (i32.const 0x501502f9))
|
135 | 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)) |
136 | 160 |
|
137 | 161 | (assert_return (invoke "f64.nan") (i64.const 0x7ff8000000000000))
|
138 | 162 | (assert_return (invoke "f64.positive_nan") (i64.const 0x7ff8000000000000))
|
|
155 | 179 | (assert_return (invoke "f64.max_subnormal") (i64.const 0xfffffffffffff))
|
156 | 180 | (assert_return (invoke "f64.max_finite") (i64.const 0x7fefffffffffffff))
|
157 | 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)) |
158 | 186 | (assert_return (invoke "f64_dec.zero") (i64.const 0))
|
159 | 187 | (assert_return (invoke "f64_dec.positive_zero") (i64.const 0))
|
160 | 188 | (assert_return (invoke "f64_dec.negative_zero") (i64.const 0x8000000000000000))
|
|
165 | 193 | (assert_return (invoke "f64_dec.max_finite") (i64.const 0x7fefffffffffffff))
|
166 | 194 | (assert_return (invoke "f64_dec.trailing_dot") (i64.const 0x54b249ad2594c37d))
|
167 | 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)) |
168 | 200 |
|
169 | 201 | (assert_return (invoke "f32-dec-sep1") (f32.const 1000000))
|
170 | 202 | (assert_return (invoke "f32-dec-sep2") (f32.const 1000))
|
|
0 commit comments