Skip to content

Commit 14c07d0

Browse files
subotickoute
authored andcommitted
spectool: add missing GP-0.5.4 test programs
1 parent a9f31a3 commit 14c07d0

26 files changed

+413
-0
lines changed

crates/polkavm-common/src/assembler.rs

Lines changed: 202 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
pre: a0 = 0b101
2+
pre: a1 = 0b011
3+
pre: gas = 10000
4+
5+
pub @main:
6+
a2 = a0 & ~a1
7+
8+
post: a2 = 0b100
9+
post: gas = 9998
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pre: a0 = 0x1000000030000000
2+
pre: gas = 10000
3+
4+
pub @main:
5+
i32 a2 = clz a0
6+
7+
post: a2 = 2
8+
post: gas = 9998
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pre: a0 = 0x1000000030000000
2+
pre: gas = 10000
3+
4+
pub @main:
5+
a2 = clz a0
6+
7+
post: a2 = 3
8+
post: gas = 9998
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pre: a0 = 0x1000000030000000
2+
pre: gas = 10000
3+
4+
pub @main:
5+
i32 a2 = cpop a0
6+
7+
post: a2 = 2
8+
post: gas = 9998
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pre: a0 = 0x1000000030000000
2+
pre: gas = 10000
3+
4+
pub @main:
5+
a2 = cpop a0
6+
7+
post: a2 = 3
8+
post: gas = 9998
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pre: a0 = 0x1000000030000000
2+
pre: gas = 10000
3+
4+
pub @main:
5+
i32 a2 = ctz a0
6+
7+
post: a2 = 28
8+
post: gas = 9998
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pre: a0 = 0x1000000030000000
2+
pre: gas = 10000
3+
4+
pub @main:
5+
a2 = ctz a0
6+
7+
post: a2 = 28
8+
post: gas = 9998
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
pre: a0 = 1
2+
pre: a1 = -2
3+
pre: gas = 10000
4+
5+
pub @main:
6+
a2 = maxs(a0, a1)
7+
8+
post: a2 = 1
9+
post: gas = 9998
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
pre: a0 = 1
2+
pre: a1 = -2
3+
pre: gas = 10000
4+
5+
pub @main:
6+
a2 = maxu(a0, a1)
7+
8+
post: a2 = -2
9+
post: gas = 9998

0 commit comments

Comments
 (0)