diff options
| author | Rusty Wagner <rusty@vector35.com> | 2017-10-03 23:07:48 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-03-23 17:10:05 -0400 |
| commit | ceab7825606b37d1dc142f73931660c9600b340d (patch) | |
| tree | ccdf6ce16485d20e9b71249db7e0c8d57542992a /callingconvention.cpp | |
| parent | c7e9bb6b63e96a6cc779f3f1f64556ebe71b9bfb (diff) | |
Adding support for register stacks in IL (for x87)
Diffstat (limited to 'callingconvention.cpp')
| -rw-r--r-- | callingconvention.cpp | 10 |
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(); } |
