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
This commit is contained in:
Chris Lattner 2010-03-13 08:04:35 +00:00
parent e17245dbe9
commit 464bee191f

View File

@ -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));
}