summaryrefslogtreecommitdiff
path: root/highlevelilinstruction.h
diff options
context:
space:
mode:
Diffstat (limited to 'highlevelilinstruction.h')
-rw-r--r--highlevelilinstruction.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/highlevelilinstruction.h b/highlevelilinstruction.h
index f962226e..056cd211 100644
--- a/highlevelilinstruction.h
+++ b/highlevelilinstruction.h
@@ -349,6 +349,7 @@ namespace BinaryNinja
HighLevelILInstructionList GetRawOperandAsExprList(size_t operand) const;
HighLevelILSSAVariableList GetRawOperandAsSSAVariableList(size_t operand) const;
HighLevelILIndexList GetRawOperandAsIndexList(size_t operand) const;
+ PossibleValueSet GetRawOperandAsPossibleValueSet(size_t operand) const;
void UpdateRawOperand(size_t operandIndex, ExprId value);
void UpdateRawOperandAsInteger(size_t operandIndex, uint64_t value);
@@ -652,6 +653,11 @@ namespace BinaryNinja
{
return As<N>().GetDestMemoryVersion();
}
+ template <BNHighLevelILOperation N>
+ PossibleValueSet GetConstraint() const
+ {
+ return As<N>().GetConstraint();
+ }
template <BNHighLevelILOperation N>
void SetSSAVersion(size_t version)
@@ -1031,6 +1037,34 @@ namespace BinaryNinja
};
template <>
+ struct HighLevelILInstructionAccessor<HLIL_FORCE_VER> : public HighLevelILInstructionBase
+ {
+ Variable GetDestVariable() const { return GetRawOperandAsVariable(0); }
+ Variable GetVariable() const { return GetRawOperandAsVariable(1); }
+ };
+ template <>
+ struct HighLevelILInstructionAccessor<HLIL_FORCE_VER_SSA> : public HighLevelILInstructionBase
+ {
+ SSAVariable GetDestSSAVariable() const { return GetRawOperandAsSSAVariable(0); }
+ void SetDestSSAVersion(size_t version) { UpdateRawOperand(1, version); }
+ SSAVariable GetSSAVariable() const { return GetRawOperandAsSSAVariable(2); }
+ void SetSSAVersion(size_t version) { UpdateRawOperand(3, version); }
+ };
+ template <>
+ struct HighLevelILInstructionAccessor<HLIL_ASSERT> : public HighLevelILInstructionBase
+ {
+ Variable GetVariable() const { return GetRawOperandAsVariable(0); }
+ PossibleValueSet GetConstraint() const { return GetRawOperandAsPossibleValueSet(1); }
+ };
+ template <>
+ struct HighLevelILInstructionAccessor<HLIL_ASSERT_SSA> : public HighLevelILInstructionBase
+ {
+ SSAVariable GetSSAVariable() const { return GetRawOperandAsSSAVariable(0); }
+ void SetSSAVersion(size_t version) { UpdateRawOperand(1, version); }
+ PossibleValueSet GetConstraint() const { return GetRawOperandAsPossibleValueSet(2); }
+ };
+
+ template <>
struct HighLevelILInstructionAccessor<HLIL_STRUCT_FIELD> : public HighLevelILInstructionBase
{
HighLevelILInstruction GetSourceExpr() const { return GetRawOperandAsExpr(0); }