diff options
| author | Nate Begeman <natebegeman@mac.com> | 2005-04-01 05:57:17 +0000 |
|---|---|---|
| committer | Nate Begeman <natebegeman@mac.com> | 2005-04-01 05:57:17 +0000 |
| commit | 2095f3b06bc44dc38998a406b984566fc0fcf3af (patch) | |
| tree | a5a4835b66964461dda933a1a6d2db72c70e57b5 /llvm/lib | |
| parent | 839b34c367a0fff9f47d8237974d5794714ae301 (diff) | |
| download | bcm5719-llvm-2095f3b06bc44dc38998a406b984566fc0fcf3af.tar.gz bcm5719-llvm-2095f3b06bc44dc38998a406b984566fc0fcf3af.zip | |
Fix stores to global addresses
Fix calls with no arguments
llvm-svn: 20975
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp b/llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp index 3acd5db0c6a..9b70f3d23a1 100644 --- a/llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp +++ b/llvm/lib/Target/PowerPC/PPC32ISelPattern.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<GlobalAddressSDNode>(Address)->getGlobal()); - } - else if(Address.getOpcode() == ISD::FrameIndex) + if(Address.getOpcode() == ISD::FrameIndex) { Tmp2 = cast<FrameIndexSDNode>(Address)->getIndex(); addFrameReference(BuildMI(BB, Opc, 3).addReg(Tmp1), (int)Tmp2); |

