Enum iced_x86::MemorySize
source · #[non_exhaustive]pub enum MemorySize {
Show 162 variants
Unknown = 0,
UInt8 = 1,
UInt16 = 2,
UInt32 = 3,
UInt52 = 4,
UInt64 = 5,
UInt128 = 6,
UInt256 = 7,
UInt512 = 8,
Int8 = 9,
Int16 = 10,
Int32 = 11,
Int64 = 12,
Int128 = 13,
Int256 = 14,
Int512 = 15,
SegPtr16 = 16,
SegPtr32 = 17,
SegPtr64 = 18,
WordOffset = 19,
DwordOffset = 20,
QwordOffset = 21,
Bound16_WordWord = 22,
Bound32_DwordDword = 23,
Bnd32 = 24,
Bnd64 = 25,
Fword6 = 26,
Fword10 = 27,
Float16 = 28,
Float32 = 29,
Float64 = 30,
Float80 = 31,
Float128 = 32,
BFloat16 = 33,
FpuEnv14 = 34,
FpuEnv28 = 35,
FpuState94 = 36,
FpuState108 = 37,
Fxsave_512Byte = 38,
Fxsave64_512Byte = 39,
Xsave = 40,
Xsave64 = 41,
Bcd = 42,
Tilecfg = 43,
Tile = 44,
SegmentDescSelector = 45,
KLHandleAes128 = 46,
KLHandleAes256 = 47,
Packed16_UInt8 = 48,
Packed16_Int8 = 49,
Packed32_UInt8 = 50,
Packed32_Int8 = 51,
Packed32_UInt16 = 52,
Packed32_Int16 = 53,
Packed32_Float16 = 54,
Packed32_BFloat16 = 55,
Packed64_UInt8 = 56,
Packed64_Int8 = 57,
Packed64_UInt16 = 58,
Packed64_Int16 = 59,
Packed64_UInt32 = 60,
Packed64_Int32 = 61,
Packed64_Float16 = 62,
Packed64_Float32 = 63,
Packed128_UInt8 = 64,
Packed128_Int8 = 65,
Packed128_UInt16 = 66,
Packed128_Int16 = 67,
Packed128_UInt32 = 68,
Packed128_Int32 = 69,
Packed128_UInt52 = 70,
Packed128_UInt64 = 71,
Packed128_Int64 = 72,
Packed128_Float16 = 73,
Packed128_Float32 = 74,
Packed128_Float64 = 75,
Packed128_BFloat16 = 76,
Packed128_2xFloat16 = 77,
Packed128_2xBFloat16 = 78,
Packed256_UInt8 = 79,
Packed256_Int8 = 80,
Packed256_UInt16 = 81,
Packed256_Int16 = 82,
Packed256_UInt32 = 83,
Packed256_Int32 = 84,
Packed256_UInt52 = 85,
Packed256_UInt64 = 86,
Packed256_Int64 = 87,
Packed256_UInt128 = 88,
Packed256_Int128 = 89,
Packed256_Float16 = 90,
Packed256_Float32 = 91,
Packed256_Float64 = 92,
Packed256_Float128 = 93,
Packed256_BFloat16 = 94,
Packed256_2xFloat16 = 95,
Packed256_2xBFloat16 = 96,
Packed512_UInt8 = 97,
Packed512_Int8 = 98,
Packed512_UInt16 = 99,
Packed512_Int16 = 100,
Packed512_UInt32 = 101,
Packed512_Int32 = 102,
Packed512_UInt52 = 103,
Packed512_UInt64 = 104,
Packed512_Int64 = 105,
Packed512_UInt128 = 106,
Packed512_Float16 = 107,
Packed512_Float32 = 108,
Packed512_Float64 = 109,
Packed512_2xFloat16 = 110,
Packed512_2xBFloat16 = 111,
Broadcast32_Float16 = 112,
Broadcast64_UInt32 = 113,
Broadcast64_Int32 = 114,
Broadcast64_Float16 = 115,
Broadcast64_Float32 = 116,
Broadcast128_Int16 = 117,
Broadcast128_UInt16 = 118,
Broadcast128_UInt32 = 119,
Broadcast128_Int32 = 120,
Broadcast128_UInt52 = 121,
Broadcast128_UInt64 = 122,
Broadcast128_Int64 = 123,
Broadcast128_Float16 = 124,
Broadcast128_Float32 = 125,
Broadcast128_Float64 = 126,
Broadcast128_2xInt16 = 127,
Broadcast128_2xInt32 = 128,
Broadcast128_2xUInt32 = 129,
Broadcast128_2xFloat16 = 130,
Broadcast128_2xBFloat16 = 131,
Broadcast256_Int16 = 132,
Broadcast256_UInt16 = 133,
Broadcast256_UInt32 = 134,
Broadcast256_Int32 = 135,
Broadcast256_UInt52 = 136,
Broadcast256_UInt64 = 137,
Broadcast256_Int64 = 138,
Broadcast256_Float16 = 139,
Broadcast256_Float32 = 140,
Broadcast256_Float64 = 141,
Broadcast256_2xInt16 = 142,
Broadcast256_2xInt32 = 143,
Broadcast256_2xUInt32 = 144,
Broadcast256_2xFloat16 = 145,
Broadcast256_2xBFloat16 = 146,
Broadcast512_Int16 = 147,
Broadcast512_UInt16 = 148,
Broadcast512_UInt32 = 149,
Broadcast512_Int32 = 150,
Broadcast512_UInt52 = 151,
Broadcast512_UInt64 = 152,
Broadcast512_Int64 = 153,
Broadcast512_Float16 = 154,
Broadcast512_Float32 = 155,
Broadcast512_Float64 = 156,
Broadcast512_2xFloat16 = 157,
Broadcast512_2xInt16 = 158,
Broadcast512_2xUInt32 = 159,
Broadcast512_2xInt32 = 160,
Broadcast512_2xBFloat16 = 161,
}
Expand description
Size of a memory reference
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown = 0
Unknown size or the instruction doesn’t reference any memory (eg. LEA
)
UInt8 = 1
Memory location contains a u8
UInt16 = 2
Memory location contains a u16
UInt32 = 3
Memory location contains a u32
UInt52 = 4
Memory location contains a u52
UInt64 = 5
Memory location contains a u64
UInt128 = 6
Memory location contains a u128
UInt256 = 7
Memory location contains a u256
UInt512 = 8
Memory location contains a u512
Int8 = 9
Memory location contains a i8
Int16 = 10
Memory location contains a i16
Int32 = 11
Memory location contains a i32
Int64 = 12
Memory location contains a i64
Int128 = 13
Memory location contains a i128
Int256 = 14
Memory location contains a i256
Int512 = 15
Memory location contains a i512
SegPtr16 = 16
Memory location contains a seg:ptr pair, u16
(offset) + u16
(segment/selector)
SegPtr32 = 17
Memory location contains a seg:ptr pair, u32
(offset) + u16
(segment/selector)
SegPtr64 = 18
Memory location contains a seg:ptr pair, u64
(offset) + u16
(segment/selector)
WordOffset = 19
Memory location contains a 16-bit offset (JMP/CALL WORD PTR [mem]
)
DwordOffset = 20
Memory location contains a 32-bit offset (JMP/CALL DWORD PTR [mem]
)
QwordOffset = 21
Memory location contains a 64-bit offset (JMP/CALL QWORD PTR [mem]
)
Bound16_WordWord = 22
Memory location contains two u16
s (16-bit BOUND
)
Bound32_DwordDword = 23
Memory location contains two u32
s (32-bit BOUND
)
Bnd32 = 24
32-bit BNDMOV
, 2 x u32
Bnd64 = 25
64-bit BNDMOV
, 2 x u64
Fword6 = 26
Memory location contains a 16-bit limit and a 32-bit address (eg. LGDTW
, LGDTD
)
Fword10 = 27
Memory location contains a 16-bit limit and a 64-bit address (eg. LGDTQ
)
Float16 = 28
Memory location contains a f16
Float32 = 29
Memory location contains a f32
Float64 = 30
Memory location contains a f64
Float80 = 31
Memory location contains a f80
Float128 = 32
Memory location contains a f128
BFloat16 = 33
Memory location contains a bfloat16
FpuEnv14 = 34
Memory location contains a 14-byte FPU environment (16-bit FLDENV
/FSTENV
)
FpuEnv28 = 35
Memory location contains a 28-byte FPU environment (32/64-bit FLDENV
/FSTENV
)
FpuState94 = 36
Memory location contains a 94-byte FPU environment (16-bit FSAVE
/FRSTOR
)
FpuState108 = 37
Memory location contains a 108-byte FPU environment (32/64-bit FSAVE
/FRSTOR
)
Fxsave_512Byte = 38
Memory location contains 512-bytes of FXSAVE
/FXRSTOR
data
Fxsave64_512Byte = 39
Memory location contains 512-bytes of FXSAVE64
/FXRSTOR64
data
Xsave = 40
32-bit XSAVE
area
Xsave64 = 41
64-bit XSAVE
area
Bcd = 42
Memory location contains a 10-byte bcd
value (FBLD
/FBSTP
)
Tilecfg = 43
64-bit location: TILECFG (LDTILECFG
/STTILECFG
)
Tile = 44
Tile data
SegmentDescSelector = 45
80-bit segment descriptor and selector: 0-7 = descriptor, 8-9 = selector
KLHandleAes128 = 46
384-bit AES 128 handle (Key Locker)
KLHandleAes256 = 47
512-bit AES 256 handle (Key Locker)
Packed16_UInt8 = 48
16-bit location: 2 x u8
Packed16_Int8 = 49
16-bit location: 2 x i8
Packed32_UInt8 = 50
32-bit location: 4 x u8
Packed32_Int8 = 51
32-bit location: 4 x i8
Packed32_UInt16 = 52
32-bit location: 2 x u16
Packed32_Int16 = 53
32-bit location: 2 x i16
Packed32_Float16 = 54
32-bit location: 2 x f16
Packed32_BFloat16 = 55
32-bit location: 2 x bfloat16
Packed64_UInt8 = 56
64-bit location: 8 x u8
Packed64_Int8 = 57
64-bit location: 8 x i8
Packed64_UInt16 = 58
64-bit location: 4 x u16
Packed64_Int16 = 59
64-bit location: 4 x i16
Packed64_UInt32 = 60
64-bit location: 2 x u32
Packed64_Int32 = 61
64-bit location: 2 x i32
Packed64_Float16 = 62
64-bit location: 4 x f16
Packed64_Float32 = 63
64-bit location: 2 x f32
Packed128_UInt8 = 64
128-bit location: 16 x u8
Packed128_Int8 = 65
128-bit location: 16 x i8
Packed128_UInt16 = 66
128-bit location: 8 x u16
Packed128_Int16 = 67
128-bit location: 8 x i16
Packed128_UInt32 = 68
128-bit location: 4 x u32
Packed128_Int32 = 69
128-bit location: 4 x i32
Packed128_UInt52 = 70
128-bit location: 2 x u52
Packed128_UInt64 = 71
128-bit location: 2 x u64
Packed128_Int64 = 72
128-bit location: 2 x i64
Packed128_Float16 = 73
128-bit location: 8 x f16
Packed128_Float32 = 74
128-bit location: 4 x f32
Packed128_Float64 = 75
128-bit location: 2 x f64
Packed128_BFloat16 = 76
128-bit location: 8 x bfloat16
Packed128_2xFloat16 = 77
128-bit location: 4 x (2 x f16
)
Packed128_2xBFloat16 = 78
128-bit location: 4 x (2 x bfloat16
)
Packed256_UInt8 = 79
256-bit location: 32 x u8
Packed256_Int8 = 80
256-bit location: 32 x i8
Packed256_UInt16 = 81
256-bit location: 16 x u16
Packed256_Int16 = 82
256-bit location: 16 x i16
Packed256_UInt32 = 83
256-bit location: 8 x u32
Packed256_Int32 = 84
256-bit location: 8 x i32
Packed256_UInt52 = 85
256-bit location: 4 x u52
Packed256_UInt64 = 86
256-bit location: 4 x u64
Packed256_Int64 = 87
256-bit location: 4 x i64
Packed256_UInt128 = 88
256-bit location: 2 x u128
Packed256_Int128 = 89
256-bit location: 2 x i128
Packed256_Float16 = 90
256-bit location: 16 x f16
Packed256_Float32 = 91
256-bit location: 8 x f32
Packed256_Float64 = 92
256-bit location: 4 x f64
Packed256_Float128 = 93
256-bit location: 2 x f128
Packed256_BFloat16 = 94
256-bit location: 16 x bfloat16
Packed256_2xFloat16 = 95
256-bit location: 8 x (2 x f16
)
Packed256_2xBFloat16 = 96
256-bit location: 8 x (2 x bfloat16
)
Packed512_UInt8 = 97
512-bit location: 64 x u8
Packed512_Int8 = 98
512-bit location: 64 x i8
Packed512_UInt16 = 99
512-bit location: 32 x u16
Packed512_Int16 = 100
512-bit location: 32 x i16
Packed512_UInt32 = 101
512-bit location: 16 x u32
Packed512_Int32 = 102
512-bit location: 16 x i32
Packed512_UInt52 = 103
512-bit location: 8 x u52
Packed512_UInt64 = 104
512-bit location: 8 x u64
Packed512_Int64 = 105
512-bit location: 8 x i64
Packed512_UInt128 = 106
256-bit location: 4 x u128
Packed512_Float16 = 107
512-bit location: 32 x f16
Packed512_Float32 = 108
512-bit location: 16 x f32
Packed512_Float64 = 109
512-bit location: 8 x f64
Packed512_2xFloat16 = 110
512-bit location: 16 x (2 x f16
)
Packed512_2xBFloat16 = 111
512-bit location: 16 x (2 x bfloat16
)
Broadcast32_Float16 = 112
Broadcast f16
to 32-bits
Broadcast64_UInt32 = 113
Broadcast u32
to 64-bits
Broadcast64_Int32 = 114
Broadcast i32
to 64-bits
Broadcast64_Float16 = 115
Broadcast f16
to 64-bits
Broadcast64_Float32 = 116
Broadcast f32
to 64-bits
Broadcast128_Int16 = 117
Broadcast i16
to 128-bits
Broadcast128_UInt16 = 118
Broadcast u16
to 128-bits
Broadcast128_UInt32 = 119
Broadcast u32
to 128-bits
Broadcast128_Int32 = 120
Broadcast i32
to 128-bits
Broadcast128_UInt52 = 121
Broadcast u52
to 128-bits
Broadcast128_UInt64 = 122
Broadcast u64
to 128-bits
Broadcast128_Int64 = 123
Broadcast i64
to 128-bits
Broadcast128_Float16 = 124
Broadcast f16
to 128-bits
Broadcast128_Float32 = 125
Broadcast f32
to 128-bits
Broadcast128_Float64 = 126
Broadcast f64
to 128-bits
Broadcast128_2xInt16 = 127
Broadcast 2 x i16
to 128-bits
Broadcast128_2xInt32 = 128
Broadcast 2 x i32
to 128-bits
Broadcast128_2xUInt32 = 129
Broadcast 2 x u32
to 128-bits
Broadcast128_2xFloat16 = 130
Broadcast 2 x f16
to 128-bits
Broadcast128_2xBFloat16 = 131
Broadcast 2 x bfloat16
to 128-bits
Broadcast256_Int16 = 132
Broadcast i16
to 256-bits
Broadcast256_UInt16 = 133
Broadcast u16
to 256-bits
Broadcast256_UInt32 = 134
Broadcast u32
to 256-bits
Broadcast256_Int32 = 135
Broadcast i32
to 256-bits
Broadcast256_UInt52 = 136
Broadcast u52
to 256-bits
Broadcast256_UInt64 = 137
Broadcast u64
to 256-bits
Broadcast256_Int64 = 138
Broadcast i64
to 256-bits
Broadcast256_Float16 = 139
Broadcast f16
to 256-bits
Broadcast256_Float32 = 140
Broadcast f32
to 256-bits
Broadcast256_Float64 = 141
Broadcast f64
to 256-bits
Broadcast256_2xInt16 = 142
Broadcast 2 x i16
to 256-bits
Broadcast256_2xInt32 = 143
Broadcast 2 x i32
to 256-bits
Broadcast256_2xUInt32 = 144
Broadcast 2 x u32
to 256-bits
Broadcast256_2xFloat16 = 145
Broadcast 2 x f16
to 256-bits
Broadcast256_2xBFloat16 = 146
Broadcast 2 x bfloat16
to 256-bits
Broadcast512_Int16 = 147
Broadcast i16
to 512-bits
Broadcast512_UInt16 = 148
Broadcast u16
to 512-bits
Broadcast512_UInt32 = 149
Broadcast u32
to 512-bits
Broadcast512_Int32 = 150
Broadcast i32
to 512-bits
Broadcast512_UInt52 = 151
Broadcast u52
to 512-bits
Broadcast512_UInt64 = 152
Broadcast u64
to 512-bits
Broadcast512_Int64 = 153
Broadcast i64
to 512-bits
Broadcast512_Float16 = 154
Broadcast f16
to 512-bits
Broadcast512_Float32 = 155
Broadcast f32
to 512-bits
Broadcast512_Float64 = 156
Broadcast f64
to 512-bits
Broadcast512_2xFloat16 = 157
Broadcast 2 x f16
to 512-bits
Broadcast512_2xInt16 = 158
Broadcast 2 x i16
to 512-bits
Broadcast512_2xUInt32 = 159
Broadcast 2 x u32
to 512-bits
Broadcast512_2xInt32 = 160
Broadcast 2 x i32
to 512-bits
Broadcast512_2xBFloat16 = 161
Broadcast 2 x bfloat16
to 512-bits
Implementations§
source§impl MemorySize
impl MemorySize
sourcepub fn values(
) -> impl Iterator<Item = MemorySize> + DoubleEndedIterator + ExactSizeIterator + FusedIterator
pub fn values( ) -> impl Iterator<Item = MemorySize> + DoubleEndedIterator + ExactSizeIterator + FusedIterator
Iterates over all MemorySize
enum values
source§impl MemorySize
impl MemorySize
sourcepub fn info(self) -> &'static MemorySizeInfo
pub fn info(self) -> &'static MemorySizeInfo
Gets the memory size info
Examples
use iced_x86::*;
let info = MemorySize::Packed256_UInt16.info();
assert_eq!(info.size(), 32);
sourcepub fn size(self) -> usize
pub fn size(self) -> usize
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);
sourcepub fn element_size(self) -> usize
pub fn element_size(self) -> usize
sourcepub fn element_type(self) -> Self
pub fn element_type(self) -> Self
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);
sourcepub fn element_type_info(self) -> &'static MemorySizeInfo
pub fn element_type_info(self) -> &'static MemorySizeInfo
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);
sourcepub fn is_signed(self) -> bool
pub fn is_signed(self) -> bool
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());
sourcepub fn is_packed(self) -> bool
pub fn is_packed(self) -> bool
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());
sourcepub fn element_count(self) -> usize
pub fn element_count(self) -> usize
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);
source§impl MemorySize
impl MemorySize
sourcepub fn is_broadcast(self) -> bool
pub fn is_broadcast(self) -> bool
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§
source§impl Clone for MemorySize
impl Clone for MemorySize
source§fn clone(&self) -> MemorySize
fn clone(&self) -> MemorySize
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MemorySize
impl Debug for MemorySize
source§impl Default for MemorySize
impl Default for MemorySize
source§impl<'de> Deserialize<'de> for MemorySize
impl<'de> Deserialize<'de> for MemorySize
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
source§impl Hash for MemorySize
impl Hash for MemorySize
source§impl Ord for MemorySize
impl Ord for MemorySize
source§fn cmp(&self, other: &MemorySize) -> Ordering
fn cmp(&self, other: &MemorySize) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for MemorySize
impl PartialEq for MemorySize
source§fn eq(&self, other: &MemorySize) -> bool
fn eq(&self, other: &MemorySize) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MemorySize
impl PartialOrd for MemorySize
source§fn partial_cmp(&self, other: &MemorySize) -> Option<Ordering>
fn partial_cmp(&self, other: &MemorySize) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more