diff --git a/src/base/SMPBasicBlock.cpp b/src/base/SMPBasicBlock.cpp index 43b900a75a37e1d9b841dd2f835ab9736c5c86ac..c10c6551e2facf0c61a04d21dcd4672c24243442 100644 --- a/src/base/SMPBasicBlock.cpp +++ b/src/base/SMPBasicBlock.cpp @@ -7405,6 +7405,7 @@ STARS_sval_t SMPBasicBlock::ComputeStackAdjustmentAfterCall(STARS_ea_t CallAddr) bool PriorCallFound = false; bool JustFoundCallInst = false; // current or prior instruction bool EndedWithTailCall = false; + bool EndedWithCondBranch = false; bool FirstBlock = (this->GetFirstNonMarkerAddr() == this->GetFunc()->GetFirstFuncAddr()); for (InstIter = this->GetFirstInst(); InstIter != this->GetLastInst(); ++InstIter) { @@ -7427,6 +7428,7 @@ STARS_sval_t SMPBasicBlock::ComputeStackAdjustmentAfterCall(STARS_ea_t CallAddr) else if (FoundCallInst) { // just found it. JustFoundCallInst = true; EndedWithTailCall = (RETURN == DataFlowType); // no successor blocks in this case + EndedWithCondBranch = (COND_BRANCH == DataFlowType); if (PriorCallFound && (0 < PriorAdjustmentBytes)) { // We had adjustments between the prior call and the call we are analyzing. // We cannot safely determine whether the adjustments were post-first-call @@ -7507,9 +7509,9 @@ STARS_sval_t SMPBasicBlock::ComputeStackAdjustmentAfterCall(STARS_ea_t CallAddr) // We either ended the block with the call, or had the call followed by a jump, // with no-ops being ignored. // In either case, we should have only one successor block to look at. - if (EndedWithTailCall) { + if (EndedWithTailCall || EndedWithCondBranch) { AdjustmentBytes = 0; - SMP_msg("INFO: Resetting stack adjustment to zero at tail call at %llx\n", + SMP_msg("INFO: Resetting stack adjustment to zero at tail call or COND_BRANCH at %llx\n", (uint64_t) InstAddr); } else {