Skip to content

Commit

Permalink
Align reg3 serialization with the GP and add extra testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
koute committed Jun 28, 2024
1 parent 5581280 commit a2b1870
Show file tree
Hide file tree
Showing 61 changed files with 2,488 additions and 96 deletions.
696 changes: 664 additions & 32 deletions pvm/TESTCASES.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pvm/programs/inst_add.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
0,
3,
8,
121,
8,
135,
9,
249
],
"expected-status": "trap",
Expand Down
4 changes: 2 additions & 2 deletions pvm/programs/inst_add_with_overflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
0,
3,
8,
121,
8,
135,
9,
249
],
"expected-status": "trap",
Expand Down
4 changes: 2 additions & 2 deletions pvm/programs/inst_and.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
0,
3,
23,
121,
8,
135,
9,
249
],
"expected-status": "trap",
Expand Down
64 changes: 64 additions & 0 deletions pvm/programs/inst_branch_eq_imm_nok.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"name": "inst_branch_eq_imm_nok",
"initial-regs": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"initial-pc": 0,
"initial-page-map": [],
"initial-memory": [],
"initial-gas": 10000,
"program": [
0,
0,
16,
4,
7,
210,
4,
7,
39,
211,
4,
6,
0,
4,
7,
239,
190,
173,
222,
17,
6
],
"expected-status": "trap",
"expected-regs": [
0,
0,
0,
0,
0,
0,
0,
1234,
0,
0,
0,
0,
0
],
"expected-pc": 9,
"expected-memory": [],
"expected-gas": 9997
}
64 changes: 64 additions & 0 deletions pvm/programs/inst_branch_eq_imm_ok.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"name": "inst_branch_eq_imm_ok",
"initial-regs": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"initial-pc": 0,
"initial-page-map": [],
"initial-memory": [],
"initial-gas": 10000,
"program": [
0,
0,
16,
4,
7,
210,
4,
7,
39,
210,
4,
6,
0,
4,
7,
239,
190,
173,
222,
17,
6
],
"expected-status": "trap",
"expected-regs": [
0,
0,
0,
0,
0,
0,
0,
3735928559,
0,
0,
0,
0,
0
],
"expected-pc": 16,
"expected-memory": [],
"expected-gas": 9996
}
62 changes: 62 additions & 0 deletions pvm/programs/inst_branch_greater_or_equal_signed_imm_nok.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "inst_branch_greater_or_equal_signed_imm_nok",
"initial-regs": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"initial-pc": 0,
"initial-page-map": [],
"initial-memory": [],
"initial-gas": 10000,
"program": [
0,
0,
14,
4,
7,
246,
45,
23,
10,
5,
0,
4,
7,
239,
190,
173,
222,
137,
193
],
"expected-status": "trap",
"expected-regs": [
0,
0,
0,
0,
0,
0,
0,
4294967286,
0,
0,
0,
0,
0
],
"expected-pc": 7,
"expected-memory": [],
"expected-gas": 9997
}
62 changes: 62 additions & 0 deletions pvm/programs/inst_branch_greater_or_equal_signed_imm_ok.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "inst_branch_greater_or_equal_signed_imm_ok",
"initial-regs": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"initial-pc": 0,
"initial-page-map": [],
"initial-memory": [],
"initial-gas": 10000,
"program": [
0,
0,
14,
4,
7,
10,
45,
23,
246,
5,
0,
4,
7,
239,
190,
173,
222,
137,
193
],
"expected-status": "trap",
"expected-regs": [
0,
0,
0,
0,
0,
0,
0,
3735928559,
0,
0,
0,
0,
0
],
"expected-pc": 14,
"expected-memory": [],
"expected-gas": 9996
}
64 changes: 64 additions & 0 deletions pvm/programs/inst_branch_greater_or_equal_signed_nok.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"name": "inst_branch_greater_or_equal_signed_nok",
"initial-regs": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"initial-pc": 0,
"initial-page-map": [],
"initial-memory": [],
"initial-gas": 10000,
"program": [
0,
0,
16,
4,
7,
246,
4,
8,
10,
43,
135,
4,
0,
4,
7,
239,
190,
173,
222,
73,
6
],
"expected-status": "trap",
"expected-regs": [
0,
0,
0,
0,
0,
0,
0,
4294967286,
10,
0,
0,
0,
0
],
"expected-pc": 9,
"expected-memory": [],
"expected-gas": 9996
}
Loading

0 comments on commit a2b1870

Please sign in to comment.