diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-13 08:04:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-13 08:04:35 +0000 |
commit | 464bee191feb3062a63a378189e542d15bb806e2 (patch) | |
tree | 290ce1dc46b062790aab797db66a05a3c68b4832 | |
parent | e17245dbe970faf29af408056f43ee543724d7fc (diff) |
simplify some overly general code. The stack always grows down on x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98431 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index 3c087bdeb9..d3a5b15d8f 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -938,10 +938,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { std::vector<MachineMove> &Moves = MMI->getFrameMoves(); const TargetData *TD = MF.getTarget().getTargetData(); uint64_t NumBytes = 0; - int stackGrowth = - (MF.getTarget().getFrameInfo()->getStackGrowthDirection() == - TargetFrameInfo::StackGrowsUp ? - TD->getPointerSize() : -TD->getPointerSize()); + int stackGrowth = -TD->getPointerSize(); if (HasFP) { // Calculate required stack adjustment. @@ -978,8 +975,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { } // Change the rule for the FramePtr to be an "offset" rule. - MachineLocation FPDst(MachineLocation::VirtualFP, - 2 * stackGrowth); + MachineLocation FPDst(MachineLocation::VirtualFP, 2 * stackGrowth); MachineLocation FPSrc(FramePtr); Moves.push_back(MachineMove(FrameLabelId, FPDst, FPSrc)); } |