From a7e11a4bb5a432ba94421655f7ebc63d2acebd1a Mon Sep 17 00:00:00 2001 From: Nate Begeman Date: Fri, 1 Apr 2005 05:57:17 +0000 Subject: [PATCH] Fix stores to global addresses Fix calls with no arguments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20975 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCISelPattern.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/Target/PowerPC/PPCISelPattern.cpp b/lib/Target/PowerPC/PPCISelPattern.cpp index 3acd5db0c6a..9b70f3d23a1 100644 --- a/lib/Target/PowerPC/PPCISelPattern.cpp +++ b/lib/Target/PowerPC/PPCISelPattern.cpp @@ -210,7 +210,8 @@ PPC32TargetLowering::LowerCallTo(SDOperand Chain, unsigned NumBytes = 24; if (Args.empty()) { - NumBytes = 0; // Save zero bytes. + Chain = DAG.getNode(ISD::ADJCALLSTACKDOWN, MVT::Other, Chain, + DAG.getConstant(NumBytes, getPointerTy())); } else { for (unsigned i = 0, e = Args.size(); i != e; ++i) switch (getValueType(Args[i].second)) { @@ -1545,12 +1546,7 @@ void ISel::Select(SDOperand N) { } } - if (Address.getOpcode() == ISD::GlobalAddress) - { - BuildMI(BB, Opc, 2).addReg(Tmp1) - .addGlobalAddress(cast(Address)->getGlobal()); - } - else if(Address.getOpcode() == ISD::FrameIndex) + if(Address.getOpcode() == ISD::FrameIndex) { Tmp2 = cast(Address)->getIndex(); addFrameReference(BuildMI(BB, Opc, 3).addReg(Tmp1), (int)Tmp2);