zingen/masm/memory.rs
1//! Memory Instructions
2
3use crate::{MacroAssembler, Result};
4
5impl MacroAssembler {
6 /// Load n bytes to extend self as another number type.
7 ///
8 /// Just for adapting the WASM instructions, this method makes
9 /// no sense for EVM since all of the numbers as U256.
10 pub(crate) fn _load(&mut self) -> Result<()> {
11 Ok(())
12 }
13
14 /// Load 1 byte to extend self as another number type.
15 ///
16 /// Just for adapting the WASM instructions, this method makes
17 /// no sense for EVM since all of the numbers as U256.
18 pub(crate) fn _load8(&mut self) -> Result<()> {
19 Ok(())
20 }
21
22 /// Load 2 bytes to extend self as another number type.
23 ///
24 /// Just for adapting the WASM instructions, this method makes
25 /// no sense for EVM since all of the numbers as U256.
26 pub(crate) fn _load16(&mut self) -> Result<()> {
27 Ok(())
28 }
29
30 /// Load 4 bytes to extend self as another number type.
31 ///
32 /// Just for adapting the WASM instructions, this method makes
33 /// no sense for EVM since all of the numbers as U256.
34 pub(crate) fn _load32(&mut self) -> Result<()> {
35 Ok(())
36 }
37
38 /// Store n bytes in memory.
39 pub fn _store(&mut self) -> Result<()> {
40 todo!()
41 }
42
43 /// Wrap self to i8 and store 1 byte
44 pub fn _store8(&mut self) -> Result<()> {
45 todo!()
46 }
47
48 /// Wrap self to i16 and store 2 bytes
49 pub fn _store16(&mut self) -> Result<()> {
50 todo!()
51 }
52
53 /// Wrap self to i32 and store 4 bytes
54 pub fn _store32(&mut self) -> Result<()> {
55 todo!()
56 }
57
58 /// The memory size instruction returns the current
59 /// size of memory.
60 pub fn _memory_size(&mut self, _: u32, _: u8) -> Result<()> {
61 todo!()
62 }
63
64 /// The memory grow instruction grows memory by a given
65 /// delta and returns the previous size, or -1 if enough
66 /// memory cannot be allocated.
67 pub fn _memory_grow(&mut self, _: u32, _: u8) -> Result<()> {
68 todo!()
69 }
70}