mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-07 11:33:44 +00:00
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:
parent
e17245dbe9
commit
464bee191f
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user