aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit2457f2c66184e978d4ed8fa9e2128effff26cb0b (patch)
tree03c6a5233110f4bf94d5c13134bc803e1dbbdd3c /lib/Target/PowerPC
parent5eb195153950bc7ebfc30649494a78b2096b5ef8 (diff)
downloadexternal_llvm-2457f2c66184e978d4ed8fa9e2128effff26cb0b.zip
external_llvm-2457f2c66184e978d4ed8fa9e2128effff26cb0b.tar.gz
external_llvm-2457f2c66184e978d4ed8fa9e2128effff26cb0b.tar.bz2
Implement @llvm.returnaddress. rdar://8015977.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104421 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index 6f11953..10b516a 100644
--- a/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/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();