mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-10 01:33:07 +00:00
commit
faaaa0e0e2
@ -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_bytes = self.memory.context_memory[self.context].segments
|
||||
[Segment::MainMemory as usize]
|
||||
.content
|
||||
.len();
|
||||
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