diff --git a/src/base/SMPFunction.cpp b/src/base/SMPFunction.cpp index 250077eaf34ab6436c73ed6a6deaa9ebdc468f23..5849e20047651207e0ba378375b40b5ee126de55 100644 --- a/src/base/SMPFunction.cpp +++ b/src/base/SMPFunction.cpp @@ -1741,6 +1741,7 @@ void SMPFunction::FindPreservedRegs(void) { void SMPFunction::FindAllAllocsAndDeallocs(void) { bool FoundAllocInstr = false; bool FoundDeallocInstr = false; + bool FoundAlloca = false; bool DebugFlag = false; #if SMP_DEBUG_FRAMEFIXUP DebugFlag |= (0 == strcmp("frame_dummy", this->GetFuncName())); @@ -1776,8 +1777,18 @@ void SMPFunction::FindAllAllocsAndDeallocs(void) { this->LocalVarsDeallocInstr = addr; FoundDeallocInstr = true; } + else if (CurrInst->MDIsFrameAllocInstr()) { + FoundAlloca = true; + if (CurrInst->HasAllocaRTL()) { + CurrInst->SetAllocaCall(); + } + } + else if (CurrInst->MDIsPushInstr()) { + this->PushAfterLocalVarAlloc = true; + } } } + this->CallsAlloca = FoundAlloca; // As of July, 2015, the code below seems unnecessary and obsolete. return; @@ -4038,7 +4049,6 @@ void SMPFunction::AdvancedAnalysis(void) { #endif this->FindAllAllocsAndDeallocs(); - this->CallsAlloca = this->FindAlloca(); #if 1 InstIter = this->Instrs.begin(); 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 68d007c8095fc9ea03e2ef16facdbbb928107de8..6721481425f006f28474bdfe85c605fc453bf432 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 @@ -0e2d8771ec154d31994de0770e66330bd2e49ac4 \ No newline at end of file +56927c3206cc0229b61ac271e9ef366bf853b5c7 \ No newline at end of file diff --git a/tests/commit/trimmed-sorted-save-gedit.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-gedit.psexe.annot.REMOVED.git-id index 90d2af3d4a9395df35e1375e43d7364c340b8f4a..6dd12551f04864b87df13b9c6f037685964d5d18 100644 --- a/tests/commit/trimmed-sorted-save-gedit.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-gedit.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -d4d6e5c44bc8a949da730f46219d3ca2b30ca958 \ No newline at end of file +8e19d369a97c50fed8b65efe3371b64d28a0f25e \ No newline at end of file diff --git a/tests/commit/trimmed-sorted-save-gnome-calculator.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-gnome-calculator.psexe.annot.REMOVED.git-id index cd2499533b0438b4f739e93582cebd2d75751892..0d2c25895a9d8d4c6e0c59b2f4cb97eb6e00a156 100644 --- a/tests/commit/trimmed-sorted-save-gnome-calculator.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-gnome-calculator.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -8f2a86f1deb39e8c6fbb4e232768c464e6b33f99 \ No newline at end of file +a45d85572cac4aa1c097233cfabe417bd221e35c \ No newline at end of file diff --git a/tests/commit/trimmed-sorted-save-gnome-search-tool.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-gnome-search-tool.psexe.annot.REMOVED.git-id index 384617e1c4d6c5be43da49f2863ed99701d565f2..167b6120766a9c4e7df66ed5bcfc8dd46096ebe5 100644 --- a/tests/commit/trimmed-sorted-save-gnome-search-tool.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-gnome-search-tool.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -fb461cb1fb815ae8456b96f324d8f9420b9afdab \ No newline at end of file +2d26ae88c9b3c1dc8a0969d5b04fbed84655bd7d \ No newline at end of file diff --git a/tests/commit/trimmed-sorted-save-gnome-system-log.psexe.annot b/tests/commit/trimmed-sorted-save-gnome-system-log.psexe.annot index b87db2256c163d1ea66fc19b20f8f49f05c2e7b1..f684ba7e21164f063b97646adaa1dcdc9e59a97f 100644 --- a/tests/commit/trimmed-sorted-save-gnome-system-log.psexe.annot +++ b/tests/commit/trimmed-sorted-save-gnome-system-log.psexe.annot @@ -6592,16 +6592,20 @@ 40b337 1 INSTR DEADREGS EFLAGS R8 R9 R10 R11 ZZ pop rbp 40b338 1 INSTR BELONGTO 40b2b0 40b338 1 INSTR DEADREGS EFLAGS R8 R9 R10 R11 ZZ retn - 40b340 -1 INSTR LOCAL MetadataUnused mov [rsp+var_20], rbx 40b340 5 INSTR BELONGTO 40d6c0 - 40b345 -1 INSTR LOCAL MetadataUnused mov [rsp+var_18], rbp + 40b340 5 INSTR DEADREGS EFLAGS RAX RCX RDX RSI R8 R9 R10 R11 ZZ mov [rsp+var_20], rbx + 40b340 5 PTRIMMEDESP STACK -32 displ mov [rsp+var_20], rbx 40b345 5 INSTR BELONGTO 40d6c0 + 40b345 5 INSTR DEADREGS EFLAGS RAX RCX RDX RBX RSI R8 R9 R10 R11 ZZ mov [rsp+var_18], rbp + 40b345 5 PTRIMMEDESP STACK -24 displ mov [rsp+var_18], rbp 40b34a 3 INSTR BELONGTO 40d6c0 40b34a 3 INSTR DEADREGS EFLAGS RAX RCX RDX RBX RSI R8 R9 R10 R11 ZZ mov rbx, rdi - 40b34d -1 INSTR LOCAL MetadataUnused mov [rsp+var_10], r12 40b34d 5 INSTR BELONGTO 40d6c0 - 40b352 -1 INSTR LOCAL MetadataUnused mov [rsp+var_8], r13 + 40b34d 5 INSTR DEADREGS EFLAGS RAX RCX RDX RSI RDI R8 R9 R10 R11 ZZ mov [rsp+var_10], r12 + 40b34d 5 PTRIMMEDESP STACK -16 displ mov [rsp+var_10], r12 40b352 5 INSTR BELONGTO 40d6c0 + 40b352 5 INSTR DEADREGS EFLAGS RAX RCX RDX RSI RDI R8 R9 R10 R11 R12 ZZ mov [rsp+var_8], r13 + 40b352 5 PTRIMMEDESP STACK -8 displ mov [rsp+var_8], r13 40b357 4 INSTR BELONGTO 40d6c0 40b357 4 INSTR DEADREGS EFLAGS RAX RCX RDX RSI RDI R8 R9 R10 R11 R12 R13 ZZ sub rsp, 28h 40b35b -1 INSTR LOCAL NoMetaUpdate call sub_40A9B0 diff --git a/tests/commit/trimmed-sorted-save-gnome-text-editor.psexe.annot.REMOVED.git-id b/tests/commit/trimmed-sorted-save-gnome-text-editor.psexe.annot.REMOVED.git-id index 90d2af3d4a9395df35e1375e43d7364c340b8f4a..6dd12551f04864b87df13b9c6f037685964d5d18 100644 --- a/tests/commit/trimmed-sorted-save-gnome-text-editor.psexe.annot.REMOVED.git-id +++ b/tests/commit/trimmed-sorted-save-gnome-text-editor.psexe.annot.REMOVED.git-id @@ -1 +1 @@ -d4d6e5c44bc8a949da730f46219d3ca2b30ca958 \ No newline at end of file +8e19d369a97c50fed8b65efe3371b64d28a0f25e \ No newline at end of file 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 067937d6aa767c7e4e2eb74ae16cec10004b5466..e18ed78619c768fae4149bfab6f2a346ebf5f28f 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 @@ -eb257b113ba86c2f98b100bfe10a16eea25ba075 \ No newline at end of file +4b2e34138721c306a3ce209c2a4068f77a583d68 \ 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 823dbe8d3577d511392b163a8865f194705a4fa1..d881c734fd469ee6807211065e15707f3caa3a58 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 @@ -93cfcad302be8656efd4bad4c32501c847964eea \ No newline at end of file +f918b9cf9e90d2121fc14747c9396aead54585af \ No newline at end of file