summaryrefslogtreecommitdiff
path: root/highlevelilinstruction.h
diff options
context:
space:
mode:
authorRyan Snyder <ryan@vector35.com>2025-01-24 17:57:26 -0500
committerRyan Snyder <ryan@vector35.com>2025-02-14 15:58:56 -0500
commitbcdc0d9b89605936a1cb6cf3ffaaece60d3c5777 (patch)
tree7286bd0963a49d9b90ddccf3a4b70b71c08e6ce5 /highlevelilinstruction.h
parent071811547bded7cf570125a03bb12d0b7c56a5ac (diff)
uidf refactor
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); }