summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-05-22 01:47:14 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-05-22 01:47:14 +0000
commit168ced94d84929f7cdb5d61c67ed79e7275f0ec6 (patch)
treea9b6a2f1562ee40a1a93d1ab2e9646610f8f1c3d /llvm/lib/Target/PowerPC
parentbd9485db634dd2341f6e766e99bff758793d0d42 (diff)
downloadbcm5719-llvm-168ced94d84929f7cdb5d61c67ed79e7275f0ec6.tar.gz
bcm5719-llvm-168ced94d84929f7cdb5d61c67ed79e7275f0ec6.zip
Implement @llvm.returnaddress. rdar://8015977.
llvm-svn: 104421
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelLowering.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 6f1195393bd..10b516aa133 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -5496,12 +5496,15 @@ bool PPCTargetLowering::isLegalAddressImmediate(llvm::GlobalValue* GV) const {
SDValue PPCTargetLowering::LowerRETURNADDR(SDValue Op,
SelectionDAG &DAG) const {
+ MachineFunction &MF = DAG.getMachineFunction();
+ MachineFrameInfo *MFI = MF.getFrameInfo();
+ MFI->setReturnAddressIsTaken(true);
+
DebugLoc dl = Op.getDebugLoc();
unsigned Depth = cast<ConstantSDNode>(Op.getOperand(0))->getZExtValue();
// Make sure the function does not optimize away the store of the RA to
// the stack.
- MachineFunction &MF = DAG.getMachineFunction();
PPCFunctionInfo *FuncInfo = MF.getInfo<PPCFunctionInfo>();
FuncInfo->setLRStoreRequired();
bool isPPC64 = PPCSubTarget.isPPC64();
OpenPOWER on IntegriCloud