aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-02-21 00:32:08 +0000
committerBill Wendling <isanbard@gmail.com>2009-02-21 00:32:08 +0000
commit2625f9b2e4388a957286063f6c7fe5406fd0ca7a (patch)
tree2d2aaee6c0611ebb909fc6c34e0a96f5df981897 /lib
parent9259905f88efad7d6bfb06be2d430e51b9b9b503 (diff)
downloadexternal_llvm-2625f9b2e4388a957286063f6c7fe5406fd0ca7a.zip
external_llvm-2625f9b2e4388a957286063f6c7fe5406fd0ca7a.tar.gz
external_llvm-2625f9b2e4388a957286063f6c7fe5406fd0ca7a.tar.bz2
We need to propagate the debug location information even when dealing with the
prologue/epilogue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65206 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86RegisterInfo.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp
index edc165c..9fa8621 100644
--- a/lib/Target/X86/X86RegisterInfo.cpp
+++ b/lib/Target/X86/X86RegisterInfo.cpp
@@ -542,8 +542,7 @@ void emitSPUpdate(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI,
(Is64Bit ? X86::ADD64ri8 : X86::ADD32ri8) :
(Is64Bit ? X86::ADD64ri32 : X86::ADD32ri));
uint64_t Chunk = (1LL << 31) - 1;
- // We could pass in a DebugLoc, but this is only called from prolog/epilog.
- DebugLoc DL = DebugLoc::getUnknownLoc();
+ DebugLoc DL = MBBI->getDebugLoc();
while (Offset) {
uint64_t ThisVal = (Offset > Chunk) ? Chunk : Offset;
@@ -889,7 +888,7 @@ void X86RegisterInfo::emitEpilogue(MachineFunction &MF,
X86MachineFunctionInfo *X86FI = MF.getInfo<X86MachineFunctionInfo>();
MachineBasicBlock::iterator MBBI = prior(MBB.end());
unsigned RetOpcode = MBBI->getOpcode();
- DebugLoc DL = DebugLoc::getUnknownLoc();
+ DebugLoc DL = MBBI->getDebugLoc();
switch (RetOpcode) {
case X86::RET:
@@ -924,8 +923,9 @@ void X86RegisterInfo::emitEpilogue(MachineFunction &MF,
// pop EBP.
BuildMI(MBB, MBBI, DL,
TII.get(Is64Bit ? X86::POP64r : X86::POP32r), FramePtr);
- } else
+ } else {
NumBytes = StackSize - CSSize;
+ }
// Skip the callee-saved pop instructions.
MachineBasicBlock::iterator LastCSPop = MBBI;