mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-06 07:43:10 +00:00
MSIZE
This commit is contained in:
parent
10f4a0d0ba
commit
ea135341e8
@ -263,7 +263,7 @@ impl<'a> Interpreter<'a> {
|
||||
0x56 => self.run_jump(), // "JUMP",
|
||||
0x57 => self.run_jumpi(), // "JUMPI",
|
||||
0x58 => todo!(), // "GETPC",
|
||||
0x59 => todo!(), // "MSIZE",
|
||||
0x59 => self.run_msize(), // "MSIZE",
|
||||
0x5a => todo!(), // "GAS",
|
||||
0x5b => self.run_jumpdest(), // "JUMPDEST",
|
||||
0x5c => todo!(), // "GET_STATE_ROOT",
|
||||
@ -511,6 +511,14 @@ impl<'a> Interpreter<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
fn run_msize(&mut self) {
|
||||
let num_u256s = self.memory.context_memory[0].segments[Segment::MainMemory as usize]
|
||||
.content
|
||||
.len();
|
||||
let num_bytes = num_u256s * 32;
|
||||
self.push(U256::from(num_bytes));
|
||||
}
|
||||
|
||||
fn run_jumpdest(&mut self) {
|
||||
assert!(!self.kernel_mode, "JUMPDEST is not needed in kernel code");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user