MemorySizeExt¶
- class iced_x86.MemorySizeExt¶
MemorySizeenum extension methods, see alsoMemorySizeInfo- static element_count(memory_size)¶
Gets the number of elements in the packed data type or
1if it’s not packed data (MemorySizeExt.is_packed)- Parameters:
memory_size (
MemorySize) – Enum value- Returns:
(
u32) Number of elements in the packed data type- Return type:
Examples:
from iced_x86 import * assert MemorySizeExt.element_count(MemorySize.UINT32) == 1 assert MemorySizeExt.element_count(MemorySize.PACKED256_UINT16) == 16 assert MemorySizeExt.element_count(MemorySize.BROADCAST512_UINT64) == 1
- static element_size(memory_size)¶
Gets the size in bytes of the packed element. If it’s not a packed data type, it’s equal to
MemorySizeExt.size.- Parameters:
memory_size (
MemorySize) – Enum value- Returns:
(
u32) Size in bytes of the packed element- Return type:
Examples:
from iced_x86 import * assert MemorySizeExt.element_size(MemorySize.UINT32) == 4 assert MemorySizeExt.element_size(MemorySize.PACKED256_UINT16) == 2 assert MemorySizeExt.element_size(MemorySize.BROADCAST512_UINT64) == 8
- static element_type(memory_size)¶
Gets the element type if it’s packed data or the input value if it’s not packed data
- Parameters:
memory_size (
MemorySize) – Enum value- Returns:
Element type
- Return type:
Examples:
from iced_x86 import * assert MemorySizeExt.element_type(MemorySize.UINT32) == MemorySize.UINT32 assert MemorySizeExt.element_type(MemorySize.PACKED256_UINT16) == MemorySize.UINT16 assert MemorySizeExt.element_type(MemorySize.BROADCAST512_UINT64) == MemorySize.UINT64
- static element_type_info(memory_size)¶
Gets the element type info if it’s packed data or the input value if it’s not packed data
- Parameters:
memory_size (
MemorySize) – Enum value- Returns:
Element type info
- Return type:
Examples:
from iced_x86 import * assert MemorySizeExt.element_type_info(MemorySize.UINT32).memory_size == MemorySize.UINT32 assert MemorySizeExt.element_type_info(MemorySize.PACKED256_UINT16).memory_size == MemorySize.UINT16 assert MemorySizeExt.element_type_info(MemorySize.BROADCAST512_UINT64).memory_size == MemorySize.UINT64
- static info(memory_size)¶
Gets the memory size info
- Parameters:
memory_size (
MemorySize) – Enum value- Returns:
Memory size info
- Return type:
Examples:
from iced_x86 import * info = MemorySizeExt.info(MemorySize.PACKED256_UINT16) assert info.size == 32
- static is_broadcast(memory_size)¶
Trueif it is a broadcast memory type- Parameters:
memory_size (
MemorySize) – Enum value- Returns:
Trueif it is a broadcast memory type- Return type:
Examples:
from iced_x86 import * assert not MemorySizeExt.is_broadcast(MemorySize.PACKED64_FLOAT16) assert MemorySizeExt.is_broadcast(MemorySize.BROADCAST512_UINT64)
- static is_packed(memory_size)¶
Trueif this is a packed data type, eg.MemorySize.PACKED128_FLOAT32- Parameters:
memory_size (
MemorySize) – Enum value- Returns:
Trueif this is a packed data type- Return type:
Examples:
from iced_x86 import * assert not MemorySizeExt.is_packed(MemorySize.UINT32) assert MemorySizeExt.is_packed(MemorySize.PACKED256_UINT16) assert not MemorySizeExt.is_packed(MemorySize.BROADCAST512_UINT64)
- static is_signed(memory_size)¶
Trueif it’s signed data (signed integer or a floating point value)- Parameters:
memory_size (
MemorySize) – Enum value- Returns:
Trueif it’s signed data- Return type:
Examples:
from iced_x86 import * assert not MemorySizeExt.is_signed(MemorySize.UINT32) assert MemorySizeExt.is_signed(MemorySize.INT32) assert MemorySizeExt.is_signed(MemorySize.FLOAT64)
- static size(memory_size)¶
Gets the size in bytes of the memory location or 0 if it’s not accessed by the instruction or unknown or variable sized
- Parameters:
memory_size (
MemorySize) – Enum value- Returns:
(
u32) Size in bytes of the memory location or- Return type:
Examples:
from iced_x86 import * assert MemorySizeExt.size(MemorySize.UINT32) == 4 assert MemorySizeExt.size(MemorySize.PACKED256_UINT16) == 32 assert MemorySizeExt.size(MemorySize.BROADCAST512_UINT64) == 8