Skip to content

Commit

Permalink
rudimentary mmap
Browse files Browse the repository at this point in the history
  • Loading branch information
lenawanel committed Apr 17, 2024
1 parent f3716ae commit 469298b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/emu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,16 @@ impl Emu {
}
self.set_reg(0u64, Register::RAX)
}
// mmap
9 => {
let rdi: u64 = self.get_reg(Register::RDI);
if rdi == 0 {
let rsi = self.get_reg::<u64, 8>(Register::RSI);
self.memory.allocate(rsi as usize);
} else {
todo!()
}
}
// brk
12 => {
let rdi: u64 = self.get_reg(Register::RDI);
Expand Down

0 comments on commit 469298b

Please sign in to comment.