forked from WAVM/WAVM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconst.wast
More file actions
137 lines (126 loc) · 5.02 KB
/
Copy pathconst.wast
File metadata and controls
137 lines (126 loc) · 5.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
;; Test t.const instructions
;; Syntax error
(module (func (i32.const 0xffffffff) drop))
(module (func (i32.const -0x80000000) drop))
(assert_malformed
(module quote "(func (i32.const 0x100000000) drop)")
"constant out of range"
)
(assert_malformed
(module quote "(func (i32.const -0x80000001) drop)")
"constant out of range"
)
(module (func (i32.const 4294967295) drop))
(module (func (i32.const -2147483648) drop))
(assert_malformed
(module quote "(func (i32.const 4294967296) drop)")
"constant out of range"
)
(assert_malformed
(module quote "(func (i32.const -2147483649) drop)")
"constant out of range"
)
(module (func (i64.const 0xffffffffffffffff) drop))
(module (func (i64.const -0x8000000000000000) drop))
(assert_malformed
(module quote "(func (i64.const 0x10000000000000000) drop)")
"constant out of range"
)
(assert_malformed
(module quote "(func (i64.const -0x8000000000000001) drop)")
"constant out of range"
)
(module (func (i64.const 18446744073709551615) drop))
(module (func (i64.const -9223372036854775808) drop))
(assert_malformed
(module quote "(func (i64.const 18446744073709551616) drop)")
"constant out of range"
)
(assert_malformed
(module quote "(func (i64.const -9223372036854775809) drop)")
"constant out of range"
)
(module (func (f32.const 0x1p127) drop))
(module (func (f32.const -0x1p127) drop))
(module (func (f32.const 0x1.fffffep127) drop))
(module (func (f32.const -0x1.fffffep127) drop))
(module (func (f32.const 0x1.fffffe7p127) drop))
(module (func (f32.const -0x1.fffffe7p127) drop))
(assert_malformed
(module quote "(func (f32.const 0x1p128) drop)")
"constant out of range"
)
(assert_malformed
(module quote "(func (f32.const -0x1p128) drop)")
"constant out of range"
)
(assert_malformed
(module quote "(func (f32.const 0x1.ffffffp127) drop)")
"constant out of range"
)
(assert_malformed
(module quote "(func (f32.const -0x1.ffffffp127) drop)")
"constant out of range"
)
(module (func (f32.const 1e38) drop))
(module (func (f32.const -1e38) drop))
(assert_malformed
(module quote "(func (f32.const 1e39) drop)")
"constant out of range"
)
(assert_malformed
(module quote "(func (f32.const -1e39) drop)")
"constant out of range"
)
(module (func (f32.const 340282356779733623858607532500980858880) drop))
(module (func (f32.const -340282356779733623858607532500980858880) drop))
(assert_malformed
(module quote "(func (f32.const 340282356779733661637539395458142568448) drop)")
"constant out of range"
)
(assert_malformed
(module quote "(func (f32.const -340282356779733661637539395458142568448) drop)")
"constant out of range"
)
(module (func (f64.const 0x1p1023) drop))
(module (func (f64.const -0x1p1023) drop))
(module (func (f64.const 0x1.fffffffffffffp1023) drop))
(module (func (f64.const -0x1.fffffffffffffp1023) drop))
(module (func (f64.const 0x1.fffffffffffff7p1023) drop))
(module (func (f64.const -0x1.fffffffffffff7p1023) drop))
(assert_malformed
(module quote "(func (f64.const 0x1p1024) drop)")
"constant out of range"
)
(assert_malformed
(module quote "(func (f64.const -0x1p1024) drop)")
"constant out of range"
)
(assert_malformed
(module quote "(func (f64.const 0x1.fffffffffffff8p1023) drop)")
"constant out of range"
)
(assert_malformed
(module quote "(func (f64.const -0x1.fffffffffffff8p1023) drop)")
"constant out of range"
)
(module (func (f64.const 1e308) drop))
(module (func (f64.const -1e308) drop))
(assert_malformed
(module quote "(func (f64.const 1e309) drop)")
"constant out of range"
)
(assert_malformed
(module quote "(func (f64.const -1e309) drop)")
"constant out of range"
)
(module (func (f64.const 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop))
(module (func (f64.const -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop))
(assert_malformed
(module quote "(func (f64.const 269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop)")
"constant out of range"
)
(assert_malformed
(module quote "(func (f64.const -269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop)")
"constant out of range"
)