libmwemu 0.24.1

x86 32/64bits and system internals emulator, for securely emulating malware and other stuff.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{emu::Emu, fpu::FPU};

impl Emu {
    // Helper method to sync FPU instruction pointer with RIP
    pub fn sync_fpu_ip(&mut self) {
        let rip = self.threads[self.current_thread_id].regs.rip;
        self.threads[self.current_thread_id].fpu.set_ip(rip);
    }

    pub fn fpu(&self) -> &FPU {
        &self.threads[self.current_thread_id].fpu
    }

    pub fn fpu_mut(&mut self) -> &mut FPU {
        &mut self.threads[self.current_thread_id].fpu
    }
}