patch to Bug 17545 - X86FrameLowering::getFrameIndexOffset generates wrong offsets
林作健
manjian2006 at gmail.com
Fri Oct 11 00:20:42 PDT 2013
Index: lib/Target/X86/X86FrameLowering.cpp
===================================================================
--- lib/Target/X86/X86FrameLowering.cpp (revision 192411)
+++ lib/Target/X86/X86FrameLowering.cpp (working copy)
@@ -905,7 +905,7 @@
const X86RegisterInfo *RegInfo =
static_cast<const X86RegisterInfo*>(MF.getTarget().getRegisterInfo());
const MachineFrameInfo *MFI = MF.getFrameInfo();
- int Offset = MFI->getObjectOffset(FI) - getOffsetOfLocalArea();
+ int Offset = MFI->getObjectOffset(FI);
uint64_t StackSize = MFI->getStackSize();
if (RegInfo->hasBasePointer(MF)) {
Index: lib/CodeGen/MachineFunction.cpp
===================================================================
--- lib/CodeGen/MachineFunction.cpp (revision 192411)
+++ lib/CodeGen/MachineFunction.cpp (working copy)
@@ -644,9 +644,6 @@
void MachineFrameInfo::print(const MachineFunction &MF, raw_ostream &OS)
const{
if (Objects.empty()) return;
- const TargetFrameLowering *FI = MF.getTarget().getFrameLowering();
- int ValOffset = (FI ? FI->getOffsetOfLocalArea() : 0);
-
OS << "Frame Objects:\n";
for (unsigned i = 0, e = Objects.size(); i != e; ++i) {
@@ -665,7 +662,7 @@
if (i < NumFixedObjects)
OS << ", fixed";
if (i < NumFixedObjects || SO.SPOffset != -1) {
- int64_t Off = SO.SPOffset - ValOffset;
+ int64_t Off = SO.SPOffset;
OS << ", at location [SP";
if (Off > 0)
OS << "+" << Off;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131011/5bfebe62/attachment.html>
More information about the llvm-commits
mailing list