[][src]Enum x64_asm::Operand

pub enum Operand {
    GENERALREGISTER(GeneralPurposeRegister),
    ADDRESSING {
        base_reg: GeneralPurposeRegister,
        index_reg: Option<GeneralPurposeRegister>,
        displacement: Option<Displacement>,
        scale: Option<u8>,
    },
    LABEL(String),
    Immediate(Immediate),
}

Variants

GENERALREGISTER(GeneralPurposeRegister)
ADDRESSING

memory addressing ex. [rax], -4[rbp]

Fields of ADDRESSING

base_reg: GeneralPurposeRegisterindex_reg: Option<GeneralPurposeRegister>displacement: Option<Displacement>scale: Option<u8>
LABEL(String)

label in assembly code. using label operand in jump-related instructions.

Immediate(Immediate)

Implementations

impl Operand[src]

pub fn copy_label(&self) -> String[src]

ラベルの文字列を取得

pub fn is_addressing(&self) -> bool[src]

メモリアドレッシングかチェック

pub fn is_expanded(&self) -> bool[src]

使用しているレジスタがx64拡張のものかチェック REX-Prefix の計算に使用

pub fn index_reg_is_expanded(&self) -> bool[src]

メモリアドレッシングのindex-regがx64拡張のものかチェック REX-Prefix のx_bitの計算に使用

pub fn sib_byte(&self) -> Option<SIBByte>[src]

SIB-Byteが必要でなければNone,そうでなければSIBByteが返る コード生成に使用

pub fn get_displacement(&self) -> Option<Displacement>[src]

displacementを取得 コード生成に使用

pub fn get_immediate(&self) -> Option<Immediate>[src]

immediateを取得 コード生成に使用

pub fn req_sib_byte(&self) -> bool[src]

SIB-Byteを必要とするかチェック

pub fn number(&self) -> u8[src]

register code レジスタ番号の取得

pub fn addressing_mode(&self) -> AddressingMode[src]

get addressing mode in ModRM:mode

pub fn get_addressing(
    &self
) -> (GeneralPurposeRegister, Option<GeneralPurposeRegister>, Option<Displacement>, Option<u8>)
[src]

メモリアドレッシングの情報を取得する is_addressing() を先に呼ぶ必要がある

pub fn to_intel_string(&self) -> String[src]

pub fn to_at_string(&self) -> String[src]

Trait Implementations

impl Clone for Operand[src]

impl Debug for Operand[src]

impl Eq for Operand[src]

impl Ord for Operand[src]

impl PartialEq<Operand> for Operand[src]

impl PartialOrd<Operand> for Operand[src]

impl StructuralEq for Operand[src]

impl StructuralPartialEq for Operand[src]

Auto Trait Implementations

impl RefUnwindSafe for Operand

impl Send for Operand

impl Sync for Operand

impl Unpin for Operand

impl UnwindSafe for Operand

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.