[][src]Struct capstone_sys::cs_x86

#[repr(C)]
pub struct cs_x86 { 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, }

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_1op_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

impl Copy for cs_x86[src]

impl Clone for cs_x86[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for cs_x86[src]

Auto Trait Implementations

impl Send for cs_x86

impl Sync for cs_x86

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.