Enum iced_x86::MemorySize[][src]

#[non_exhaustive]
pub enum MemorySize {
Show 160 variants 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_Float16, 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_2xFloat16, 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_2xFloat16, Packed256_2xBFloat16, Packed512_UInt8, Packed512_Int8, Packed512_UInt16, Packed512_Int16, Packed512_UInt32, Packed512_Int32, Packed512_UInt52, Packed512_UInt64, Packed512_Int64, Packed512_UInt128, Packed512_Float16, Packed512_Float32, Packed512_Float64, Packed512_2xFloat16, Packed512_2xBFloat16, Broadcast32_Float16, Broadcast64_UInt32, Broadcast64_Int32, Broadcast64_Float16, Broadcast64_Float32, Broadcast128_Int16, Broadcast128_UInt16, Broadcast128_UInt32, Broadcast128_Int32, Broadcast128_UInt52, Broadcast128_UInt64, Broadcast128_Int64, Broadcast128_Float16, Broadcast128_Float32, Broadcast128_Float64, Broadcast128_2xInt16, Broadcast128_2xInt32, Broadcast128_2xUInt32, Broadcast128_2xFloat16, Broadcast128_2xBFloat16, Broadcast256_Int16, Broadcast256_UInt16, Broadcast256_UInt32, Broadcast256_Int32, Broadcast256_UInt52, Broadcast256_UInt64, Broadcast256_Int64, Broadcast256_Float16, Broadcast256_Float32, Broadcast256_Float64, Broadcast256_2xInt16, Broadcast256_2xInt32, Broadcast256_2xUInt32, Broadcast256_2xFloat16, Broadcast256_2xBFloat16, Broadcast512_Int16, Broadcast512_UInt16, Broadcast512_UInt32, Broadcast512_Int32, Broadcast512_UInt52, Broadcast512_UInt64, Broadcast512_Int64, Broadcast512_Float16, Broadcast512_Float32, Broadcast512_Float64, Broadcast512_2xFloat16, Broadcast512_2xInt16, Broadcast512_2xUInt32, Broadcast512_2xInt32, Broadcast512_2xBFloat16,
}
Expand description

Size of a memory reference

Variants (Non-exhaustive)

This enum is marked as 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_Float16

32-bit location: 2 x f16

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_2xFloat16

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

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_2xFloat16

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

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_Float16

512-bit location: 32 x f16

Packed512_Float32

512-bit location: 16 x f32

Packed512_Float64

512-bit location: 8 x f64

Packed512_2xFloat16

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

Packed512_2xBFloat16

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

Broadcast32_Float16

Broadcast f16 to 32-bits

Broadcast64_UInt32

Broadcast u32 to 64-bits

Broadcast64_Int32

Broadcast i32 to 64-bits

Broadcast64_Float16

Broadcast f16 to 64-bits

Broadcast64_Float32

Broadcast f32 to 64-bits

Broadcast128_Int16

Broadcast i16 to 128-bits

Broadcast128_UInt16

Broadcast u16 to 128-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_Float16

Broadcast f16 to 128-bits

Broadcast128_Float32

Broadcast f32 to 128-bits

Broadcast128_Float64

Broadcast f64 to 128-bits

Broadcast128_2xInt16

Broadcast 2 x i16 to 128-bits

Broadcast128_2xInt32

Broadcast 2 x i32 to 128-bits

Broadcast128_2xUInt32

Broadcast 2 x u32 to 128-bits

Broadcast128_2xFloat16

Broadcast 2 x f16 to 128-bits

Broadcast128_2xBFloat16

Broadcast 2 x bfloat16 to 128-bits

Broadcast256_Int16

Broadcast i16 to 256-bits

Broadcast256_UInt16

Broadcast u16 to 256-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_Float16

Broadcast f16 to 256-bits

Broadcast256_Float32

Broadcast f32 to 256-bits

Broadcast256_Float64

Broadcast f64 to 256-bits

Broadcast256_2xInt16

Broadcast 2 x i16 to 256-bits

Broadcast256_2xInt32

Broadcast 2 x i32 to 256-bits

Broadcast256_2xUInt32

Broadcast 2 x u32 to 256-bits

Broadcast256_2xFloat16

Broadcast 2 x f16 to 256-bits

Broadcast256_2xBFloat16

Broadcast 2 x bfloat16 to 256-bits

Broadcast512_Int16

Broadcast i16 to 512-bits

Broadcast512_UInt16

Broadcast u16 to 512-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_Float16

Broadcast f16 to 512-bits

Broadcast512_Float32

Broadcast f32 to 512-bits

Broadcast512_Float64

Broadcast f64 to 512-bits

Broadcast512_2xFloat16

Broadcast 2 x f16 to 512-bits

Broadcast512_2xInt16

Broadcast 2 x i16 to 512-bits

Broadcast512_2xUInt32

Broadcast 2 x u32 to 512-bits

Broadcast512_2xInt32

Broadcast 2 x i32 to 512-bits

Broadcast512_2xBFloat16

Broadcast 2 x bfloat16 to 512-bits

Implementations

Iterates over all MemorySize enum values

Gets the memory size info

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

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!(MemorySize::UInt32.size(), 4);
assert_eq!(MemorySize::Packed256_UInt16.size(), 32);
assert_eq!(MemorySize::Broadcast512_UInt64.size(), 8);

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!(MemorySize::UInt32.element_size(), 4);
assert_eq!(MemorySize::Packed256_UInt16.element_size(), 2);
assert_eq!(MemorySize::Broadcast512_UInt64.element_size(), 8);

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.element_type(), MemorySize::UInt32);
assert_eq!(MemorySize::Packed256_UInt16.element_type(), MemorySize::UInt16);
assert_eq!(MemorySize::Broadcast512_UInt64.element_type(), MemorySize::UInt64);

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.element_type_info().memory_size(), MemorySize::UInt32);
assert_eq!(MemorySize::Packed256_UInt16.element_type_info().memory_size(), MemorySize::UInt16);
assert_eq!(MemorySize::Broadcast512_UInt64.element_type_info().memory_size(), MemorySize::UInt64);

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());

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());

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!(MemorySize::UInt32.element_count(), 1);
assert_eq!(MemorySize::Packed256_UInt16.element_count(), 16);
assert_eq!(MemorySize::Broadcast512_UInt64.element_count(), 1);

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Serialize this value into the given Serde serializer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.