summaryrefslogtreecommitdiff
path: root/callingconvention.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'callingconvention.cpp')
-rw-r--r--callingconvention.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/callingconvention.cpp b/callingconvention.cpp
index 945ba25f..b29d51e2 100644
--- a/callingconvention.cpp
+++ b/callingconvention.cpp
@@ -264,8 +264,16 @@ vector<uint32_t> CallingConvention::GetImplicitlyDefinedRegisters()
}
-RegisterValue CallingConvention::GetIncomingRegisterValue(uint32_t, Function*)
+RegisterValue CallingConvention::GetIncomingRegisterValue(uint32_t reg, Function*)
{
+ uint32_t regStack = GetArchitecture()->GetRegisterStackForRegister(reg);
+ if ((regStack != BN_INVALID_REGISTER) && (reg == GetArchitecture()->GetRegisterStackInfo(regStack).stackTopReg))
+ {
+ RegisterValue value;
+ value.state = ConstantValue;
+ value.value = 0;
+ return value;
+ }
return RegisterValue();
}