[][src]Enum iced_x86::MemorySize

#[non_exhaustive]pub enum MemorySize {
    Unknown,
    UInt8,
    UInt16,
    UInt32,
    UInt52,
    UInt64,
    UInt128,
    UInt256,
    UInt512,
    Int8,
    Int16,
    Int32,
    Int64,
    Int128,
    Int256,
    Int512,
    SegPtr16,
    SegPtr32,
    SegPtr64,
    WordOffset,
    DwordOffset,
    QwordOffset,
    Bound16_WordWord,
    Bound32_DwordDword,
    Bnd32,
    Bnd64,
    Fword6,
    Fword10,
    Float16,
    Float32,
    Float64,
    Float80,
    Float128,
    BFloat16,
    FpuEnv14,
    FpuEnv28,
    FpuState94,
    FpuState108,
    Fxsave_512Byte,
    Fxsave64_512Byte,
    Xsave,
    Xsave64,
    Bcd,
    Tilecfg,
    Tile,
    SegmentDescSelector,
    KLHandleAes128,
    KLHandleAes256,
    Packed16_UInt8,
    Packed16_Int8,
    Packed32_UInt8,
    Packed32_Int8,
    Packed32_UInt16,
    Packed32_Int16,
    Packed32_BFloat16,
    Packed64_UInt8,
    Packed64_Int8,
    Packed64_UInt16,
    Packed64_Int16,
    Packed64_UInt32,
    Packed64_Int32,
    Packed64_Float16,
    Packed64_Float32,
    Packed128_UInt8,
    Packed128_Int8,
    Packed128_UInt16,
    Packed128_Int16,
    Packed128_UInt32,
    Packed128_Int32,
    Packed128_UInt52,
    Packed128_UInt64,
    Packed128_Int64,
    Packed128_Float16,
    Packed128_Float32,
    Packed128_Float64,
    Packed128_2xBFloat16,
    Packed256_UInt8,
    Packed256_Int8,
    Packed256_UInt16,
    Packed256_Int16,
    Packed256_UInt32,
    Packed256_Int32,
    Packed256_UInt52,
    Packed256_UInt64,
    Packed256_Int64,
    Packed256_UInt128,
    Packed256_Int128,
    Packed256_Float16,
    Packed256_Float32,
    Packed256_Float64,
    Packed256_Float128,
    Packed256_2xBFloat16,
    Packed512_UInt8,
    Packed512_Int8,
    Packed512_UInt16,
    Packed512_Int16,
    Packed512_UInt32,
    Packed512_Int32,
    Packed512_UInt52,
    Packed512_UInt64,
    Packed512_Int64,
    Packed512_UInt128,
    Packed512_Float32,
    Packed512_Float64,
    Packed512_2xBFloat16,
    Broadcast64_UInt32,
    Broadcast64_Int32,
    Broadcast64_Float32,
    Broadcast128_UInt32,
    Broadcast128_Int32,
    Broadcast128_UInt52,
    Broadcast128_UInt64,
    Broadcast128_Int64,
    Broadcast128_Float32,
    Broadcast128_Float64,
    Broadcast256_UInt32,
    Broadcast256_Int32,
    Broadcast256_UInt52,
    Broadcast256_UInt64,
    Broadcast256_Int64,
    Broadcast256_Float32,
    Broadcast256_Float64,
    Broadcast512_UInt32,
    Broadcast512_Int32,
    Broadcast512_UInt52,
    Broadcast512_UInt64,
    Broadcast512_Int64,
    Broadcast512_Float32,
    Broadcast512_Float64,
    Broadcast128_2xInt16,
    Broadcast256_2xInt16,
    Broadcast512_2xInt16,
    Broadcast128_2xUInt32,
    Broadcast256_2xUInt32,
    Broadcast512_2xUInt32,
    Broadcast128_2xInt32,
    Broadcast256_2xInt32,
    Broadcast512_2xInt32,
    Broadcast128_2xBFloat16,
    Broadcast256_2xBFloat16,
    Broadcast512_2xBFloat16,
}

Size of a memory reference

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unknown

Unknown size or the instruction doesn't reference any memory (eg. LEA)

UInt8

Memory location contains a u8

UInt16

Memory location contains a u16

UInt32

Memory location contains a u32

UInt52

Memory location contains a u52

UInt64

Memory location contains a u64

UInt128

Memory location contains a u128

UInt256

Memory location contains a u256

UInt512

Memory location contains a u512

Int8

Memory location contains a i8

Int16

Memory location contains a i16

Int32

Memory location contains a i32

Int64

Memory location contains a i64

Int128

Memory location contains a i128

Int256

Memory location contains a i256

Int512

Memory location contains a i512

SegPtr16

Memory location contains a seg:ptr pair, u16 (offset) + u16 (segment/selector)

SegPtr32

Memory location contains a seg:ptr pair, u32 (offset) + u16 (segment/selector)

SegPtr64

Memory location contains a seg:ptr pair, u64 (offset) + u16 (segment/selector)

WordOffset

Memory location contains a 16-bit offset (JMP/CALL WORD PTR [mem])

DwordOffset

Memory location contains a 32-bit offset (JMP/CALL DWORD PTR [mem])

QwordOffset

Memory location contains a 64-bit offset (JMP/CALL QWORD PTR [mem])

Bound16_WordWord

Memory location contains two u16s (16-bit BOUND)

Bound32_DwordDword

Memory location contains two u32s (32-bit BOUND)

Bnd32

32-bit BNDMOV, 2 x u32

Bnd64

64-bit BNDMOV, 2 x u64

Fword6

Memory location contains a 16-bit limit and a 32-bit address (eg. LGDTW, LGDTD)

Fword10

Memory location contains a 16-bit limit and a 64-bit address (eg. LGDTQ)

Float16

Memory location contains a f16

Float32

Memory location contains a f32

Float64

Memory location contains a f64

Float80

Memory location contains a f80

Float128

Memory location contains a f128

BFloat16

Memory location contains a bfloat16

FpuEnv14

Memory location contains a 14-byte FPU environment (16-bit FLDENV/FSTENV)

FpuEnv28

Memory location contains a 28-byte FPU environment (32/64-bit FLDENV/FSTENV)

FpuState94

Memory location contains a 94-byte FPU environment (16-bit FSAVE/FRSTOR)

FpuState108

Memory location contains a 108-byte FPU environment (32/64-bit FSAVE/FRSTOR)

Fxsave_512Byte

Memory location contains 512-bytes of FXSAVE/FXRSTOR data

Fxsave64_512Byte

Memory location contains 512-bytes of FXSAVE64/FXRSTOR64 data

Xsave

32-bit XSAVE area

Xsave64

64-bit XSAVE area

Bcd

Memory location contains a 10-byte bcd value (FBLD/FBSTP)

Tilecfg

64-bit location: TILECFG (LDTILECFG/STTILECFG)

Tile

Tile data

SegmentDescSelector

80-bit segment descriptor and selector: 0-7 = descriptor, 8-9 = selector

KLHandleAes128

384-bit AES 128 handle (Key Locker)

KLHandleAes256

512-bit AES 256 handle (Key Locker)

Packed16_UInt8

16-bit location: 2 x u8

Packed16_Int8

16-bit location: 2 x i8

Packed32_UInt8

32-bit location: 4 x u8

Packed32_Int8

32-bit location: 4 x i8

Packed32_UInt16

32-bit location: 2 x u16

Packed32_Int16

32-bit location: 2 x i16

Packed32_BFloat16

32-bit location: 2 x bfloat16

Packed64_UInt8

64-bit location: 8 x u8

Packed64_Int8

64-bit location: 8 x i8

Packed64_UInt16

64-bit location: 4 x u16

Packed64_Int16

64-bit location: 4 x i16

Packed64_UInt32

64-bit location: 2 x u32

Packed64_Int32

64-bit location: 2 x i32

Packed64_Float16

64-bit location: 4 x f16

Packed64_Float32

64-bit location: 2 x f32

Packed128_UInt8

128-bit location: 16 x u8

Packed128_Int8

128-bit location: 16 x i8

Packed128_UInt16

128-bit location: 8 x u16

Packed128_Int16

128-bit location: 8 x i16

Packed128_UInt32

128-bit location: 4 x u32

Packed128_Int32

128-bit location: 4 x i32

Packed128_UInt52

128-bit location: 2 x u52

Packed128_UInt64

128-bit location: 2 x u64

Packed128_Int64

128-bit location: 2 x i64

Packed128_Float16

128-bit location: 8 x f16

Packed128_Float32

128-bit location: 4 x f32

Packed128_Float64

128-bit location: 2 x f64

Packed128_2xBFloat16

128-bit location: 4 x (2 x bfloat16)

Packed256_UInt8

256-bit location: 32 x u8

Packed256_Int8

256-bit location: 32 x i8

Packed256_UInt16

256-bit location: 16 x u16

Packed256_Int16

256-bit location: 16 x i16

Packed256_UInt32

256-bit location: 8 x u32

Packed256_Int32

256-bit location: 8 x i32

Packed256_UInt52

256-bit location: 4 x u52

Packed256_UInt64

256-bit location: 4 x u64

Packed256_Int64

256-bit location: 4 x i64

Packed256_UInt128

256-bit location: 2 x u128

Packed256_Int128

256-bit location: 2 x i128

Packed256_Float16

256-bit location: 16 x f16

Packed256_Float32

256-bit location: 8 x f32

Packed256_Float64

256-bit location: 4 x f64

Packed256_Float128

256-bit location: 2 x f128

Packed256_2xBFloat16

256-bit location: 8 x (2 x bfloat16)

Packed512_UInt8

512-bit location: 64 x u8

Packed512_Int8

512-bit location: 64 x i8

Packed512_UInt16

512-bit location: 32 x u16

Packed512_Int16

512-bit location: 32 x i16

Packed512_UInt32

512-bit location: 16 x u32

Packed512_Int32

512-bit location: 16 x i32

Packed512_UInt52

512-bit location: 8 x u52

Packed512_UInt64

512-bit location: 8 x u64

Packed512_Int64

512-bit location: 8 x i64

Packed512_UInt128

256-bit location: 4 x u128

Packed512_Float32

512-bit location: 16 x f32

Packed512_Float64

512-bit location: 8 x f64

Packed512_2xBFloat16

512-bit location: 16 x (2 x bfloat16)

Broadcast64_UInt32

Broadcast u32 to 64-bits

Broadcast64_Int32

Broadcast i32 to 64-bits

Broadcast64_Float32

Broadcast f32 to 64-bits

Broadcast128_UInt32

Broadcast u32 to 128-bits

Broadcast128_Int32

Broadcast i32 to 128-bits

Broadcast128_UInt52

Broadcast u52 to 128-bits

Broadcast128_UInt64

Broadcast u64 to 128-bits

Broadcast128_Int64

Broadcast i64 to 128-bits

Broadcast128_Float32

Broadcast f32 to 128-bits

Broadcast128_Float64

Broadcast f64 to 128-bits

Broadcast256_UInt32

Broadcast u32 to 256-bits

Broadcast256_Int32

Broadcast i32 to 256-bits

Broadcast256_UInt52

Broadcast u52 to 256-bits

Broadcast256_UInt64

Broadcast u64 to 256-bits

Broadcast256_Int64

Broadcast i64 to 256-bits

Broadcast256_Float32

Broadcast f32 to 256-bits

Broadcast256_Float64

Broadcast f64 to 256-bits

Broadcast512_UInt32

Broadcast u32 to 512-bits

Broadcast512_Int32

Broadcast i32 to 512-bits

Broadcast512_UInt52

Broadcast u52 to 512-bits

Broadcast512_UInt64

Broadcast u64 to 512-bits

Broadcast512_Int64

Broadcast i64 to 512-bits

Broadcast512_Float32

Broadcast f32 to 512-bits

Broadcast512_Float64

Broadcast f64 to 512-bits

Broadcast128_2xInt16

Broadcast 2 x i16 to 128-bits

Broadcast256_2xInt16

Broadcast 2 x i16 to 256-bits

Broadcast512_2xInt16

Broadcast 2 x i16 to 512-bits

Broadcast128_2xUInt32

Broadcast 2 x u32 to 128-bits

Broadcast256_2xUInt32

Broadcast 2 x u32 to 256-bits

Broadcast512_2xUInt32

Broadcast 2 x u32 to 512-bits

Broadcast128_2xInt32

Broadcast 2 x i32 to 128-bits

Broadcast256_2xInt32

Broadcast 2 x i32 to 256-bits

Broadcast512_2xInt32

Broadcast 2 x i32 to 512-bits

Broadcast128_2xBFloat16

Broadcast 2 x bfloat16 to 128-bits

Broadcast256_2xBFloat16

Broadcast 2 x bfloat16 to 256-bits

Broadcast512_2xBFloat16

Broadcast 2 x bfloat16 to 512-bits

Implementations

impl MemorySize[src]

#[must_use]pub fn info(self) -> &'static MemorySizeInfo[src]

Gets the memory size info

Examples

use iced_x86::*;
let info = MemorySize::Packed256_UInt16.info();
assert_eq!(32, info.size());

#[must_use]pub fn size(self) -> usize[src]

Gets the size in bytes of the memory location or 0 if it's not accessed by the instruction or unknown or variable sized

Examples

use iced_x86::*;
assert_eq!(4, MemorySize::UInt32.size());
assert_eq!(32, MemorySize::Packed256_UInt16.size());
assert_eq!(8, MemorySize::Broadcast512_UInt64.size());

#[must_use]pub fn element_size(self) -> usize[src]

Gets the size in bytes of the packed element. If it's not a packed data type, it's equal to size().

Examples

use iced_x86::*;
assert_eq!(4, MemorySize::UInt32.element_size());
assert_eq!(2, MemorySize::Packed256_UInt16.element_size());
assert_eq!(8, MemorySize::Broadcast512_UInt64.element_size());

#[must_use]pub fn element_type(self) -> Self[src]

Gets the element type if it's packed data or self if it's not packed data

Examples

use iced_x86::*;
assert_eq!(MemorySize::UInt32, MemorySize::UInt32.element_type());
assert_eq!(MemorySize::UInt16, MemorySize::Packed256_UInt16.element_type());
assert_eq!(MemorySize::UInt64, MemorySize::Broadcast512_UInt64.element_type());

#[must_use]pub fn element_type_info(self) -> &'static MemorySizeInfo[src]

Gets the element type info if it's packed data or self if it's not packed data

Examples

use iced_x86::*;
assert_eq!(MemorySize::UInt32, MemorySize::UInt32.element_type_info().memory_size());
assert_eq!(MemorySize::UInt16, MemorySize::Packed256_UInt16.element_type_info().memory_size());
assert_eq!(MemorySize::UInt64, MemorySize::Broadcast512_UInt64.element_type_info().memory_size());

#[must_use]pub fn is_signed(self) -> bool[src]

true if it's signed data (signed integer or a floating point value)

Examples

use iced_x86::*;
assert!(!MemorySize::UInt32.is_signed());
assert!(MemorySize::Int32.is_signed());
assert!(MemorySize::Float64.is_signed());

#[must_use]pub fn is_packed(self) -> bool[src]

true if this is a packed data type, eg. MemorySize::Packed128_Float32

Examples

use iced_x86::*;
assert!(!MemorySize::UInt32.is_packed());
assert!(MemorySize::Packed256_UInt16.is_packed());
assert!(!MemorySize::Broadcast512_UInt64.is_packed());

#[must_use]pub fn element_count(self) -> usize[src]

Gets the number of elements in the packed data type or 1 if it's not packed data (is_packed())

Examples

use iced_x86::*;
assert_eq!(1, MemorySize::UInt32.element_count());
assert_eq!(16, MemorySize::Packed256_UInt16.element_count());
assert_eq!(1, MemorySize::Broadcast512_UInt64.element_count());

impl MemorySize[src]

#[must_use]pub fn is_broadcast(self) -> bool[src]

Checks if it is a broadcast memory type

Examples

use iced_x86::*;
assert!(!MemorySize::Packed64_Float16.is_broadcast());
assert!(MemorySize::Broadcast512_UInt64.is_broadcast());

Trait Implementations

impl Clone for MemorySize[src]

impl Copy for MemorySize[src]

impl Debug for MemorySize[src]

impl Default for MemorySize[src]

impl Eq for MemorySize[src]

impl Hash for MemorySize[src]

impl Ord for MemorySize[src]

impl PartialEq<MemorySize> for MemorySize[src]

impl PartialOrd<MemorySize> for MemorySize[src]

impl StructuralEq for MemorySize[src]

impl StructuralPartialEq for MemorySize[src]

Auto Trait Implementations

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.