forked from nervosnetwork/ckb-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let snapshots stores the load_reservation_address (nervosnetwork#407)
* Let snapshots stores the load_reservation_address * Add testcase
- Loading branch information
Showing
8 changed files
with
100 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.global _start | ||
_start: | ||
_test_case_sc_after_snapshot: | ||
la a0, n0 # a0 holds address of memory location n0 | ||
lr.d a2, (a0) | ||
nop | ||
nop | ||
nop | ||
nop | ||
sc.d a3, a2, (a0) | ||
bnez a3, fail # sc.d must success | ||
done: | ||
li a0, 0 | ||
li a7, 93 | ||
ecall | ||
fail: | ||
li a0, 1 | ||
li a7, 93 | ||
ecall | ||
.section .data | ||
n0: | ||
.dword 4 # Initialize to 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
SECTIONS | ||
{ | ||
. = 0x100b0; | ||
.text : { *(.text) } | ||
. = 0x11000; | ||
.data : { *(.data) } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters