Skip to content

Commit ecd8fbb

Browse files
authored
[vm] Add new opcodes to store and load addr_std$10 (#1849)
* [vm] Add new opcodes to store and load `addr_std$10` LDSTDADDR — loads a MessageInt address or fail LDSTDADDRQ — quirly loads a MessageInt address LDOPTSTDADDR — loads a Maybe MessageInt address or fail LDOPTSTDADDRQ — quitly loads a Maybe MessageInt address STSTDADDR — stores a MessageInt address or fail STSTDADDRQ — quetly stores a MessageInt address STOPTSTDADDR — stores a Maybe MessageInt address or fail STOPTSTDADDRQ — quetly stores a Maybe MessageInt address * add description for STSTDADDR error * add check that address is fully valid * add require_version for the new opcodes * correct LDOPTSTDADDR(Q) behaviour * correct STOPTSTDADDR(Q) behaviour * run test-fift with --regression * add description to GlobalVersions.md * remove old +1 * fix stack description * fix `is_valid_std_msg_addr` * add `have_refs(0)` check to is_valid_std_msg_addr * check exact length and refs_length in is_valid_std_msg_addr * simplify fallback in is_valid_std_msg_addr * use push_bool, add check for refs
1 parent f9db7bd commit ecd8fbb

File tree

7 files changed

+634
-1
lines changed

7 files changed

+634
-1
lines changed

crypto/fift/lib/Asm.fif

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,14 @@ x{FA44} @Defop REWRITESTDADDR
14581458
x{FA45} @Defop REWRITESTDADDRQ
14591459
x{FA46} @Defop REWRITEVARADDR
14601460
x{FA47} @Defop REWRITEVARADDRQ
1461+
x{FA48} @Defop LDSTDADDR
1462+
x{FA49} @Defop LDSTDADDRQ
1463+
x{FA50} @Defop LDOPTSTDADDR
1464+
x{FA51} @Defop LDOPTSTDADDRQ
1465+
x{FA52} @Defop STSTDADDR
1466+
x{FA53} @Defop STSTDADDRQ
1467+
x{FA54} @Defop STOPTSTDADDR
1468+
x{FA55} @Defop STOPTSTDADDRQ
14611469

14621470
x{FB00} @Defop SENDRAWMSG
14631471
x{FB02} @Defop RAWRESERVE

crypto/test/fift.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,7 @@ TEST(Fift, test_get_extra_balance) {
179179
TEST(Fift, test_p256) {
180180
run_fift("p256.fif");
181181
}
182+
183+
TEST(Fift, test_load_store_std_addr) {
184+
run_fift("load-store-std-addr.fif");
185+
}

0 commit comments

Comments
 (0)