Skip to content

Commit a2b1870

Browse files
committed
Align reg3 serialization with the GP and add extra testcases
1 parent 5581280 commit a2b1870

File tree

61 files changed

+2488
-96
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2488
-96
lines changed

pvm/TESTCASES.md

Lines changed: 664 additions & 32 deletions
Large diffs are not rendered by default.

pvm/programs/inst_add.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
0,
2525
3,
2626
8,
27-
121,
28-
8,
27+
135,
28+
9,
2929
249
3030
],
3131
"expected-status": "trap",

pvm/programs/inst_add_with_overflow.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
0,
2525
3,
2626
8,
27-
121,
28-
8,
27+
135,
28+
9,
2929
249
3030
],
3131
"expected-status": "trap",

pvm/programs/inst_and.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
0,
2525
3,
2626
23,
27-
121,
28-
8,
27+
135,
28+
9,
2929
249
3030
],
3131
"expected-status": "trap",
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"name": "inst_branch_eq_imm_nok",
3+
"initial-regs": [
4+
0,
5+
0,
6+
0,
7+
0,
8+
0,
9+
0,
10+
0,
11+
0,
12+
0,
13+
0,
14+
0,
15+
0,
16+
0
17+
],
18+
"initial-pc": 0,
19+
"initial-page-map": [],
20+
"initial-memory": [],
21+
"initial-gas": 10000,
22+
"program": [
23+
0,
24+
0,
25+
16,
26+
4,
27+
7,
28+
210,
29+
4,
30+
7,
31+
39,
32+
211,
33+
4,
34+
6,
35+
0,
36+
4,
37+
7,
38+
239,
39+
190,
40+
173,
41+
222,
42+
17,
43+
6
44+
],
45+
"expected-status": "trap",
46+
"expected-regs": [
47+
0,
48+
0,
49+
0,
50+
0,
51+
0,
52+
0,
53+
0,
54+
1234,
55+
0,
56+
0,
57+
0,
58+
0,
59+
0
60+
],
61+
"expected-pc": 9,
62+
"expected-memory": [],
63+
"expected-gas": 9997
64+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"name": "inst_branch_eq_imm_ok",
3+
"initial-regs": [
4+
0,
5+
0,
6+
0,
7+
0,
8+
0,
9+
0,
10+
0,
11+
0,
12+
0,
13+
0,
14+
0,
15+
0,
16+
0
17+
],
18+
"initial-pc": 0,
19+
"initial-page-map": [],
20+
"initial-memory": [],
21+
"initial-gas": 10000,
22+
"program": [
23+
0,
24+
0,
25+
16,
26+
4,
27+
7,
28+
210,
29+
4,
30+
7,
31+
39,
32+
210,
33+
4,
34+
6,
35+
0,
36+
4,
37+
7,
38+
239,
39+
190,
40+
173,
41+
222,
42+
17,
43+
6
44+
],
45+
"expected-status": "trap",
46+
"expected-regs": [
47+
0,
48+
0,
49+
0,
50+
0,
51+
0,
52+
0,
53+
0,
54+
3735928559,
55+
0,
56+
0,
57+
0,
58+
0,
59+
0
60+
],
61+
"expected-pc": 16,
62+
"expected-memory": [],
63+
"expected-gas": 9996
64+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"name": "inst_branch_greater_or_equal_signed_imm_nok",
3+
"initial-regs": [
4+
0,
5+
0,
6+
0,
7+
0,
8+
0,
9+
0,
10+
0,
11+
0,
12+
0,
13+
0,
14+
0,
15+
0,
16+
0
17+
],
18+
"initial-pc": 0,
19+
"initial-page-map": [],
20+
"initial-memory": [],
21+
"initial-gas": 10000,
22+
"program": [
23+
0,
24+
0,
25+
14,
26+
4,
27+
7,
28+
246,
29+
45,
30+
23,
31+
10,
32+
5,
33+
0,
34+
4,
35+
7,
36+
239,
37+
190,
38+
173,
39+
222,
40+
137,
41+
193
42+
],
43+
"expected-status": "trap",
44+
"expected-regs": [
45+
0,
46+
0,
47+
0,
48+
0,
49+
0,
50+
0,
51+
0,
52+
4294967286,
53+
0,
54+
0,
55+
0,
56+
0,
57+
0
58+
],
59+
"expected-pc": 7,
60+
"expected-memory": [],
61+
"expected-gas": 9997
62+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"name": "inst_branch_greater_or_equal_signed_imm_ok",
3+
"initial-regs": [
4+
0,
5+
0,
6+
0,
7+
0,
8+
0,
9+
0,
10+
0,
11+
0,
12+
0,
13+
0,
14+
0,
15+
0,
16+
0
17+
],
18+
"initial-pc": 0,
19+
"initial-page-map": [],
20+
"initial-memory": [],
21+
"initial-gas": 10000,
22+
"program": [
23+
0,
24+
0,
25+
14,
26+
4,
27+
7,
28+
10,
29+
45,
30+
23,
31+
246,
32+
5,
33+
0,
34+
4,
35+
7,
36+
239,
37+
190,
38+
173,
39+
222,
40+
137,
41+
193
42+
],
43+
"expected-status": "trap",
44+
"expected-regs": [
45+
0,
46+
0,
47+
0,
48+
0,
49+
0,
50+
0,
51+
0,
52+
3735928559,
53+
0,
54+
0,
55+
0,
56+
0,
57+
0
58+
],
59+
"expected-pc": 14,
60+
"expected-memory": [],
61+
"expected-gas": 9996
62+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"name": "inst_branch_greater_or_equal_signed_nok",
3+
"initial-regs": [
4+
0,
5+
0,
6+
0,
7+
0,
8+
0,
9+
0,
10+
0,
11+
0,
12+
0,
13+
0,
14+
0,
15+
0,
16+
0
17+
],
18+
"initial-pc": 0,
19+
"initial-page-map": [],
20+
"initial-memory": [],
21+
"initial-gas": 10000,
22+
"program": [
23+
0,
24+
0,
25+
16,
26+
4,
27+
7,
28+
246,
29+
4,
30+
8,
31+
10,
32+
43,
33+
135,
34+
4,
35+
0,
36+
4,
37+
7,
38+
239,
39+
190,
40+
173,
41+
222,
42+
73,
43+
6
44+
],
45+
"expected-status": "trap",
46+
"expected-regs": [
47+
0,
48+
0,
49+
0,
50+
0,
51+
0,
52+
0,
53+
0,
54+
4294967286,
55+
10,
56+
0,
57+
0,
58+
0,
59+
0
60+
],
61+
"expected-pc": 9,
62+
"expected-memory": [],
63+
"expected-gas": 9996
64+
}

0 commit comments

Comments
 (0)