pub struct OpRwInfo {
pub op_flags: OpRwFlags,
pub phys_id: u8,
pub rm_size: u8,
pub consecutive_lead_count: u8,
pub read_byte_mask: u64,
pub write_byte_mask: u64,
pub extend_byte_mask: u64,
}Expand description
Read/write information related to a single operand, used by InstRwInfo.
phys_id is always INVALID_PHYS_ID unless a physical register is required — unlike
AsmJit (where value-initialization leaves it 0), asmkit keeps one “no phys id” sentinel.
Fields§
§op_flags: OpRwFlagsRead/write flags.
phys_id: u8Physical register index, if required (INVALID_PHYS_ID otherwise).
rm_size: u8Size of a possible memory operand that can replace a register operand.
consecutive_lead_count: u8If non-zero, this is a consecutive lead register and the value describes how many registers follow.
read_byte_mask: u64Read bit-mask where each bit represents one byte read from Reg/Mem.
write_byte_mask: u64Write bit-mask where each bit represents one byte written to Reg/Mem.
extend_byte_mask: u64Zero/sign extend bit-mask where each bit represents one byte written to Reg/Mem.
Implementations§
Source§impl OpRwInfo
impl OpRwInfo
Sourcepub fn reset(&mut self, op_flags: OpRwFlags, register_size: u32, phys_id: u8)
pub fn reset(&mut self, op_flags: OpRwFlags, register_size: u32, phys_id: u8)
Resets this operand info to op_flags, register_size, and possibly phys_id,
computing full byte masks from the flags (mirrors AsmJit’s OpRWInfo::reset).
Sourcepub const fn is_read_write(&self) -> bool
pub const fn is_read_write(&self) -> bool
Tests whether this operand is both read and written.
Sourcepub const fn is_read_only(&self) -> bool
pub const fn is_read_only(&self) -> bool
Tests whether this operand is read-only.
Sourcepub const fn is_write_only(&self) -> bool
pub const fn is_write_only(&self) -> bool
Tests whether this operand is write-only.