From 2e3b9c925390cc8b1d72a41d0564bb2862d3dba2 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Sat, 2 Mar 2024 14:38:47 -0500 Subject: Add support for memory intrinsics. --- mediumlevelilinstruction.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mediumlevelilinstruction.h') 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& vars) { UpdateRawOperandAsSSAVariableList(0, vars); } }; + template <> + struct MediumLevelILInstructionAccessor : 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& vars) { GetRawOperandAsExpr(0).UpdateRawOperandAsSSAVariableList(1, vars); } + }; template <> struct MediumLevelILInstructionAccessor : public MediumLevelILInstructionBase -- cgit v1.3.1