summaryrefslogtreecommitdiff
path: root/mediumlevelilinstruction.h
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2024-03-02 14:38:47 -0500
committerBrian Potchik <brian@vector35.com>2024-03-02 14:38:47 -0500
commit2e3b9c925390cc8b1d72a41d0564bb2862d3dba2 (patch)
treef40495cd494b8c157a0298259019873a624dc7e2 /mediumlevelilinstruction.h
parentff2aa7435c3847f6969364f5d04d0943918429be (diff)
Add support for memory intrinsics.
Diffstat (limited to 'mediumlevelilinstruction.h')
-rw-r--r--mediumlevelilinstruction.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/mediumlevelilinstruction.h b/mediumlevelilinstruction.h
index 9c893c0b..861bf395 100644
--- a/mediumlevelilinstruction.h
+++ b/mediumlevelilinstruction.h
@@ -1422,6 +1422,18 @@ namespace BinaryNinja
MediumLevelILInstructionList GetParameterExprs() const { return GetRawOperandAsExprList(3); }
void SetOutputSSAVariables(const _STD_VECTOR<SSAVariable>& vars) { UpdateRawOperandAsSSAVariableList(0, vars); }
};
+ template <>
+ struct MediumLevelILInstructionAccessor<MLIL_MEMORY_INTRINSIC_SSA> : public MediumLevelILInstructionBase
+ {
+ MediumLevelILSSAVariableList GetOutputSSAVariables() const { return GetRawOperandAsExpr(0).GetRawOperandAsSSAVariableList(1); }
+ size_t GetDestMemoryVersion() const { return GetRawOperandAsExpr(0).GetRawOperandAsIndex(0); }
+ size_t GetSourceMemoryVersion() const { return GetRawOperandAsIndex(4); }
+ uint32_t GetIntrinsic() const { return (uint32_t)GetRawOperandAsInteger(1); }
+ MediumLevelILInstructionList GetParameterExprs() const { return GetRawOperandAsExprList(2); }
+ void SetDestMemoryVersion(size_t version) { GetRawOperandAsExpr(0).UpdateRawOperand(0, version); }
+ void SetSourceMemoryVersion(size_t version) { UpdateRawOperand(4, version); }
+ void SetOutputSSAVariables(const _STD_VECTOR<SSAVariable>& vars) { GetRawOperandAsExpr(0).UpdateRawOperandAsSSAVariableList(1, vars); }
+ };
template <>
struct MediumLevelILInstructionAccessor<MLIL_FREE_VAR_SLOT> : public MediumLevelILInstructionBase