summaryrefslogtreecommitdiff
path: root/architecture.cpp
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2016-05-08 23:46:20 -0400
committerRusty Wagner <rusty@vector35.com>2016-05-08 23:48:17 -0400
commit3ab807811a7efdcfeff4be101822be9d383c15e1 (patch)
tree52115a5182525d8ad557af54b6135800f9b9a9a5 /architecture.cpp
parentecaf78b419d323f6b589aac4b9ff5ff24b314bc6 (diff)
Add additional IL stage for flags resolution
Diffstat (limited to 'architecture.cpp')
-rw-r--r--architecture.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/architecture.cpp b/architecture.cpp
index b1f6c416..accfa69f 100644
--- a/architecture.cpp
+++ b/architecture.cpp
@@ -261,12 +261,12 @@ uint32_t* Architecture::GetFlagsWrittenByFlagWriteTypeCallback(void* ctxt, uint3
}
-bool Architecture::GetFlagWriteLowLevelILCallback(void* ctxt, BNLowLevelILOperation op, size_t size, uint32_t flagWriteType,
- BNRegisterOrConstant* operands, size_t operandCount, BNLowLevelILFunction* il)
+size_t Architecture::GetFlagWriteLowLevelILCallback(void* ctxt, BNLowLevelILOperation op, size_t size, uint32_t flagWriteType,
+ uint32_t flag, BNRegisterOrConstant* operands, size_t operandCount, BNLowLevelILFunction* il)
{
Architecture* arch = (Architecture*)ctxt;
LowLevelILFunction func(BNNewLowLevelILFunctionReference(il));
- return arch->GetFlagWriteLowLevelIL(op, size, flagWriteType, operands, operandCount, func);
+ return arch->GetFlagWriteLowLevelIL(op, size, flagWriteType, flag, operands, operandCount, func);
}
@@ -539,10 +539,18 @@ vector<uint32_t> Architecture::GetFlagsWrittenByFlagWriteType(uint32_t)
}
-bool Architecture::GetFlagWriteLowLevelIL(BNLowLevelILOperation op, size_t size, uint32_t flagWriteType,
- BNRegisterOrConstant* operands, size_t operandCount,LowLevelILFunction& il)
+size_t Architecture::GetFlagWriteLowLevelIL(BNLowLevelILOperation op, size_t size, uint32_t flagWriteType,
+ uint32_t flag, BNRegisterOrConstant* operands, size_t operandCount,LowLevelILFunction& il)
{
- return BNGetDefaultArchitectureFlagWriteLowLevelIL(m_object, op, size, flagWriteType, operands,
+ return BNGetDefaultArchitectureFlagWriteLowLevelIL(m_object, op, size, flagWriteType, flag, operands,
+ operandCount, il.GetObject());
+}
+
+
+size_t Architecture::GetDefaultFlagWriteLowLevelIL(BNLowLevelILOperation op, size_t size, uint32_t flagWriteType,
+ uint32_t flag, BNRegisterOrConstant* operands, size_t operandCount,LowLevelILFunction& il)
+{
+ return BNGetDefaultArchitectureFlagWriteLowLevelIL(m_object, op, size, flagWriteType, flag, operands,
operandCount, il.GetObject());
}
@@ -1010,10 +1018,10 @@ vector<uint32_t> CoreArchitecture::GetFlagsWrittenByFlagWriteType(uint32_t write
}
-bool CoreArchitecture::GetFlagWriteLowLevelIL(BNLowLevelILOperation op, size_t size, uint32_t flagWriteType,
- BNRegisterOrConstant* operands, size_t operandCount, LowLevelILFunction& il)
+size_t CoreArchitecture::GetFlagWriteLowLevelIL(BNLowLevelILOperation op, size_t size, uint32_t flagWriteType,
+ uint32_t flag, BNRegisterOrConstant* operands, size_t operandCount, LowLevelILFunction& il)
{
- return BNGetArchitectureFlagWriteLowLevelIL(m_object, op, size, flagWriteType, operands,
+ return BNGetArchitectureFlagWriteLowLevelIL(m_object, op, size, flagWriteType, flag, operands,
operandCount, il.GetObject());
}