36 auto need_swap = sys_endianness != platform_endianness;
38 if (size ==
sizeof(
double)) {
39 static_assert(
sizeof(double) ==
sizeof(
triton::uint64),
"Unexpected double type size");
40 std::memcpy(&imm_value, &
value,
sizeof(
double));
42 imm_value = utils::byteswap(imm_value);
46 else if (size ==
sizeof(
float)) {
47 float fvalue =
static_cast<float>(
value);
49 static_assert(
sizeof(float) ==
sizeof(uint32_t),
"Unexpected float type size");
50 std::memcpy(&repr, &fvalue,
sizeof(
float));
55 float fvalue =
static_cast<float>(
value);
70 ArmOperandProperties(other) {
137 ArmOperandProperties::operator=(other);
144 void Immediate::copy(
const Immediate& other) {
179 return !(imm1 == imm2);
191 seed1 ^= imm1.
getValue() + 0x9e3779b97f4a7c13 + (seed1 << 6) + (seed1 >> 2);
192 seed1 ^= imm1.
getSize() + 0x9e3779b97f4a7c13 + (seed1 << 6) + (seed1 >> 2);
194 seed2 ^= imm2.
getValue() + 0x9e3779b97f4a7c13 + (seed2 << 6) + (seed2 >> 2);
195 seed2 ^= imm2.
getSize() + 0x9e3779b97f4a7c13 + (seed2 << 6) + (seed2 >> 2);
197 return (seed1 < seed2);
This class is used to deal with registers and memory as bits vector.
TRITON_EXPORT triton::uint32 getHigh(void) const
Returns the highest bit.
TRITON_EXPORT triton::uint32 getVectorSize(void) const
Returns the size in bits of the vector.
TRITON_EXPORT triton::uint32 getLow(void) const
Returns the lower bit.
TRITON_EXPORT void setBits(triton::uint32 high, triton::uint32 low)
Sets the bits (high, low) position.
TRITON_EXPORT BitsVector & operator=(const BitsVector &other)
Copy a BitsVector.
bool operator==(const Immediate &imm1, const Immediate &imm2)
Compares two Immediate.
std::ostream & operator<<(std::ostream &stream, BasicBlock &block)
Displays an BasicBlock.
bool operator!=(const Immediate &imm1, const Immediate &imm2)
Compares two Immediate.
bool operator<(const Immediate &imm1, const Immediate &imm2)
Compares two Immediate (needed for std::map)
constexpr triton::uint32 byte
byte size in bit
constexpr triton::uint32 fword
fword size in byte
constexpr triton::uint32 dword
dword size in byte
constexpr triton::uint32 dqqword
dqqword size in byte
constexpr triton::uint32 word
word size in byte
constexpr triton::uint32 dqword
dqword size in byte
constexpr triton::uint32 byte
byte size in byte
constexpr triton::uint32 qword
qword size in byte
constexpr triton::uint32 qqword
qqword size in byte
auto f32_to_f16(float value) -> uint16_t
Cast 32-bit floating point value to 16-bit according to IEEE-754.
std::uint16_t uint16
unisgned 16-bits
std::uint64_t uint64
unisgned 64-bits
std::uint32_t uint32
unisgned 32-bits
std::uint8_t uint8
unisgned 8-bits