Immediate operands are encoded with instruction data.
constexpr Imm(
const Imm& other)
noexcept template<typename T, typename = typename std::enable_if<IsConstexprConstructibleAsImmType<typename std::decay<T>::type>::value>::type>
constexpr Imm(
const T& val,
const uint32_t predicate = 0)
noexcept Imm(
const float& val,
const uint32_t predicate = 0)
noexcept Imm(
const double& val,
const uint32_t predicate = 0)
noexcept
constexpr uint32_t predicate()
const noexcept constexpr int64_t value()
const noexcept constexpr uint32_t isInt()
const noexcept constexpr uint32_t isDouble()
const noexcept constexpr bool isInt8()
const noexcept constexpr bool isUInt8()
const noexcept constexpr bool isInt16()
const noexcept constexpr bool isUInt16()
const noexcept constexpr bool isInt32()
const noexcept constexpr bool isUInt32()
const noexcept template<typename T>
constexpr int32_t int32Lo()
const noexcept constexpr int32_t int32Hi()
const noexcept constexpr uint32_t uint32Lo()
const noexcept constexpr uint32_t uint32Hi()
const noexcept template<typename T>
void _setValueInternal(
int64_t val,
ImmType type)
noexcept
void signExtend8Bits()
noexcept void signExtend16Bits()
noexcept void signExtend32Bits()
noexcept void zeroExtend8Bits()
noexcept void zeroExtend16Bits()
noexcept void zeroExtend32Bits()
noexcept template<typename T>
template<typename T>
const T&
as()
const noexcept constexpr bool isNone()
const noexcept constexpr bool isReg()
const noexcept constexpr bool isMem()
const noexcept constexpr bool isImm()
const noexcept constexpr bool isLabel()
const noexcept constexpr bool hasSize()
const noexcept constexpr bool hasSize(
uint32_t s)
const noexcept constexpr uint32_t size()
const noexcept constexpr uint32_t id()
const noexcept
enum
DataIndex :
uint32_t
Imm::Imm()constexprconstexprnoexcept[1/4]◆
Creates a new immediate value (initial value is 0).
Imm::Imm(const Imm& other)constexprconstexprnoexcept[2/4]◆
Creates a new immediate value from other
.
Imm::Imm(const arm::Shift& shift)constexprconstexprnoexcept[3/4]◆
Creates a new immediate value from ARM/AArch64 specific shift
.
template<typename T, typename = typename std::enable_if<IsConstexprConstructibleAsImmType<typename std::decay<T>::type>::value>::type>
Imm::Imm(const T& val, const uint32_t predicate = 0
)constexprconstexprnoexcept[4/4]◆
Creates a new signed immediate value, assigning the value to val
and an architecture-specific predicate to predicate
.
- Note
- Predicate is currently only used by ARM architectures.
Imm& Imm::operator=(const Imm& other)noexcept◆
Assigns the value of the other
operand to this immediate.
ImmType Imm::type() constconstexprconstexprnoexcept◆
void Imm::setType(ImmType type)noexcept◆
Sets the immediate type to type
.
void Imm::resetType()noexcept◆
uint32_t Imm::predicate() constconstexprconstexprnoexcept◆
Returns operation predicate of the immediate.
The meaning depends on architecture, for example on ARM hardware this describes arm::ShiftOp of the immediate.
void Imm::setPredicate(uint32_t predicate)noexcept◆
Sets operation predicate of the immediate to predicate
.
The meaning depends on architecture, for example on ARM hardware this describes arm::ShiftOp of the immediate.
void Imm::resetPredicate()noexcept◆
Resets the shift operation type of the immediate to the default value (no operation).
int64_t Imm::value() constconstexprconstexprnoexcept◆
Returns the immediate value as int64_t
, which is the internal format Imm uses.
uint32_t Imm::isInt() constconstexprconstexprnoexcept◆
Tests whether this immediate value is integer of any size.
uint32_t Imm::isDouble() constconstexprconstexprnoexcept◆
Tests whether this immediate value is a double precision floating point value.
bool Imm::isInt8() constconstexprconstexprnoexcept◆
Tests whether the immediate can be casted to 8-bit signed integer.
bool Imm::isUInt8() constconstexprconstexprnoexcept◆
Tests whether the immediate can be casted to 8-bit unsigned integer.
bool Imm::isInt16() constconstexprconstexprnoexcept◆
Tests whether the immediate can be casted to 16-bit signed integer.
bool Imm::isUInt16() constconstexprconstexprnoexcept◆
Tests whether the immediate can be casted to 16-bit unsigned integer.
bool Imm::isInt32() constconstexprconstexprnoexcept◆
Tests whether the immediate can be casted to 32-bit signed integer.
bool Imm::isUInt32() constconstexprconstexprnoexcept◆
Tests whether the immediate can be casted to 32-bit unsigned integer.
template<typename T>
T Imm::valueAs() constnoexcept◆
Returns the immediate value casted to T
.
The value is masked before it's casted to T
so the returned value is simply the representation of T
considering the original value's lowest bits.
int32_t Imm::int32Lo() constconstexprconstexprnoexcept◆
Returns low 32-bit signed integer.
int32_t Imm::int32Hi() constconstexprconstexprnoexcept◆
Returns high 32-bit signed integer.
uint32_t Imm::uint32Lo() constconstexprconstexprnoexcept◆
Returns low 32-bit signed integer.
uint32_t Imm::uint32Hi() constconstexprconstexprnoexcept◆
Returns high 32-bit signed integer.
template<typename T>
void Imm::setValue(const T& val)noexcept◆
Sets immediate value to val
, the value is casted to a signed 64-bit integer.
Imm Imm::clone() constconstexprconstexprnoexcept◆
Clones the immediate operand.