-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmemory_copy.wat
36 lines (31 loc) · 4.99 KB
/
memory_copy.wat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
(module
(func $test (export "canister_update test")
(local $i i32)
i32.const 4096
local.set $i ;; set start of memory index
(loop $loop_a
local.get $i
i32.const 65536
i32.rem_u
i32.const 0
i32.eq
(if
(then (drop (memory.grow (i32.const 1))) )
)
local.get $i ;; memory.copy dst
i32.const 0 ;; memory.copy start (from data segment)
i32.const 4096 ;; length of data section
memory.copy
local.get $i
i32.const 4096
i32.add
local.set $i
local.get $i
i32.const 4_294_963_199
i32.lt_u
br_if $loop_a
)
)
(memory (export "memory") 2)
(data (i32.const 0) "FvpjdnkL6SEy71L7WpcLoDyYLbBeZ6mEgS0jaLjn4RyT8qjx1DPVzhI9IX6zFU5jrXLxtWstPotFk8UpOO6Fjw7HqCutw9FID5CjgzAHp0shx1y0NA7jwrnBG0TXHHuqe0zpxp27vb6CV6pwYVNP1Uz2GXvoff7vQH4xcUr9trVvjveLRPbbfrAfAiBvtkXtpIVKhcpQoQmw97JUmzO1X6GJTnv9tSrw9B0iqF2NTWK96UoCFOrLfmnKdW1yRaVytMciW95hKPCPCI11djHdqTHDoej0rXNrvHcGWyfRRDv9LLma9jVi0enwSIYTLHlxN56Q4esUsDzX1hCCnnYHiFcUhOMWHjp5NC2jDGTMcLN9zhBLxBspRuR3HgWRc42DV1w6mTDymdVz0TmzF3wuVIalOrDGw1DWxE6FMNc3tQNfzjRaKG6WbVfHZJZLgj4anfGilLxdCYAW6RYF4ttrNAWe7KiycuGDz7n9Ci1Us7xApSWR2Tp0As0vDH2DK1kLf0UwA2EoxEjWXccFoHAqxUYZQ6zOmNQgh8uwPzjWakOw0VEJdzaomSEjza4QG8Y0j1Bm9gYHczlclcCmbXA781m4rxMf8erKdPzcJR1Twdv72yGFYM5BymYkbZrLlo0Nt2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