Struct capstone_sys::cs_x86

source ·
#[repr(C)]
pub struct cs_x86 {
Show 19 fields pub prefix: [u8; 4], pub opcode: [u8; 4], pub rex: u8, pub addr_size: u8, pub modrm: u8, pub sib: u8, pub disp: i64, pub sib_index: Type, pub sib_scale: i8, pub sib_base: Type, pub xop_cc: x86_xop_cc, pub sse_cc: x86_sse_cc, pub avx_cc: x86_avx_cc, pub avx_sae: bool, pub avx_rm: x86_avx_rm, pub __bindgen_anon_1: cs_x86__bindgen_ty_1, pub op_count: u8, pub operands: [cs_x86_op; 8], pub encoding: cs_x86_encoding,
}
Expand description

Instruction structure

Fields§

§prefix: [u8; 4]

Instruction prefix, which can be up to 4 bytes. A prefix byte gets value 0 when irrelevant. prefix[0] indicates REP/REPNE/LOCK prefix (See X86_PREFIX_REP/REPNE/LOCK above) prefix[1] indicates segment override (irrelevant for x86_64): See X86_PREFIX_CS/SS/DS/ES/FS/GS above. prefix[2] indicates operand-size override (X86_PREFIX_OPSIZE) prefix[3] indicates address-size override (X86_PREFIX_ADDRSIZE)

§opcode: [u8; 4]

Instruction opcode, which can be from 1 to 4 bytes in size. This contains VEX opcode as well. An trailing opcode byte gets value 0 when irrelevant.

§rex: u8

REX prefix: only a non-zero value is relevant for x86_64

§addr_size: u8

Address size, which can be overridden with above prefix[5].

§modrm: u8

ModR/M byte

§sib: u8

SIB value, or 0 when irrelevant.

§disp: i64

Displacement value, valid if encoding.disp_offset != 0

§sib_index: Type

SIB index register, or X86_REG_INVALID when irrelevant.

§sib_scale: i8

SIB scale, only applicable if sib_index is valid.

§sib_base: Type

SIB base register, or X86_REG_INVALID when irrelevant.

§xop_cc: x86_xop_cc

XOP Code Condition

§sse_cc: x86_sse_cc

SSE Code Condition

§avx_cc: x86_avx_cc

AVX Code Condition

§avx_sae: bool

AVX Suppress all Exception

§avx_rm: x86_avx_rm

AVX static rounding mode

§__bindgen_anon_1: cs_x86__bindgen_ty_1§op_count: u8

Number of operands of this instruction, or 0 when instruction has no operand.

§operands: [cs_x86_op; 8]

< operands for this instruction.

§encoding: cs_x86_encoding

< encoding information

Trait Implementations§

source§

impl Clone for cs_x86

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for cs_x86

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for cs_x86

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.