Explorar o código

correctly set LocalAreaOffset of TargetFrameInfo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29589 91177308-0d34-0410-b5e6-96231b3b80d8
Rafael Espindola %!s(int64=19) %!d(string=hai) anos
pai
achega
a1ab92d8b7
Modificáronse 2 ficheiros con 1 adicións e 6 borrados
  1. 0 5
      lib/Target/ARM/ARMRegisterInfo.cpp
  2. 1 1
      lib/Target/ARM/ARMTargetMachine.cpp

+ 0 - 5
lib/Target/ARM/ARMRegisterInfo.cpp

@@ -93,11 +93,6 @@ ARMRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II) const {
 
   unsigned StackSize = MF.getFrameInfo()->getStackSize();
 
-  //<hack>
-  if (Offset < 0)
-    Offset -= 4;
-  //</hack>
-
   Offset += StackSize;
 
   assert (Offset >= 0);

+ 1 - 1
lib/Target/ARM/ARMTargetMachine.cpp

@@ -33,7 +33,7 @@ namespace {
 ///
 ARMTargetMachine::ARMTargetMachine(const Module &M, const std::string &FS)
   : TargetMachine("ARM"), DataLayout("E-p:32:32"),
-    FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0) {
+    FrameInfo(TargetFrameInfo::StackGrowsDown, 8, -4) {
 }
 
 unsigned ARMTargetMachine::getModuleMatchQuality(const Module &M) {