git ssb

0+

wanderer🌟 / js-primea-hypervisor



Tree: a925d24ca2819ab0d5702e2877d76981bcd7b285

Files: a925d24ca2819ab0d5702e2877d76981bcd7b285 / tests / interface / sstore.wast

921 bytesRaw
1;; starts with an caller of 5d48c1018904a172886829bbbd9c6f4a2d06c47b
2(module
3 (memory 1)
4 (import $sstore "ethereum" "sstore" (param i32 i32))
5 (import $sload "ethereum" "sload" (param i32 i32))
6
7 (export "test" 0)
8 (export "a" memory)
9 (func
10 (local $temp i64)
11 (block
12 ;; should roundtrip store and load a value from storage
13 (i64.store (i32.const 0) (i64.const 173553719826446289))
14 (call_import $sstore (i32.const 64) (i32.const 0))
15 (call_import $sload (i32.const 64) (i32.const 64))
16
17 (if (i64.ne (i64.load (i32.const 64)) (i64.const 173553719826446289))
18 (unreachable))
19
20 (i64.store (i32.const 128) (i64.const 173553719826446289))
21 (call_import $sstore (i32.const 64) (i32.const 128))
22 (call_import $sload (i32.const 64) (i32.const 64))
23 (if (i64.ne (i64.load (i32.const 64)) (i64.const 173553719826446289))
24 (unreachable))
25 )
26 )
27)
28

Built with git-ssb-web