aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-01-30 03:57:33 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-01-30 03:57:33 +0000
commit9b107fc8cfacd14b45bb6349e946dcb6147d0614 (patch)
treef348707f1b95d9d73aa145d3d3542dcbcf82a051
parent6d1aba85d85bd8309ae36837b977605d3ee2fc66 (diff)
downloadexternal_llvm-9b107fc8cfacd14b45bb6349e946dcb6147d0614.zip
external_llvm-9b107fc8cfacd14b45bb6349e946dcb6147d0614.tar.gz
external_llvm-9b107fc8cfacd14b45bb6349e946dcb6147d0614.tar.bz2
Skip over the label which marks the beginning of the function before inserting prologue code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46546 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86RegisterInfo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp
index 277a09c..bca1973 100644
--- a/lib/Target/X86/X86RegisterInfo.cpp
+++ b/lib/Target/X86/X86RegisterInfo.cpp
@@ -525,6 +525,12 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
X86FI->getCalleeSavedFrameSize() +(-TailCallReturnAddrDelta));
uint64_t NumBytes = StackSize - X86FI->getCalleeSavedFrameSize();
+ // Skip over the label which mark the beginning of the function.
+ if (MMI && MMI->needsFrameInfo() &&
+ MBBI != MBB.end() &&
+ MBBI->getOpcode() == X86::LABEL)
+ ++MBBI;
+
// Insert stack pointer adjustment for later moving of return addr. Only
// applies to tail call optimized functions where the callee argument stack
// size is bigger than the callers.