libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
immediate.hpp
Go to the documentation of this file.
1
2/*
3** Copyright (C) - Triton
4**
5** This program is under the terms of the Apache License 2.0.
6*/
7
8#ifndef TRITON_IMMEDIATE_HPP
9#define TRITON_IMMEDIATE_HPP
10
11#include <triton/archEnums.hpp>
13#include <triton/bitsVector.hpp>
14#include <triton/dllexport.hpp>
16
17
18
20namespace triton {
27 namespace arch {
38 protected:
41
42 private:
44 void copy(const Immediate& other);
45
46 public:
48 TRITON_EXPORT Immediate();
49
51 TRITON_EXPORT Immediate(triton::uint64 value, triton::uint32 size /* bytes*/);
52
54 TRITON_EXPORT Immediate(const Immediate& other);
55
57 TRITON_EXPORT triton::uint64 getValue(void) const;
58
60 TRITON_EXPORT triton::uint32 getBitSize(void) const;
61
63 TRITON_EXPORT triton::uint32 getSize(void) const;
64
66 TRITON_EXPORT triton::arch::operand_e getType(void) const;
67
69 TRITON_EXPORT void setValue(triton::uint64 v, triton::uint32 size /* bytes*/);
70
72 TRITON_EXPORT Immediate& operator=(const Immediate& other);
73 };
74
76 TRITON_EXPORT std::ostream& operator<<(std::ostream& stream, const Immediate& imm);
77
79 TRITON_EXPORT std::ostream& operator<<(std::ostream& stream, const Immediate* imm);
80
82 TRITON_EXPORT bool operator==(const Immediate& imm1, const Immediate& imm2);
83
85 TRITON_EXPORT bool operator!=(const Immediate& imm1, const Immediate& imm2);
86
88 TRITON_EXPORT bool operator<(const Immediate& imm1, const Immediate& imm2);
89
91 };
93};
94
95#endif /* TRITON_IMMEDIATE_HPP */
This class is used to deal with registers and memory as bits vector.
This class is used to represent an immediate.
Definition immediate.hpp:37
triton::uint64 value
The value of the operand.
Definition immediate.hpp:40
TRITON_EXPORT triton::uint32 getSize(void) const
Returns the size (in bytes) of the immediate vector.
Definition immediate.cpp:80
TRITON_EXPORT Immediate & operator=(const Immediate &other)
Copy an Immediate.
Definition immediate.cpp:95
TRITON_EXPORT triton::uint32 getBitSize(void) const
Returns the size (in bits) of the immediate vector.
Definition immediate.cpp:85
TRITON_EXPORT triton::uint64 getValue(void) const
Returns the value of the operand.
Definition immediate.cpp:34
TRITON_EXPORT triton::arch::operand_e getType(void) const
Returns the type of the operand (triton::arch::OPERAND_IMMEDIATE).
Definition immediate.cpp:90
TRITON_EXPORT void setValue(triton::uint64 v, triton::uint32 size)
Sets the value of the operand.
Definition immediate.cpp:39
TRITON_EXPORT Immediate()
Constructor.
Definition immediate.cpp:17
This class is used to represent specific properties of an Arm operand.
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)
std::uint64_t uint64
unisgned 64-bits
std::uint32_t uint32
unisgned 32-bits
The Triton namespace.