pub struct MacsimRecord {Show 21 fields
pub num_read_regs: u8,
pub num_dest_regs: u8,
pub src: [u8; 9],
pub dst: [u8; 6],
pub cf_type: u8,
pub has_immediate: bool,
pub opcode: u8,
pub has_st: bool,
pub is_fp: bool,
pub write_flg: bool,
pub num_ld: u8,
pub size: u8,
pub ld_vaddr1: u64,
pub ld_vaddr2: u64,
pub st_vaddr: u64,
pub instruction_addr: u64,
pub branch_target: u64,
pub mem_read_size: u8,
pub mem_write_size: u8,
pub rep_dir: bool,
pub actually_taken: bool,
}Expand description
One MacSim x86 trace record (trace_info_cpu_s minus the last field).
Fields§
§num_read_regs: u8Number of source registers.
num_dest_regs: u8Number of destination registers.
src: [u8; 9]Source register ids (Pin 3.13 REG).
dst: [u8; 6]Destination register ids.
cf_type: u8Control-flow type (CfType).
has_immediate: boolHas an immediate (never set by the Pin tool; kept 0).
opcode: u8Opcode: a CPU_OPCODE_ENUM value.
has_st: boolHas a store.
is_fp: boolUses floating-point registers.
write_flg: boolWrites RFLAGS.
num_ld: u8Number of loads (0, 1 or 2).
size: u8Instruction size in bytes.
ld_vaddr1: u64First load address.
ld_vaddr2: u64Second load address.
st_vaddr: u64Store address.
instruction_addr: u64Instruction address (PC).
branch_target: u64Branch target.
mem_read_size: u8Load size in bytes.
mem_write_size: u8Store size in bytes.
rep_dir: boolDirection flag (for string instructions).
actually_taken: boolBranch taken.
Implementations§
Source§impl MacsimRecord
impl MacsimRecord
Sourcepub fn to_bytes(&self) -> [u8; 80]
pub fn to_bytes(&self) -> [u8; 80]
Serializes to the 80-byte on-disk layout (x86-64 C ABI, with padding zeroed).
Sourcepub fn from_bytes(b: &[u8; 80]) -> MacsimRecord
pub fn from_bytes(b: &[u8; 80]) -> MacsimRecord
Parses the 80-byte on-disk layout.
Sourcepub fn opcode_name(&self) -> &'static str
pub fn opcode_name(&self) -> &'static str
Name of the opcode, as MacSim prints it.
Trait Implementations§
Source§impl Clone for MacsimRecord
impl Clone for MacsimRecord
impl Copy for MacsimRecord
Source§impl Debug for MacsimRecord
impl Debug for MacsimRecord
Source§impl Default for MacsimRecord
impl Default for MacsimRecord
impl Eq for MacsimRecord
Source§impl PartialEq for MacsimRecord
impl PartialEq for MacsimRecord
impl StructuralPartialEq for MacsimRecord
Auto Trait Implementations§
impl Freeze for MacsimRecord
impl RefUnwindSafe for MacsimRecord
impl Send for MacsimRecord
impl Sync for MacsimRecord
impl Unpin for MacsimRecord
impl UnsafeUnpin for MacsimRecord
impl UnwindSafe for MacsimRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more