diff --git a/src/base/SMPFunction.cpp b/src/base/SMPFunction.cpp index a735bf98b70daa3b74406b12861d2a2f079c0e9a..9bd7ea67e8f12497eb86a56a549b4356c963c57d 100644 --- a/src/base/SMPFunction.cpp +++ b/src/base/SMPFunction.cpp @@ -1380,9 +1380,9 @@ bool SMPFunction::AnalyzeStackPointerDeltas(void) { CurrInst->SetStackPtrOffset(IncomingDelta); // Search for tail calls, defined strictly as having an incoming stack delta of zero and - // being jumps to far chunks. + // being jumps to far chunks not include in the current function. if (0 == IncomingDelta) { - if (CurrInst->IsBranchToFarChunk()) { + if (CurrInst->IsBranchToFarChunk() && (!this->IsInstIDInFunc(CurrInst->GetFarBranchTarget()))) { CurrInst->SetTailCall(); #if 0 SMP_msg("INFO: Found tail call at %llx from %s: %s\n", (unsigned long long) InstAddr, this->GetFuncName(), @@ -1393,7 +1393,7 @@ bool SMPFunction::AnalyzeStackPointerDeltas(void) { // We have an indirect jump with an incoming delta of zero. This // is probably an indirect tail call, unless the target address has // been resolved to addresses in the current function (e.g. switch table). - if (this->HasUnresolvedIndirectJumps()) { + if (this->HasUnresolvedIndirectJumps() && (STARS_BADADDR == CurrInst->GetCallTarget())) { CurrInst->SetTailCall(); #if 0 SMP_msg("INFO: Found indirect tail call at %llx from %s: %s\n", (unsigned long long) InstAddr, this->GetFuncName(), diff --git a/tests/commit/trimmed-sorted-save-ffmpeg.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-ffmpeg.psexe.annot.REMOVED.git-id index bd67835c5f032113f902ed76f18025396e8efc8f..22994728524b6ae4d0d797e27b54bcc0c85c1fe1 100644 --- a/tests/commit/trimmed-sorted-save-ffmpeg.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-ffmpeg.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -831f69765e5bc395de3f27327555f4a3b85f5cdb \ No newline at end of file +d9408921f2d567da87921546d8878c9f12709b9c \ No newline at end of file diff --git a/tests/commit/trimmed-sorted-save-gnome-control-center.psexe.annot b/tests/commit/trimmed-sorted-save-gnome-control-center.psexe.annot index 16564e3296f79e6eb380f36d03656f72b214431f..872d6ff5c31bfff50b3a0f8e520ac2ac67311a14 100644 --- a/tests/commit/trimmed-sorted-save-gnome-control-center.psexe.annot +++ b/tests/commit/trimmed-sorted-save-gnome-control-center.psexe.annot @@ -5811,7 +5811,7 @@ 9172 6 INSTR BELONGTO 9140 9178 10 INSTR BELONGTO 9140 9178 10 INSTR DEADREGS EFLAGS RCX RBX ZZ mov rcx, 2000000020000h - 9178 -2 INSTR LOCAL n RCX ZZ NumericDEFs mov rcx, 2000000020000h + 9178 -2 INSTR LOCAL n RCX ZZ NUMVia2ndSrcIMMEDNUM mov rcx, 2000000020000h 9182 -1 INSTR LOCAL NoMetaUpdate test rax, rcx 9182 3 INSTR BELONGTO 9140 9185 -1 INSTR LOCAL NoMetaUpdate jnz short loc_91B8 diff --git a/tests/commit/trimmed-sorted-save-synaptic.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-synaptic.psexe.annot.REMOVED.git-id index c1749668b6751bc4ccfbed2201abd709f5b0cd4f..40ed2cce1e002463321e3bcbb205610177b5c3f7 100644 --- a/tests/commit/trimmed-sorted-save-synaptic.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-synaptic.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -9feaeb7eb4b9cabd1744d23576f27f37c8263f75 \ No newline at end of file +a83ce7d7e40d5bf011274918b68a2219b5a3679f \ No newline at end of file diff --git a/tests/commit/trimmed-sorted-save-xedit.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-xedit.psexe.annot.REMOVED.git-id index 147006103e18ee259ee61ff38acaefbd20eff9e5..c842eb025ca4e948c372300f48040c1a5813e560 100644 --- a/tests/commit/trimmed-sorted-save-xedit.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-xedit.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -352a213bfb3e1cc815b8527fe743314d7a597e74 \ No newline at end of file +6db952769fca9820b203527c3a23e3264b5046c0 \ No newline at end of file