summaryrefslogtreecommitdiff
path: root/lowlevelilinstruction.h
diff options
context:
space:
mode:
authorKyleMiles <krm504@nyu.edu>2022-01-27 22:43:28 -0500
committerKyleMiles <krm504@nyu.edu>2022-01-28 00:24:06 -0500
commit6812c973c9fa9b4ad642ab81856c05f87bd6fcc4 (patch)
treedace4156d03148bcaf02df138ab4e0d93e61bc6f /lowlevelilinstruction.h
parent519c9db22367f2659d1a54599fab47e6313be06e (diff)
Format All Files
Diffstat (limited to 'lowlevelilinstruction.h')
-rw-r--r--lowlevelilinstruction.h1159
1 files changed, 854 insertions, 305 deletions
diff --git a/lowlevelilinstruction.h b/lowlevelilinstruction.h
index e11efa51..033b98b7 100644
--- a/lowlevelilinstruction.h
+++ b/lowlevelilinstruction.h
@@ -24,9 +24,9 @@
#include <unordered_map>
#include <vector>
#ifdef BINARYNINJACORE_LIBRARY
-#include "type.h"
+ #include "type.h"
#else
-#include "binaryninjaapi.h"
+ #include "binaryninjaapi.h"
#endif
#ifdef BINARYNINJACORE_LIBRARY
@@ -42,7 +42,8 @@ namespace BinaryNinja
class LowLevelILFunction;
template <BNLowLevelILOperation N>
- struct LowLevelILInstructionAccessor {};
+ struct LowLevelILInstructionAccessor
+ {};
struct LowLevelILInstruction;
struct LowLevelILConstantInstruction;
@@ -223,14 +224,15 @@ namespace BinaryNinja
RegisterStackAdjustmentsLowLevelOperandUsage,
OffsetLowLevelOperandUsage
};
-}
+} // namespace BinaryNinjaCore
-namespace std
-{
+namespace std {
#ifdef BINARYNINJACORE_LIBRARY
- template<> struct hash<BinaryNinjaCore::SSARegister>
+ template <>
+ struct hash<BinaryNinjaCore::SSARegister>
#else
- template<> struct hash<BinaryNinja::SSARegister>
+ template <>
+ struct hash<BinaryNinja::SSARegister>
#endif
{
#ifdef BINARYNINJACORE_LIBRARY
@@ -246,9 +248,11 @@ namespace std
};
#ifdef BINARYNINJACORE_LIBRARY
- template<> struct hash<BinaryNinjaCore::SSARegisterStack>
+ template <>
+ struct hash<BinaryNinjaCore::SSARegisterStack>
#else
- template<> struct hash<BinaryNinja::SSARegisterStack>
+ template <>
+ struct hash<BinaryNinja::SSARegisterStack>
#endif
{
#ifdef BINARYNINJACORE_LIBRARY
@@ -264,9 +268,11 @@ namespace std
};
#ifdef BINARYNINJACORE_LIBRARY
- template<> struct hash<BinaryNinjaCore::SSAFlag>
+ template <>
+ struct hash<BinaryNinjaCore::SSAFlag>
#else
- template<> struct hash<BinaryNinja::SSAFlag>
+ template <>
+ struct hash<BinaryNinja::SSAFlag>
#endif
{
#ifdef BINARYNINJACORE_LIBRARY
@@ -281,20 +287,20 @@ namespace std
}
};
- template<> struct hash<BNLowLevelILOperation>
+ template <>
+ struct hash<BNLowLevelILOperation>
{
typedef BNLowLevelILOperation argument_type;
typedef int result_type;
- result_type operator()(argument_type const& value) const
- {
- return (result_type)value;
- }
+ result_type operator()(argument_type const& value) const { return (result_type)value; }
};
#ifdef BINARYNINJACORE_LIBRARY
- template<> struct hash<BinaryNinjaCore::LowLevelILOperandUsage>
+ template <>
+ struct hash<BinaryNinjaCore::LowLevelILOperandUsage>
#else
- template<> struct hash<BinaryNinja::LowLevelILOperandUsage>
+ template <>
+ struct hash<BinaryNinja::LowLevelILOperandUsage>
#endif
{
#ifdef BINARYNINJACORE_LIBRARY
@@ -303,12 +309,9 @@ namespace std
typedef BinaryNinja::LowLevelILOperandUsage argument_type;
#endif
typedef int result_type;
- result_type operator()(argument_type const& value) const
- {
- return (result_type)value;
- }
+ result_type operator()(argument_type const& value) const { return (result_type)value; }
};
-}
+} // namespace std
#ifdef BINARYNINJACORE_LIBRARY
namespace BinaryNinjaCore
@@ -317,21 +320,21 @@ namespace BinaryNinja
#endif
{
#ifdef BINARYNINJACORE_LIBRARY
-#define _STD_VECTOR vector
-#define _STD_SET set
-#define _STD_UNORDERED_MAP unordered_map
-#define _STD_MAP map
+ #define _STD_VECTOR vector
+ #define _STD_SET set
+ #define _STD_UNORDERED_MAP unordered_map
+ #define _STD_MAP map
#else
-#define _STD_VECTOR std::vector
-#define _STD_SET std::set
-#define _STD_UNORDERED_MAP std::unordered_map
-#define _STD_MAP std::map
+ #define _STD_VECTOR std::vector
+ #define _STD_SET std::set
+ #define _STD_UNORDERED_MAP std::unordered_map
+ #define _STD_MAP std::map
#endif
- class LowLevelILInstructionAccessException: public std::exception
+ class LowLevelILInstructionAccessException : public std::exception
{
- public:
- LowLevelILInstructionAccessException(): std::exception() {}
+ public:
+ LowLevelILInstructionAccessException() : std::exception() {}
virtual const char* what() const NOEXCEPT { return "invalid access to LLIL instruction"; }
};
@@ -358,7 +361,7 @@ namespace BinaryNinja
ListIterator m_start;
- public:
+ public:
typedef ListIterator const_iterator;
LowLevelILIntegerList(LowLevelILFunction* func, const BNLowLevelILInstruction& instr, size_t count);
@@ -379,13 +382,17 @@ namespace BinaryNinja
bool operator==(const ListIterator& a) const { return pos == a.pos; }
bool operator!=(const ListIterator& a) const { return pos != a.pos; }
bool operator<(const ListIterator& a) const { return pos < a.pos; }
- ListIterator& operator++() { ++pos; return *this; }
+ ListIterator& operator++()
+ {
+ ++pos;
+ return *this;
+ }
size_t operator*();
};
LowLevelILIntegerList m_list;
- public:
+ public:
typedef ListIterator const_iterator;
LowLevelILIndexList(LowLevelILFunction* func, const BNLowLevelILInstruction& instr, size_t count);
@@ -406,13 +413,18 @@ namespace BinaryNinja
bool operator==(const ListIterator& a) const { return pos == a.pos; }
bool operator!=(const ListIterator& a) const { return pos != a.pos; }
bool operator<(const ListIterator& a) const { return pos < a.pos; }
- ListIterator& operator++() { ++pos; ++pos; return *this; }
+ ListIterator& operator++()
+ {
+ ++pos;
+ ++pos;
+ return *this;
+ }
const std::pair<uint64_t, size_t> operator*();
};
LowLevelILIntegerList m_list;
- public:
+ public:
typedef ListIterator const_iterator;
LowLevelILIndexMap(LowLevelILFunction* func, const BNLowLevelILInstruction& instr, size_t count);
@@ -434,18 +446,22 @@ namespace BinaryNinja
bool operator==(const ListIterator& a) const { return pos == a.pos; }
bool operator!=(const ListIterator& a) const { return pos != a.pos; }
bool operator<(const ListIterator& a) const { return pos < a.pos; }
- ListIterator& operator++() { ++pos; return *this; }
+ ListIterator& operator++()
+ {
+ ++pos;
+ return *this;
+ }
const LowLevelILInstruction operator*();
};
LowLevelILIntegerList m_list;
size_t m_instructionIndex;
- public:
+ public:
typedef ListIterator const_iterator;
- LowLevelILInstructionList(LowLevelILFunction* func, const BNLowLevelILInstruction& instr,
- size_t count, size_t instrIndex);
+ LowLevelILInstructionList(
+ LowLevelILFunction* func, const BNLowLevelILInstruction& instr, size_t count, size_t instrIndex);
const_iterator begin() const;
const_iterator end() const;
@@ -463,13 +479,17 @@ namespace BinaryNinja
bool operator==(const ListIterator& a) const { return pos == a.pos; }
bool operator!=(const ListIterator& a) const { return pos != a.pos; }
bool operator<(const ListIterator& a) const { return pos < a.pos; }
- ListIterator& operator++() { ++pos; return *this; }
+ ListIterator& operator++()
+ {
+ ++pos;
+ return *this;
+ }
const RegisterOrFlag operator*();
};
LowLevelILIntegerList m_list;
- public:
+ public:
typedef ListIterator const_iterator;
LowLevelILRegisterOrFlagList(LowLevelILFunction* func, const BNLowLevelILInstruction& instr, size_t count);
@@ -490,13 +510,18 @@ namespace BinaryNinja
bool operator==(const ListIterator& a) const { return pos == a.pos; }
bool operator!=(const ListIterator& a) const { return pos != a.pos; }
bool operator<(const ListIterator& a) const { return pos < a.pos; }
- ListIterator& operator++() { ++pos; ++pos; return *this; }
+ ListIterator& operator++()
+ {
+ ++pos;
+ ++pos;
+ return *this;
+ }
const SSARegister operator*();
};
LowLevelILIntegerList m_list;
- public:
+ public:
typedef ListIterator const_iterator;
LowLevelILSSARegisterList(LowLevelILFunction* func, const BNLowLevelILInstruction& instr, size_t count);
@@ -517,13 +542,18 @@ namespace BinaryNinja
bool operator==(const ListIterator& a) const { return pos == a.pos; }
bool operator!=(const ListIterator& a) const { return pos != a.pos; }
bool operator<(const ListIterator& a) const { return pos < a.pos; }
- ListIterator& operator++() { ++pos; ++pos; return *this; }
+ ListIterator& operator++()
+ {
+ ++pos;
+ ++pos;
+ return *this;
+ }
const SSARegisterStack operator*();
};
LowLevelILIntegerList m_list;
- public:
+ public:
typedef ListIterator const_iterator;
LowLevelILSSARegisterStackList(LowLevelILFunction* func, const BNLowLevelILInstruction& instr, size_t count);
@@ -544,13 +574,18 @@ namespace BinaryNinja
bool operator==(const ListIterator& a) const { return pos == a.pos; }
bool operator!=(const ListIterator& a) const { return pos != a.pos; }
bool operator<(const ListIterator& a) const { return pos < a.pos; }
- ListIterator& operator++() { ++pos; ++pos; return *this; }
+ ListIterator& operator++()
+ {
+ ++pos;
+ ++pos;
+ return *this;
+ }
const SSAFlag operator*();
};
LowLevelILIntegerList m_list;
- public:
+ public:
typedef ListIterator const_iterator;
LowLevelILSSAFlagList(LowLevelILFunction* func, const BNLowLevelILInstruction& instr, size_t count);
@@ -571,13 +606,18 @@ namespace BinaryNinja
bool operator==(const ListIterator& a) const { return pos == a.pos; }
bool operator!=(const ListIterator& a) const { return pos != a.pos; }
bool operator<(const ListIterator& a) const { return pos < a.pos; }
- ListIterator& operator++() { ++pos; ++pos; return *this; }
+ ListIterator& operator++()
+ {
+ ++pos;
+ ++pos;
+ return *this;
+ }
const SSARegisterOrFlag operator*();
};
LowLevelILIntegerList m_list;
- public:
+ public:
typedef ListIterator const_iterator;
LowLevelILSSARegisterOrFlagList(LowLevelILFunction* func, const BNLowLevelILInstruction& instr, size_t count);
@@ -590,7 +630,7 @@ namespace BinaryNinja
operator _STD_VECTOR<SSARegisterOrFlag>() const;
};
- struct LowLevelILInstructionBase: public BNLowLevelILInstruction
+ struct LowLevelILInstructionBase : public BNLowLevelILInstruction
{
#ifdef BINARYNINJACORE_LIBRARY
LowLevelILFunction* function;
@@ -600,10 +640,9 @@ namespace BinaryNinja
size_t exprIndex, instructionIndex;
static _STD_UNORDERED_MAP<LowLevelILOperandUsage, LowLevelILOperandType> operandTypeForUsage;
- static _STD_UNORDERED_MAP<BNLowLevelILOperation,
- _STD_VECTOR<LowLevelILOperandUsage>> operationOperandUsage;
- static _STD_UNORDERED_MAP<BNLowLevelILOperation,
- _STD_UNORDERED_MAP<LowLevelILOperandUsage, size_t>> operationOperandIndex;
+ static _STD_UNORDERED_MAP<BNLowLevelILOperation, _STD_VECTOR<LowLevelILOperandUsage>> operationOperandUsage;
+ static _STD_UNORDERED_MAP<BNLowLevelILOperation, _STD_UNORDERED_MAP<LowLevelILOperandUsage, size_t>>
+ operationOperandIndex;
LowLevelILOperandList GetOperands() const;
@@ -628,11 +667,12 @@ namespace BinaryNinja
void UpdateRawOperand(size_t operandIndex, ExprId value);
void UpdateRawOperandAsSSARegisterList(size_t operandIndex, const _STD_VECTOR<SSARegister>& regs);
- void UpdateRawOperandAsSSARegisterOrFlagList(size_t operandIndex, const _STD_VECTOR<SSARegisterOrFlag>& outputs);
+ void UpdateRawOperandAsSSARegisterOrFlagList(
+ size_t operandIndex, const _STD_VECTOR<SSARegisterOrFlag>& outputs);
RegisterValue GetValue() const;
- PossibleValueSet GetPossibleValues(const _STD_SET<BNDataFlowQueryOption>& options =
- _STD_SET<BNDataFlowQueryOption>()) const;
+ PossibleValueSet GetPossibleValues(
+ const _STD_SET<BNDataFlowQueryOption>& options = _STD_SET<BNDataFlowQueryOption>()) const;
RegisterValue GetRegisterValue(uint32_t reg);
RegisterValue GetRegisterValueAfter(uint32_t reg);
@@ -674,14 +714,8 @@ namespace BinaryNinja
throw LowLevelILInstructionAccessException();
return *(LowLevelILInstructionAccessor<N>*)this;
}
- LowLevelILOneOperandInstruction& AsOneOperand()
- {
- return *(LowLevelILOneOperandInstruction*)this;
- }
- LowLevelILTwoOperandInstruction& AsTwoOperand()
- {
- return *(LowLevelILTwoOperandInstruction*)this;
- }
+ LowLevelILOneOperandInstruction& AsOneOperand() { return *(LowLevelILOneOperandInstruction*)this; }
+ LowLevelILTwoOperandInstruction& AsTwoOperand() { return *(LowLevelILTwoOperandInstruction*)this; }
LowLevelILTwoOperandWithCarryInstruction& AsTwoOperandWithCarry()
{
return *(LowLevelILTwoOperandWithCarryInstruction*)this;
@@ -694,10 +728,7 @@ namespace BinaryNinja
throw LowLevelILInstructionAccessException();
return *(const LowLevelILInstructionAccessor<N>*)this;
}
- const LowLevelILConstantInstruction& AsConstant() const
- {
- return *(const LowLevelILConstantInstruction*)this;
- }
+ const LowLevelILConstantInstruction& AsConstant() const { return *(const LowLevelILConstantInstruction*)this; }
const LowLevelILOneOperandInstruction& AsOneOperand() const
{
return *(const LowLevelILOneOperandInstruction*)this;
@@ -712,80 +743,316 @@ namespace BinaryNinja
}
};
- struct LowLevelILInstruction: public LowLevelILInstructionBase
+ struct LowLevelILInstruction : public LowLevelILInstructionBase
{
LowLevelILInstruction();
- LowLevelILInstruction(LowLevelILFunction* func, const BNLowLevelILInstruction& instr,
- size_t expr, size_t instrIdx);
+ LowLevelILInstruction(
+ LowLevelILFunction* func, const BNLowLevelILInstruction& instr, size_t expr, size_t instrIdx);
LowLevelILInstruction(const LowLevelILInstructionBase& instr);
void VisitExprs(const std::function<bool(const LowLevelILInstruction& expr)>& func) const;
ExprId CopyTo(LowLevelILFunction* dest) const;
ExprId CopyTo(LowLevelILFunction* dest,
- const std::function<ExprId(const LowLevelILInstruction& subExpr)>& subExprHandler) const;
+ const std::function<ExprId(const LowLevelILInstruction& subExpr)>& subExprHandler) const;
// Templated accessors for instruction operands, use these for efficient access to a known instruction
- template <BNLowLevelILOperation N> LowLevelILInstruction GetSourceExpr() const { return As<N>().GetSourceExpr(); }
- template <BNLowLevelILOperation N> uint32_t GetSourceRegister() const { return As<N>().GetSourceRegister(); }
- template <BNLowLevelILOperation N> uint32_t GetSourceRegisterStack() const { return As<N>().GetSourceRegisterStack(); }
- template <BNLowLevelILOperation N> uint32_t GetSourceFlag() const { return As<N>().GetSourceFlag(); }
- template <BNLowLevelILOperation N> SSARegister GetSourceSSARegister() const { return As<N>().GetSourceSSARegister(); }
- template <BNLowLevelILOperation N> SSARegisterStack GetSourceSSARegisterStack() const { return As<N>().GetSourceSSARegisterStack(); }
- template <BNLowLevelILOperation N> SSAFlag GetSourceSSAFlag() const { return As<N>().GetSourceSSAFlag(); }
- template <BNLowLevelILOperation N> LowLevelILInstruction GetDestExpr() const { return As<N>().GetDestExpr(); }
- template <BNLowLevelILOperation N> uint32_t GetDestRegister() const { return As<N>().GetDestRegister(); }
- template <BNLowLevelILOperation N> uint32_t GetDestRegisterStack() const { return As<N>().GetDestRegisterStack(); }
- template <BNLowLevelILOperation N> uint32_t GetDestFlag() const { return As<N>().GetDestFlag(); }
- template <BNLowLevelILOperation N> SSARegister GetDestSSARegister() const { return As<N>().GetDestSSARegister(); }
- template <BNLowLevelILOperation N> SSARegisterStack GetDestSSARegisterStack() const { return As<N>().GetDestSSARegisterStack(); }
- template <BNLowLevelILOperation N> SSAFlag GetDestSSAFlag() const { return As<N>().GetDestSSAFlag(); }
- template <BNLowLevelILOperation N> uint32_t GetSemanticFlagClass() const { return As<N>().GetSemanticFlagClass(); }
- template <BNLowLevelILOperation N> uint32_t GetSemanticFlagGroup() const { return As<N>().GetSemanticFlagGroup(); }
- template <BNLowLevelILOperation N> uint32_t GetPartialRegister() const { return As<N>().GetPartialRegister(); }
- template <BNLowLevelILOperation N> SSARegister GetStackSSARegister() const { return As<N>().GetStackSSARegister(); }
- template <BNLowLevelILOperation N> SSARegister GetTopSSARegister() const { return As<N>().GetTopSSARegister(); }
- template <BNLowLevelILOperation N> LowLevelILInstruction GetLeftExpr() const { return As<N>().GetLeftExpr(); }
- template <BNLowLevelILOperation N> LowLevelILInstruction GetRightExpr() const { return As<N>().GetRightExpr(); }
- template <BNLowLevelILOperation N> LowLevelILInstruction GetCarryExpr() const { return As<N>().GetCarryExpr(); }
- template <BNLowLevelILOperation N> LowLevelILInstruction GetConditionExpr() const { return As<N>().GetConditionExpr(); }
- template <BNLowLevelILOperation N> uint32_t GetHighRegister() const { return As<N>().GetHighRegister(); }
- template <BNLowLevelILOperation N> SSARegister GetHighSSARegister() const { return As<N>().GetHighSSARegister(); }
- template <BNLowLevelILOperation N> uint32_t GetLowRegister() const { return As<N>().GetLowRegister(); }
- template <BNLowLevelILOperation N> SSARegister GetLowSSARegister() const { return As<N>().GetLowSSARegister(); }
- template <BNLowLevelILOperation N> uint32_t GetIntrinsic() const { return As<N>().GetIntrinsic(); }
- template <BNLowLevelILOperation N> int64_t GetConstant() const { return As<N>().GetConstant(); }
- template <BNLowLevelILOperation N> uint64_t GetOffset() const { return As<N>().GetOffset(); }
- template <BNLowLevelILOperation N> int64_t GetVector() const { return As<N>().GetVector(); }
- template <BNLowLevelILOperation N> int64_t GetStackAdjustment() const { return As<N>().GetStackAdjustment(); }
- template <BNLowLevelILOperation N> size_t GetTarget() const { return As<N>().GetTarget(); }
- template <BNLowLevelILOperation N> size_t GetTrueTarget() const { return As<N>().GetTrueTarget(); }
- template <BNLowLevelILOperation N> size_t GetFalseTarget() const { return As<N>().GetFalseTarget(); }
- template <BNLowLevelILOperation N> size_t GetBitIndex() const { return As<N>().GetBitIndex(); }
- template <BNLowLevelILOperation N> size_t GetSourceMemoryVersion() const { return As<N>().GetSourceMemoryVersion(); }
- template <BNLowLevelILOperation N> size_t GetDestMemoryVersion() const { return As<N>().GetDestMemoryVersion(); }
- template <BNLowLevelILOperation N> BNLowLevelILFlagCondition GetFlagCondition() const { return As<N>().GetFlagCondition(); }
- template <BNLowLevelILOperation N> LowLevelILSSARegisterList GetOutputSSARegisters() const { return As<N>().GetOutputSSARegisters(); }
- template <BNLowLevelILOperation N> LowLevelILInstructionList GetParameterExprs() const { return As<N>().GetParameterExprs(); }
- template <BNLowLevelILOperation N> LowLevelILSSARegisterList GetSourceSSARegisters() const { return As<N>().GetSourceSSARegisters(); }
- template <BNLowLevelILOperation N> LowLevelILSSARegisterStackList GetSourceSSARegisterStacks() const { return As<N>().GetSourceSSARegisterStacks(); }
- template <BNLowLevelILOperation N> LowLevelILSSAFlagList GetSourceSSAFlags() const { return As<N>().GetSourceSSAFlags(); }
- template <BNLowLevelILOperation N> LowLevelILRegisterOrFlagList GetOutputRegisterOrFlagList() const { return As<N>().GetOutputRegisterOrFlagList(); }
- template <BNLowLevelILOperation N> LowLevelILSSARegisterOrFlagList GetOutputSSARegisterOrFlagList() const { return As<N>().GetOutputSSARegisterOrFlagList(); }
- template <BNLowLevelILOperation N> LowLevelILIndexList GetSourceMemoryVersions() const { return As<N>().GetSourceMemoryVersions(); }
- template <BNLowLevelILOperation N> LowLevelILIndexMap GetTargets() const { return As<N>().GetTargets(); }
- template <BNLowLevelILOperation N> _STD_MAP<uint32_t, int32_t> GetRegisterStackAdjustments() const { return As<N>().GetRegisterStackAdjustments(); }
+ template <BNLowLevelILOperation N>
+ LowLevelILInstruction GetSourceExpr() const
+ {
+ return As<N>().GetSourceExpr();
+ }
+ template <BNLowLevelILOperation N>
+ uint32_t GetSourceRegister() const
+ {
+ return As<N>().GetSourceRegister();
+ }
+ template <BNLowLevelILOperation N>
+ uint32_t GetSourceRegisterStack() const
+ {
+ return As<N>().GetSourceRegisterStack();
+ }
+ template <BNLowLevelILOperation N>
+ uint32_t GetSourceFlag() const
+ {
+ return As<N>().GetSourceFlag();
+ }
+ template <BNLowLevelILOperation N>
+ SSARegister GetSourceSSARegister() const
+ {
+ return As<N>().GetSourceSSARegister();
+ }
+ template <BNLowLevelILOperation N>
+ SSARegisterStack GetSourceSSARegisterStack() const
+ {
+ return As<N>().GetSourceSSARegisterStack();
+ }
+ template <BNLowLevelILOperation N>
+ SSAFlag GetSourceSSAFlag() const
+ {
+ return As<N>().GetSourceSSAFlag();
+ }
+ template <BNLowLevelILOperation N>
+ LowLevelILInstruction GetDestExpr() const
+ {
+ return As<N>().GetDestExpr();
+ }
+ template <BNLowLevelILOperation N>
+ uint32_t GetDestRegister() const
+ {
+ return As<N>().GetDestRegister();
+ }
+ template <BNLowLevelILOperation N>
+ uint32_t GetDestRegisterStack() const
+ {
+ return As<N>().GetDestRegisterStack();
+ }
+ template <BNLowLevelILOperation N>
+ uint32_t GetDestFlag() const
+ {
+ return As<N>().GetDestFlag();
+ }
+ template <BNLowLevelILOperation N>
+ SSARegister GetDestSSARegister() const
+ {
+ return As<N>().GetDestSSARegister();
+ }
+ template <BNLowLevelILOperation N>
+ SSARegisterStack GetDestSSARegisterStack() const
+ {
+ return As<N>().GetDestSSARegisterStack();
+ }
+ template <BNLowLevelILOperation N>
+ SSAFlag GetDestSSAFlag() const
+ {
+ return As<N>().GetDestSSAFlag();
+ }
+ template <BNLowLevelILOperation N>
+ uint32_t GetSemanticFlagClass() const
+ {
+ return As<N>().GetSemanticFlagClass();
+ }
+ template <BNLowLevelILOperation N>
+ uint32_t GetSemanticFlagGroup() const
+ {
+ return As<N>().GetSemanticFlagGroup();
+ }
+ template <BNLowLevelILOperation N>
+ uint32_t GetPartialRegister() const
+ {
+ return As<N>().GetPartialRegister();
+ }
+ template <BNLowLevelILOperation N>
+ SSARegister GetStackSSARegister() const
+ {
+ return As<N>().GetStackSSARegister();
+ }
+ template <BNLowLevelILOperation N>
+ SSARegister GetTopSSARegister() const
+ {
+ return As<N>().GetTopSSARegister();
+ }
+ template <BNLowLevelILOperation N>
+ LowLevelILInstruction GetLeftExpr() const
+ {
+ return As<N>().GetLeftExpr();
+ }
+ template <BNLowLevelILOperation N>
+ LowLevelILInstruction GetRightExpr() const
+ {
+ return As<N>().GetRightExpr();
+ }
+ template <BNLowLevelILOperation N>
+ LowLevelILInstruction GetCarryExpr() const
+ {
+ return As<N>().GetCarryExpr();
+ }
+ template <BNLowLevelILOperation N>
+ LowLevelILInstruction GetConditionExpr() const
+ {
+ return As<N>().GetConditionExpr();
+ }
+ template <BNLowLevelILOperation N>
+ uint32_t GetHighRegister() const
+ {
+ return As<N>().GetHighRegister();
+ }
+ template <BNLowLevelILOperation N>
+ SSARegister GetHighSSARegister() const
+ {
+ return As<N>().GetHighSSARegister();
+ }
+ template <BNLowLevelILOperation N>
+ uint32_t GetLowRegister() const
+ {
+ return As<N>().GetLowRegister();
+ }
+ template <BNLowLevelILOperation N>
+ SSARegister GetLowSSARegister() const
+ {
+ return As<N>().GetLowSSARegister();
+ }
+ template <BNLowLevelILOperation N>
+ uint32_t GetIntrinsic() const
+ {
+ return As<N>().GetIntrinsic();
+ }
+ template <BNLowLevelILOperation N>
+ int64_t GetConstant() const
+ {
+ return As<N>().GetConstant();
+ }
+ template <BNLowLevelILOperation N>
+ uint64_t GetOffset() const
+ {
+ return As<N>().GetOffset();
+ }
+ template <BNLowLevelILOperation N>
+ int64_t GetVector() const
+ {
+ return As<N>().GetVector();
+ }
+ template <BNLowLevelILOperation N>
+ int64_t GetStackAdjustment() const
+ {
+ return As<N>().GetStackAdjustment();
+ }
+ template <BNLowLevelILOperation N>
+ size_t GetTarget() const
+ {
+ return As<N>().GetTarget();
+ }
+ template <BNLowLevelILOperation N>
+ size_t GetTrueTarget() const
+ {
+ return As<N>().GetTrueTarget();
+ }
+ template <BNLowLevelILOperation N>
+ size_t GetFalseTarget() const
+ {
+ return As<N>().GetFalseTarget();
+ }
+ template <BNLowLevelILOperation N>
+ size_t GetBitIndex() const
+ {
+ return As<N>().GetBitIndex();
+ }
+ template <BNLowLevelILOperation N>
+ size_t GetSourceMemoryVersion() const
+ {
+ return As<N>().GetSourceMemoryVersion();
+ }
+ template <BNLowLevelILOperation N>
+ size_t GetDestMemoryVersion() const
+ {
+ return As<N>().GetDestMemoryVersion();
+ }
+ template <BNLowLevelILOperation N>
+ BNLowLevelILFlagCondition GetFlagCondition() const
+ {
+ return As<N>().GetFlagCondition();
+ }
+ template <BNLowLevelILOperation N>
+ LowLevelILSSARegisterList GetOutputSSARegisters() const
+ {
+ return As<N>().GetOutputSSARegisters();
+ }
+ template <BNLowLevelILOperation N>
+ LowLevelILInstructionList GetParameterExprs() const
+ {
+ return As<N>().GetParameterExprs();
+ }
+ template <BNLowLevelILOperation N>
+ LowLevelILSSARegisterList GetSourceSSARegisters() const
+ {
+ return As<N>().GetSourceSSARegisters();
+ }
+ template <BNLowLevelILOperation N>
+ LowLevelILSSARegisterStackList GetSourceSSARegisterStacks() const
+ {
+ return As<N>().GetSourceSSARegisterStacks();
+ }
+ template <BNLowLevelILOperation N>
+ LowLevelILSSAFlagList GetSourceSSAFlags() const
+ {
+ return As<N>().GetSourceSSAFlags();
+ }
+ template <BNLowLevelILOperation N>
+ LowLevelILRegisterOrFlagList GetOutputRegisterOrFlagList() const
+ {
+ return As<N>().GetOutputRegisterOrFlagList();
+ }
+ template <BNLowLevelILOperation N>
+ LowLevelILSSARegisterOrFlagList GetOutputSSARegisterOrFlagList() const
+ {
+ return As<N>().GetOutputSSARegisterOrFlagList();
+ }
+ template <BNLowLevelILOperation N>
+ LowLevelILIndexList GetSourceMemoryVersions() const
+ {
+ return As<N>().GetSourceMemoryVersions();
+ }
+ template <BNLowLevelILOperation N>
+ LowLevelILIndexMap GetTargets() const
+ {
+ return As<N>().GetTargets();
+ }
+ template <BNLowLevelILOperation N>
+ _STD_MAP<uint32_t, int32_t> GetRegisterStackAdjustments() const
+ {
+ return As<N>().GetRegisterStackAdjustments();
+ }
- template <BNLowLevelILOperation N> void SetDestSSAVersion(size_t version) { As<N>().SetDestSSAVersion(version); }
- template <BNLowLevelILOperation N> void SetSourceSSAVersion(size_t version) { As<N>().SetSourceSSAVersion(version); }
- template <BNLowLevelILOperation N> void SetHighSSAVersion(size_t version) { As<N>().SetHighSSAVersion(version); }
- template <BNLowLevelILOperation N> void SetLowSSAVersion(size_t version) { As<N>().SetLowSSAVersion(version); }
- template <BNLowLevelILOperation N> void SetStackSSAVersion(size_t version) { As<N>().SetStackSSAVersion(version); }
- template <BNLowLevelILOperation N> void SetTopSSAVersion(size_t version) { As<N>().SetTopSSAVersion(version); }
- template <BNLowLevelILOperation N> void SetDestMemoryVersion(size_t version) { As<N>().SetDestMemoryVersion(version); }
- template <BNLowLevelILOperation N> void SetSourceMemoryVersion(size_t version) { As<N>().SetSourceMemoryVersion(version); }
- template <BNLowLevelILOperation N> void SetOutputSSARegisters(const _STD_VECTOR<SSARegister>& regs) { As<N>().SetOutputSSARegisters(regs); }
- template <BNLowLevelILOperation N> void SetOutputSSARegisterOrFlagList(const _STD_VECTOR<SSARegisterOrFlag>& outputs) { As<N>().SetOutputSSARegisterOrFlagList(outputs); }
+ template <BNLowLevelILOperation N>
+ void SetDestSSAVersion(size_t version)
+ {
+ As<N>().SetDestSSAVersion(version);
+ }
+ template <BNLowLevelILOperation N>
+ void SetSourceSSAVersion(size_t version)
+ {
+ As<N>().SetSourceSSAVersion(version);
+ }
+ template <BNLowLevelILOperation N>
+ void SetHighSSAVersion(size_t version)
+ {
+ As<N>().SetHighSSAVersion(version);
+ }
+ template <BNLowLevelILOperation N>
+ void SetLowSSAVersion(size_t version)
+ {
+ As<N>().SetLowSSAVersion(version);
+ }
+ template <BNLowLevelILOperation N>
+ void SetStackSSAVersion(size_t version)
+ {
+ As<N>().SetStackSSAVersion(version);
+ }
+ template <BNLowLevelILOperation N>
+ void SetTopSSAVersion(size_t version)
+ {
+ As<N>().SetTopSSAVersion(version);
+ }
+ template <BNLowLevelILOperation N>
+ void SetDestMemoryVersion(size_t version)
+ {
+ As<N>().SetDestMemoryVersion(version);
+ }
+ template <BNLowLevelILOperation N>
+ void SetSourceMemoryVersion(size_t version)
+ {
+ As<N>().SetSourceMemoryVersion(version);
+ }
+ template <BNLowLevelILOperation N>
+ void SetOutputSSARegisters(const _STD_VECTOR<SSARegister>& regs)
+ {
+ As<N>().SetOutputSSARegisters(regs);
+ }
+ template <BNLowLevelILOperation N>
+ void SetOutputSSARegisterOrFlagList(const _STD_VECTOR<SSARegisterOrFlag>& outputs)
+ {
+ As<N>().SetOutputSSARegisterOrFlagList(outputs);
+ }
bool GetOperandIndexForUsage(LowLevelILOperandUsage usage, size_t& operandIndex) const;
@@ -849,9 +1116,8 @@ namespace BinaryNinja
LowLevelILOperandType m_type;
size_t m_operandIndex;
- public:
- LowLevelILOperand(const LowLevelILInstruction& instr, LowLevelILOperandUsage usage,
- size_t operandIndex);
+ public:
+ LowLevelILOperand(const LowLevelILInstruction& instr, LowLevelILOperandUsage usage, size_t operandIndex);
LowLevelILOperandType GetType() const { return m_type; }
LowLevelILOperandUsage GetUsage() const { return m_usage; }
@@ -889,7 +1155,11 @@ namespace BinaryNinja
bool operator==(const ListIterator& a) const { return pos == a.pos; }
bool operator!=(const ListIterator& a) const { return pos != a.pos; }
bool operator<(const ListIterator& a) const { return pos < a.pos; }
- ListIterator& operator++() { ++pos; return *this; }
+ ListIterator& operator++()
+ {
+ ++pos;
+ return *this;
+ }
const LowLevelILOperand operator*();
};
@@ -897,12 +1167,11 @@ namespace BinaryNinja
const _STD_VECTOR<LowLevelILOperandUsage>& m_usageList;
const _STD_UNORDERED_MAP<LowLevelILOperandUsage, size_t>& m_operandIndexMap;
- public:
+ public:
typedef ListIterator const_iterator;
- LowLevelILOperandList(const LowLevelILInstruction& instr,
- const _STD_VECTOR<LowLevelILOperandUsage>& usageList,
- const _STD_UNORDERED_MAP<LowLevelILOperandUsage, size_t>& operandIndexMap);
+ LowLevelILOperandList(const LowLevelILInstruction& instr, const _STD_VECTOR<LowLevelILOperandUsage>& usageList,
+ const _STD_UNORDERED_MAP<LowLevelILOperandUsage, size_t>& operandIndexMap);
const_iterator begin() const;
const_iterator end() const;
@@ -912,28 +1181,28 @@ namespace BinaryNinja
operator _STD_VECTOR<LowLevelILOperand>() const;
};
- struct LowLevelILConstantInstruction: public LowLevelILInstructionBase
+ struct LowLevelILConstantInstruction : public LowLevelILInstructionBase
{
int64_t GetConstant() const { return GetRawOperandAsInteger(0); }
};
- struct LowLevelILOffsetInstruction: public LowLevelILInstructionBase
+ struct LowLevelILOffsetInstruction : public LowLevelILInstructionBase
{
int64_t GetOffset() const { return GetRawOperandAsInteger(1); }
};
- struct LowLevelILOneOperandInstruction: public LowLevelILInstructionBase
+ struct LowLevelILOneOperandInstruction : public LowLevelILInstructionBase
{
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(0); }
};
- struct LowLevelILTwoOperandInstruction: public LowLevelILInstructionBase
+ struct LowLevelILTwoOperandInstruction : public LowLevelILInstructionBase
{
LowLevelILInstruction GetLeftExpr() const { return GetRawOperandAsExpr(0); }
LowLevelILInstruction GetRightExpr() const { return GetRawOperandAsExpr(1); }
};
- struct LowLevelILTwoOperandWithCarryInstruction: public LowLevelILInstructionBase
+ struct LowLevelILTwoOperandWithCarryInstruction : public LowLevelILInstructionBase
{
LowLevelILInstruction GetLeftExpr() const { return GetRawOperandAsExpr(0); }
LowLevelILInstruction GetRightExpr() const { return GetRawOperandAsExpr(1); }
@@ -943,31 +1212,36 @@ namespace BinaryNinja
// Implementations of each instruction to fetch the correct operand value for the valid operands, these
// are derived from LowLevelILInstructionBase so that invalid operand accessor functions will generate
// a compiler error.
- template <> struct LowLevelILInstructionAccessor<LLIL_SET_REG>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SET_REG> : public LowLevelILInstructionBase
{
uint32_t GetDestRegister() const { return GetRawOperandAsRegister(0); }
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(1); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_SET_REG_SPLIT>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SET_REG_SPLIT> : public LowLevelILInstructionBase
{
uint32_t GetHighRegister() const { return GetRawOperandAsRegister(0); }
uint32_t GetLowRegister() const { return GetRawOperandAsRegister(1); }
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(2); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_SET_REG_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SET_REG_SSA> : public LowLevelILInstructionBase
{
SSARegister GetDestSSARegister() const { return GetRawOperandAsSSARegister(0); }
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(2); }
void SetDestSSAVersion(size_t version) { UpdateRawOperand(1, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_SET_REG_SSA_PARTIAL>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SET_REG_SSA_PARTIAL> : public LowLevelILInstructionBase
{
SSARegister GetDestSSARegister() const { return GetRawOperandAsSSARegister(0); }
uint32_t GetPartialRegister() const { return GetRawOperandAsRegister(2); }
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(3); }
void SetDestSSAVersion(size_t version) { UpdateRawOperand(1, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_SET_REG_SPLIT_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SET_REG_SPLIT_SSA> : public LowLevelILInstructionBase
{
SSARegister GetHighSSARegister() const { return GetRawOperandAsExpr(0).GetRawOperandAsSSARegister(0); }
SSARegister GetLowSSARegister() const { return GetRawOperandAsExpr(1).GetRawOperandAsSSARegister(0); }
@@ -975,21 +1249,30 @@ namespace BinaryNinja
void SetHighSSAVersion(size_t version) { GetRawOperandAsExpr(0).UpdateRawOperand(1, version); }
void SetLowSSAVersion(size_t version) { GetRawOperandAsExpr(1).UpdateRawOperand(1, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_SET_REG_STACK_REL>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SET_REG_STACK_REL> : public LowLevelILInstructionBase
{
uint32_t GetDestRegisterStack() const { return GetRawOperandAsRegister(0); }
LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(1); }
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(2); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_STACK_PUSH>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_STACK_PUSH> : public LowLevelILInstructionBase
{
uint32_t GetDestRegisterStack() const { return GetRawOperandAsRegister(0); }
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(1); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_SET_REG_STACK_REL_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SET_REG_STACK_REL_SSA> : public LowLevelILInstructionBase
{
- SSARegisterStack GetDestSSARegisterStack() const { return GetRawOperandAsExpr(0).GetRawOperandAsSSARegisterStack(0); }
- SSARegisterStack GetSourceSSARegisterStack() const { return GetRawOperandAsExpr(0).GetRawOperandAsPartialSSARegisterStackSource(0); }
+ SSARegisterStack GetDestSSARegisterStack() const
+ {
+ return GetRawOperandAsExpr(0).GetRawOperandAsSSARegisterStack(0);
+ }
+ SSARegisterStack GetSourceSSARegisterStack() const
+ {
+ return GetRawOperandAsExpr(0).GetRawOperandAsPartialSSARegisterStackSource(0);
+ }
LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(1); }
SSARegister GetTopSSARegister() const { return GetRawOperandAsExpr(2).GetRawOperandAsSSARegister(0); }
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(3); }
@@ -997,41 +1280,55 @@ namespace BinaryNinja
void SetSourceSSAVersion(size_t version) { GetRawOperandAsExpr(0).UpdateRawOperand(2, version); }
void SetTopSSAVersion(size_t version) { GetRawOperandAsExpr(2).UpdateRawOperand(1, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_SET_REG_STACK_ABS_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SET_REG_STACK_ABS_SSA> : public LowLevelILInstructionBase
{
- SSARegisterStack GetDestSSARegisterStack() const { return GetRawOperandAsExpr(0).GetRawOperandAsSSARegisterStack(0); }
- SSARegisterStack GetSourceSSARegisterStack() const { return GetRawOperandAsExpr(0).GetRawOperandAsPartialSSARegisterStackSource(0); }
+ SSARegisterStack GetDestSSARegisterStack() const
+ {
+ return GetRawOperandAsExpr(0).GetRawOperandAsSSARegisterStack(0);
+ }
+ SSARegisterStack GetSourceSSARegisterStack() const
+ {
+ return GetRawOperandAsExpr(0).GetRawOperandAsPartialSSARegisterStackSource(0);
+ }
uint32_t GetDestRegister() const { return GetRawOperandAsRegister(1); }
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(2); }
void SetDestSSAVersion(size_t version) { GetRawOperandAsExpr(0).UpdateRawOperand(1, version); }
void SetSourceSSAVersion(size_t version) { GetRawOperandAsExpr(0).UpdateRawOperand(2, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_SET_FLAG>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SET_FLAG> : public LowLevelILInstructionBase
{
uint32_t GetDestFlag() const { return GetRawOperandAsRegister(0); }
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(1); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_SET_FLAG_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SET_FLAG_SSA> : public LowLevelILInstructionBase
{
SSAFlag GetDestSSAFlag() const { return GetRawOperandAsSSAFlag(0); }
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(2); }
void SetDestSSAVersion(size_t version) { UpdateRawOperand(1, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_LOAD>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_LOAD_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_LOAD> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_LOAD_SSA> : public LowLevelILInstructionBase
{
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(0); }
size_t GetSourceMemoryVersion() const { return GetRawOperandAsIndex(1); }
void SetSourceMemoryVersion(size_t version) { UpdateRawOperand(1, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_STORE>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_STORE> : public LowLevelILInstructionBase
{
LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(0); }
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(1); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_STORE_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_STORE_SSA> : public LowLevelILInstructionBase
{
LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(0); }
size_t GetDestMemoryVersion() const { return GetRawOperandAsIndex(1); }
@@ -1041,40 +1338,48 @@ namespace BinaryNinja
void SetSourceMemoryVersion(size_t version) { UpdateRawOperand(2, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG> : public LowLevelILInstructionBase
{
uint32_t GetSourceRegister() const { return GetRawOperandAsRegister(0); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_SSA> : public LowLevelILInstructionBase
{
SSARegister GetSourceSSARegister() const { return GetRawOperandAsSSARegister(0); }
void SetSourceSSAVersion(size_t version) { UpdateRawOperand(1, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_SSA_PARTIAL>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_SSA_PARTIAL> : public LowLevelILInstructionBase
{
SSARegister GetSourceSSARegister() const { return GetRawOperandAsSSARegister(0); }
uint32_t GetPartialRegister() const { return GetRawOperandAsRegister(2); }
void SetSourceSSAVersion(size_t version) { UpdateRawOperand(1, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_STACK_REL>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_STACK_REL> : public LowLevelILInstructionBase
{
uint32_t GetSourceRegisterStack() const { return GetRawOperandAsRegister(0); }
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(1); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_STACK_POP>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_STACK_POP> : public LowLevelILInstructionBase
{
uint32_t GetSourceRegisterStack() const { return GetRawOperandAsRegister(0); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_STACK_FREE_REG>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_STACK_FREE_REG> : public LowLevelILInstructionBase
{
uint32_t GetDestRegister() const { return GetRawOperandAsRegister(0); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_STACK_FREE_REL>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_STACK_FREE_REL> : public LowLevelILInstructionBase
{
uint32_t GetDestRegisterStack() const { return GetRawOperandAsRegister(0); }
LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(1); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_STACK_REL_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_STACK_REL_SSA> : public LowLevelILInstructionBase
{
SSARegisterStack GetSourceSSARegisterStack() const { return GetRawOperandAsSSARegisterStack(0); }
LowLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(2); }
@@ -1082,57 +1387,78 @@ namespace BinaryNinja
void SetSourceSSAVersion(size_t version) { UpdateRawOperand(1, version); }
void SetTopSSAVersion(size_t version) { GetRawOperandAsExpr(3).UpdateRawOperand(1, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_STACK_ABS_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_STACK_ABS_SSA> : public LowLevelILInstructionBase
{
SSARegisterStack GetSourceSSARegisterStack() const { return GetRawOperandAsSSARegisterStack(0); }
uint32_t GetSourceRegister() const { return GetRawOperandAsRegister(2); }
void SetSourceSSAVersion(size_t version) { UpdateRawOperand(1, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_STACK_FREE_REL_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_STACK_FREE_REL_SSA> : public LowLevelILInstructionBase
{
- SSARegisterStack GetDestSSARegisterStack() const { return GetRawOperandAsExpr(0).GetRawOperandAsSSARegisterStack(0); }
- SSARegisterStack GetSourceSSARegisterStack() const { return GetRawOperandAsExpr(0).GetRawOperandAsPartialSSARegisterStackSource(0); }
+ SSARegisterStack GetDestSSARegisterStack() const
+ {
+ return GetRawOperandAsExpr(0).GetRawOperandAsSSARegisterStack(0);
+ }
+ SSARegisterStack GetSourceSSARegisterStack() const
+ {
+ return GetRawOperandAsExpr(0).GetRawOperandAsPartialSSARegisterStackSource(0);
+ }
LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(1); }
SSARegister GetTopSSARegister() const { return GetRawOperandAsExpr(2).GetRawOperandAsSSARegister(0); }
void SetDestSSAVersion(size_t version) { GetRawOperandAsExpr(0).UpdateRawOperand(1, version); }
void SetSourceSSAVersion(size_t version) { GetRawOperandAsExpr(0).UpdateRawOperand(2, version); }
void SetTopSSAVersion(size_t version) { GetRawOperandAsExpr(2).UpdateRawOperand(1, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_STACK_FREE_ABS_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_STACK_FREE_ABS_SSA> : public LowLevelILInstructionBase
{
- SSARegisterStack GetDestSSARegisterStack() const { return GetRawOperandAsExpr(0).GetRawOperandAsSSARegisterStack(0); }
- SSARegisterStack GetSourceSSARegisterStack() const { return GetRawOperandAsExpr(0).GetRawOperandAsPartialSSARegisterStackSource(0); }
+ SSARegisterStack GetDestSSARegisterStack() const
+ {
+ return GetRawOperandAsExpr(0).GetRawOperandAsSSARegisterStack(0);
+ }
+ SSARegisterStack GetSourceSSARegisterStack() const
+ {
+ return GetRawOperandAsExpr(0).GetRawOperandAsPartialSSARegisterStackSource(0);
+ }
uint32_t GetDestRegister() const { return GetRawOperandAsRegister(1); }
void SetDestSSAVersion(size_t version) { GetRawOperandAsExpr(0).UpdateRawOperand(1, version); }
void SetSourceSSAVersion(size_t version) { GetRawOperandAsExpr(0).UpdateRawOperand(2, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_FLAG>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FLAG> : public LowLevelILInstructionBase
{
uint32_t GetSourceFlag() const { return GetRawOperandAsRegister(0); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_FLAG_BIT>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FLAG_BIT> : public LowLevelILInstructionBase
{
uint32_t GetSourceFlag() const { return GetRawOperandAsRegister(0); }
size_t GetBitIndex() const { return GetRawOperandAsIndex(1); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_FLAG_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FLAG_SSA> : public LowLevelILInstructionBase
{
SSAFlag GetSourceSSAFlag() const { return GetRawOperandAsSSAFlag(0); }
void SetSourceSSAVersion(size_t version) { UpdateRawOperand(1, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_FLAG_BIT_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FLAG_BIT_SSA> : public LowLevelILInstructionBase
{
SSAFlag GetSourceSSAFlag() const { return GetRawOperandAsSSAFlag(0); }
size_t GetBitIndex() const { return GetRawOperandAsIndex(2); }
void SetSourceSSAVersion(size_t version) { UpdateRawOperand(1, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_SPLIT>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_SPLIT> : public LowLevelILInstructionBase
{
uint32_t GetHighRegister() const { return GetRawOperandAsRegister(0); }
uint32_t GetLowRegister() const { return GetRawOperandAsRegister(1); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_SPLIT_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_SPLIT_SSA> : public LowLevelILInstructionBase
{
SSARegister GetHighSSARegister() const { return GetRawOperandAsSSARegister(0); }
SSARegister GetLowSSARegister() const { return GetRawOperandAsSSARegister(2); }
@@ -1140,224 +1466,447 @@ namespace BinaryNinja
void SetLowSSAVersion(size_t version) { UpdateRawOperand(3, version); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_JUMP>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_JUMP> : public LowLevelILInstructionBase
{
LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(0); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_JUMP_TO>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_JUMP_TO> : public LowLevelILInstructionBase
{
LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(0); }
LowLevelILIndexMap GetTargets() const { return GetRawOperandAsIndexMap(1); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_CALL>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CALL> : public LowLevelILInstructionBase
{
LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(0); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_CALL_STACK_ADJUST>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CALL_STACK_ADJUST> : public LowLevelILInstructionBase
{
LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(0); }
int64_t GetStackAdjustment() const { return GetRawOperandAsInteger(1); }
- _STD_MAP<uint32_t, int32_t> GetRegisterStackAdjustments() const { return GetRawOperandAsRegisterStackAdjustments(2); }
+ _STD_MAP<uint32_t, int32_t> GetRegisterStackAdjustments() const
+ {
+ return GetRawOperandAsRegisterStackAdjustments(2);
+ }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_TAILCALL>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_TAILCALL> : public LowLevelILInstructionBase
{
LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(0); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_RET>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_RET> : public LowLevelILInstructionBase
{
LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(0); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_IF>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_IF> : public LowLevelILInstructionBase
{
LowLevelILInstruction GetConditionExpr() const { return GetRawOperandAsExpr(0); }
size_t GetTrueTarget() const { return GetRawOperandAsIndex(1); }
size_t GetFalseTarget() const { return GetRawOperandAsIndex(2); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_GOTO>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_GOTO> : public LowLevelILInstructionBase
{
size_t GetTarget() const { return GetRawOperandAsIndex(0); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_FLAG_COND>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FLAG_COND> : public LowLevelILInstructionBase
{
BNLowLevelILFlagCondition GetFlagCondition() const { return GetRawOperandAsFlagCondition(0); }
uint32_t GetSemanticFlagClass() const { return GetRawOperandAsRegister(1); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_FLAG_GROUP>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FLAG_GROUP> : public LowLevelILInstructionBase
{
uint32_t GetSemanticFlagGroup() const { return GetRawOperandAsRegister(0); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_TRAP>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_TRAP> : public LowLevelILInstructionBase
{
int64_t GetVector() const { return GetRawOperandAsInteger(0); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_CALL_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CALL_SSA> : public LowLevelILInstructionBase
{
- LowLevelILSSARegisterList GetOutputSSARegisters() const { return GetRawOperandAsExpr(0).GetRawOperandAsSSARegisterList(1); }
+ LowLevelILSSARegisterList GetOutputSSARegisters() const
+ {
+ return GetRawOperandAsExpr(0).GetRawOperandAsSSARegisterList(1);
+ }
size_t GetDestMemoryVersion() const { return GetRawOperandAsExpr(0).GetRawOperandAsIndex(0); }
LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(1); }
SSARegister GetStackSSARegister() const { return GetRawOperandAsExpr(2).GetRawOperandAsSSARegister(0); }
size_t GetSourceMemoryVersion() const { return GetRawOperandAsExpr(2).GetRawOperandAsIndex(2); }
- LowLevelILInstructionList GetParameterExprs() const { return GetRawOperandAsExpr(3).GetRawOperandAsExprList(0); }
+ LowLevelILInstructionList GetParameterExprs() const
+ {
+ return GetRawOperandAsExpr(3).GetRawOperandAsExprList(0);
+ }
void SetDestMemoryVersion(size_t version) { GetRawOperandAsExpr(0).UpdateRawOperand(0, version); }
void SetSourceMemoryVersion(size_t version) { GetRawOperandAsExpr(2).UpdateRawOperand(2, version); }
void SetStackSSAVersion(size_t version) { GetRawOperandAsExpr(2).UpdateRawOperand(1, version); }
- void SetOutputSSARegisters(const _STD_VECTOR<SSARegister>& regs) { GetRawOperandAsExpr(0).UpdateRawOperandAsSSARegisterList(1, regs); }
+ void SetOutputSSARegisters(const _STD_VECTOR<SSARegister>& regs)
+ {
+ GetRawOperandAsExpr(0).UpdateRawOperandAsSSARegisterList(1, regs);
+ }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_SYSCALL_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SYSCALL_SSA> : public LowLevelILInstructionBase
{
- LowLevelILSSARegisterList GetOutputSSARegisters() const { return GetRawOperandAsExpr(0).GetRawOperandAsSSARegisterList(1); }
+ LowLevelILSSARegisterList GetOutputSSARegisters() const
+ {
+ return GetRawOperandAsExpr(0).GetRawOperandAsSSARegisterList(1);
+ }
size_t GetDestMemoryVersion() const { return GetRawOperandAsExpr(0).GetRawOperandAsIndex(0); }
SSARegister GetStackSSARegister() const { return GetRawOperandAsExpr(1).GetRawOperandAsSSARegister(0); }
size_t GetSourceMemoryVersion() const { return GetRawOperandAsExpr(1).GetRawOperandAsIndex(2); }
- LowLevelILInstructionList GetParameterExprs() const { return GetRawOperandAsExpr(2).GetRawOperandAsExprList(0); }
+ LowLevelILInstructionList GetParameterExprs() const
+ {
+ return GetRawOperandAsExpr(2).GetRawOperandAsExprList(0);
+ }
void SetDestMemoryVersion(size_t version) { GetRawOperandAsExpr(0).UpdateRawOperand(0, version); }
void SetSourceMemoryVersion(size_t version) { GetRawOperandAsExpr(1).UpdateRawOperand(2, version); }
void SetStackSSAVersion(size_t version) { GetRawOperandAsExpr(1).UpdateRawOperand(1, version); }
- void SetOutputSSARegisters(const _STD_VECTOR<SSARegister>& regs) { GetRawOperandAsExpr(0).UpdateRawOperandAsSSARegisterList(1, regs); }
+ void SetOutputSSARegisters(const _STD_VECTOR<SSARegister>& regs)
+ {
+ GetRawOperandAsExpr(0).UpdateRawOperandAsSSARegisterList(1, regs);
+ }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_TAILCALL_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_TAILCALL_SSA> : public LowLevelILInstructionBase
{
- LowLevelILSSARegisterList GetOutputSSARegisters() const { return GetRawOperandAsExpr(0).GetRawOperandAsSSARegisterList(1); }
+ LowLevelILSSARegisterList GetOutputSSARegisters() const
+ {
+ return GetRawOperandAsExpr(0).GetRawOperandAsSSARegisterList(1);
+ }
size_t GetDestMemoryVersion() const { return GetRawOperandAsExpr(0).GetRawOperandAsIndex(0); }
LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(1); }
SSARegister GetStackSSARegister() const { return GetRawOperandAsExpr(2).GetRawOperandAsSSARegister(0); }
size_t GetSourceMemoryVersion() const { return GetRawOperandAsExpr(2).GetRawOperandAsIndex(2); }
- LowLevelILInstructionList GetParameterExprs() const { return GetRawOperandAsExpr(3).GetRawOperandAsExprList(0); }
+ LowLevelILInstructionList GetParameterExprs() const
+ {
+ return GetRawOperandAsExpr(3).GetRawOperandAsExprList(0);
+ }
void SetDestMemoryVersion(size_t version) { GetRawOperandAsExpr(0).UpdateRawOperand(0, version); }
void SetSourceMemoryVersion(size_t version) { GetRawOperandAsExpr(2).UpdateRawOperand(2, version); }
void SetStackSSAVersion(size_t version) { GetRawOperandAsExpr(2).UpdateRawOperand(1, version); }
- void SetOutputSSARegisters(const _STD_VECTOR<SSARegister>& regs) { GetRawOperandAsExpr(0).UpdateRawOperandAsSSARegisterList(1, regs); }
+ void SetOutputSSARegisters(const _STD_VECTOR<SSARegister>& regs)
+ {
+ GetRawOperandAsExpr(0).UpdateRawOperandAsSSARegisterList(1, regs);
+ }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_INTRINSIC>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_INTRINSIC> : public LowLevelILInstructionBase
{
- LowLevelILRegisterOrFlagList GetOutputRegisterOrFlagList() const { return GetRawOperandAsRegisterOrFlagList(0); }
+ LowLevelILRegisterOrFlagList GetOutputRegisterOrFlagList() const
+ {
+ return GetRawOperandAsRegisterOrFlagList(0);
+ }
uint32_t GetIntrinsic() const { return GetRawOperandAsRegister(2); }
- LowLevelILInstructionList GetParameterExprs() const { return GetRawOperandAsExpr(3).GetRawOperandAsExprList(0); }
+ LowLevelILInstructionList GetParameterExprs() const
+ {
+ return GetRawOperandAsExpr(3).GetRawOperandAsExprList(0);
+ }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_INTRINSIC_SSA>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_INTRINSIC_SSA> : public LowLevelILInstructionBase
{
- LowLevelILSSARegisterOrFlagList GetOutputSSARegisterOrFlagList() const { return GetRawOperandAsSSARegisterOrFlagList(0); }
+ LowLevelILSSARegisterOrFlagList GetOutputSSARegisterOrFlagList() const
+ {
+ return GetRawOperandAsSSARegisterOrFlagList(0);
+ }
uint32_t GetIntrinsic() const { return GetRawOperandAsRegister(2); }
- LowLevelILInstructionList GetParameterExprs() const { return GetRawOperandAsExpr(3).GetRawOperandAsExprList(0); }
- void SetOutputSSARegisterOrFlagList(const _STD_VECTOR<SSARegisterOrFlag>& outputs) { UpdateRawOperandAsSSARegisterOrFlagList(0, outputs); }
+ LowLevelILInstructionList GetParameterExprs() const
+ {
+ return GetRawOperandAsExpr(3).GetRawOperandAsExprList(0);
+ }
+ void SetOutputSSARegisterOrFlagList(const _STD_VECTOR<SSARegisterOrFlag>& outputs)
+ {
+ UpdateRawOperandAsSSARegisterOrFlagList(0, outputs);
+ }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_PHI>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_PHI> : public LowLevelILInstructionBase
{
SSARegister GetDestSSARegister() const { return GetRawOperandAsSSARegister(0); }
LowLevelILSSARegisterList GetSourceSSARegisters() const { return GetRawOperandAsSSARegisterList(2); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_REG_STACK_PHI>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_REG_STACK_PHI> : public LowLevelILInstructionBase
{
SSARegisterStack GetDestSSARegisterStack() const { return GetRawOperandAsSSARegisterStack(0); }
- LowLevelILSSARegisterStackList GetSourceSSARegisterStacks() const { return GetRawOperandAsSSARegisterStackList(2); }
+ LowLevelILSSARegisterStackList GetSourceSSARegisterStacks() const
+ {
+ return GetRawOperandAsSSARegisterStackList(2);
+ }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_FLAG_PHI>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FLAG_PHI> : public LowLevelILInstructionBase
{
SSAFlag GetDestSSAFlag() const { return GetRawOperandAsSSAFlag(0); }
LowLevelILSSAFlagList GetSourceSSAFlags() const { return GetRawOperandAsSSAFlagList(2); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_MEM_PHI>: public LowLevelILInstructionBase
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_MEM_PHI> : public LowLevelILInstructionBase
{
size_t GetDestMemoryVersion() const { return GetRawOperandAsIndex(0); }
LowLevelILIndexList GetSourceMemoryVersions() const { return GetRawOperandAsIndexList(1); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_EXTERN_PTR>: public LowLevelILConstantInstruction
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_EXTERN_PTR> : public LowLevelILConstantInstruction
{
size_t GetConstant() const { return GetRawOperandAsIndex(0); }
size_t GetOffset() const { return GetRawOperandAsIndex(1); }
};
- template <> struct LowLevelILInstructionAccessor<LLIL_NOP>: public LowLevelILInstructionBase {};
- template <> struct LowLevelILInstructionAccessor<LLIL_POP>: public LowLevelILInstructionBase {};
- template <> struct LowLevelILInstructionAccessor<LLIL_NORET>: public LowLevelILInstructionBase {};
- template <> struct LowLevelILInstructionAccessor<LLIL_SYSCALL>: public LowLevelILInstructionBase {};
- template <> struct LowLevelILInstructionAccessor<LLIL_BP>: public LowLevelILInstructionBase {};
- template <> struct LowLevelILInstructionAccessor<LLIL_UNDEF>: public LowLevelILInstructionBase {};
- template <> struct LowLevelILInstructionAccessor<LLIL_UNIMPL>: public LowLevelILInstructionBase {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_NOP> : public LowLevelILInstructionBase
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_POP> : public LowLevelILInstructionBase
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_NORET> : public LowLevelILInstructionBase
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SYSCALL> : public LowLevelILInstructionBase
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_BP> : public LowLevelILInstructionBase
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_UNDEF> : public LowLevelILInstructionBase
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_UNIMPL> : public LowLevelILInstructionBase
+ {};
- template <> struct LowLevelILInstructionAccessor<LLIL_CONST>: public LowLevelILConstantInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_CONST_PTR>: public LowLevelILConstantInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FLOAT_CONST>: public LowLevelILConstantInstruction {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CONST> : public LowLevelILConstantInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CONST_PTR> : public LowLevelILConstantInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FLOAT_CONST> : public LowLevelILConstantInstruction
+ {};
- template <> struct LowLevelILInstructionAccessor<LLIL_ADD>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_SUB>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_AND>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_OR>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_XOR>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_LSL>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_LSR>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_ASR>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_ROL>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_ROR>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_MUL>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_MULU_DP>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_MULS_DP>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_DIVU>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_DIVS>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_MODU>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_MODS>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_DIVU_DP>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_DIVS_DP>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_MODU_DP>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_MODS_DP>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_CMP_E>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_CMP_NE>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_CMP_SLT>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_CMP_ULT>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_CMP_SLE>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_CMP_ULE>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_CMP_SGE>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_CMP_UGE>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_CMP_SGT>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_CMP_UGT>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_TEST_BIT>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_ADD_OVERFLOW>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FADD>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FSUB>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FMUL>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FDIV>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FCMP_E>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FCMP_NE>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FCMP_LT>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FCMP_LE>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FCMP_GE>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FCMP_GT>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FCMP_O>: public LowLevelILTwoOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FCMP_UO>: public LowLevelILTwoOperandInstruction {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_ADD> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SUB> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_AND> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_OR> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_XOR> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_LSL> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_LSR> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_ASR> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_ROL> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_ROR> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_MUL> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_MULU_DP> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_MULS_DP> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_DIVU> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_DIVS> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_MODU> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_MODS> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_DIVU_DP> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_DIVS_DP> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_MODU_DP> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_MODS_DP> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CMP_E> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CMP_NE> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CMP_SLT> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CMP_ULT> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CMP_SLE> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CMP_ULE> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CMP_SGE> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CMP_UGE> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CMP_SGT> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CMP_UGT> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_TEST_BIT> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_ADD_OVERFLOW> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FADD> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FSUB> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FMUL> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FDIV> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FCMP_E> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FCMP_NE> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FCMP_LT> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FCMP_LE> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FCMP_GE> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FCMP_GT> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FCMP_O> : public LowLevelILTwoOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FCMP_UO> : public LowLevelILTwoOperandInstruction
+ {};
- template <> struct LowLevelILInstructionAccessor<LLIL_ADC>: public LowLevelILTwoOperandWithCarryInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_SBB>: public LowLevelILTwoOperandWithCarryInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_RLC>: public LowLevelILTwoOperandWithCarryInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_RRC>: public LowLevelILTwoOperandWithCarryInstruction {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_ADC> : public LowLevelILTwoOperandWithCarryInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SBB> : public LowLevelILTwoOperandWithCarryInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_RLC> : public LowLevelILTwoOperandWithCarryInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_RRC> : public LowLevelILTwoOperandWithCarryInstruction
+ {};
- template <> struct LowLevelILInstructionAccessor<LLIL_PUSH>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_NEG>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_NOT>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_SX>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_ZX>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_LOW_PART>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_BOOL_TO_INT>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_UNIMPL_MEM>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FSQRT>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FNEG>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FABS>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FLOAT_TO_INT>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_INT_TO_FLOAT>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FLOAT_CONV>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_ROUND_TO_INT>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FLOOR>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_CEIL>: public LowLevelILOneOperandInstruction {};
- template <> struct LowLevelILInstructionAccessor<LLIL_FTRUNC>: public LowLevelILOneOperandInstruction {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_PUSH> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_NEG> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_NOT> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_SX> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_ZX> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_LOW_PART> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_BOOL_TO_INT> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_UNIMPL_MEM> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FSQRT> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FNEG> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FABS> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FLOAT_TO_INT> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_INT_TO_FLOAT> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FLOAT_CONV> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_ROUND_TO_INT> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FLOOR> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_CEIL> : public LowLevelILOneOperandInstruction
+ {};
+ template <>
+ struct LowLevelILInstructionAccessor<LLIL_FTRUNC> : public LowLevelILOneOperandInstruction
+ {};
#undef _STD_VECTOR
#undef _STD_SET
#undef _STD_UNORDERED_MAP
#undef _STD_MAP
-}
+} // namespace BinaryNinjaCore