summaryrefslogtreecommitdiff
path: root/lowlevelilinstruction.h
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2018-02-09 17:17:53 -0500
committerPeter LaFosse <peter@vector35.com>2018-03-23 17:10:06 -0400
commita77b7ddc28706da689727a82f5a67ae1e9c61693 (patch)
tree9f1a0fd2b15d5d8bcc5d02a90449f0a7a3d6abc3 /lowlevelilinstruction.h
parenteb2a6a07df889537e25c647d9b3c71c30c836961 (diff)
Add instructions for tracking freed register stack slots
Diffstat (limited to 'lowlevelilinstruction.h')
-rw-r--r--lowlevelilinstruction.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/lowlevelilinstruction.h b/lowlevelilinstruction.h
index 3cd1c8f4..675baa3c 100644
--- a/lowlevelilinstruction.h
+++ b/lowlevelilinstruction.h
@@ -1013,6 +1013,15 @@ namespace BinaryNinja
{
uint32_t GetSourceRegisterStack() const { return GetRawOperandAsRegister(0); }
};
+ 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
+ {
+ uint32_t GetDestRegisterStack() const { return GetRawOperandAsRegister(0); }
+ LowLevelILInstruction GetDestExpr() const { return GetRawOperandAsExpr(1); }
+ };
template <> struct LowLevelILInstructionAccessor<LLIL_REG_STACK_REL_SSA>: public LowLevelILInstructionBase
{
SSARegisterStack GetSourceSSARegisterStack() const { return GetRawOperandAsSSARegisterStack(0); }
@@ -1027,6 +1036,24 @@ namespace BinaryNinja
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
+ {
+ 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
+ {
+ 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
{
uint32_t GetSourceFlag() const { return GetRawOperandAsRegister(0); }