summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc
diff options
context:
space:
mode:
authorVenkatraman Govindaraju <venkatra@cs.wisc.edu>2013-06-01 20:42:48 +0000
committerVenkatraman Govindaraju <venkatra@cs.wisc.edu>2013-06-01 20:42:48 +0000
commit28e2cd0e7e2afeefed417bf9b33cf0d8552f15f5 (patch)
tree5f84be1ca162dabee1a583fb34360767ec896be8 /llvm/lib/Target/Sparc
parent91142c485e1f3d03408d03077f53e2b71f28f7ce (diff)
downloadbcm5719-llvm-28e2cd0e7e2afeefed417bf9b33cf0d8552f15f5.tar.gz
bcm5719-llvm-28e2cd0e7e2afeefed417bf9b33cf0d8552f15f5.zip
Sparc: Mark functions calling llvm.vastart and llvm.returnaddress intrinsics as non-leaf functions.
llvm-svn: 183079
Diffstat (limited to 'llvm/lib/Target/Sparc')
-rw-r--r--llvm/lib/Target/Sparc/SparcISelLowering.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/Sparc/SparcISelLowering.cpp b/llvm/lib/Target/Sparc/SparcISelLowering.cpp
index 561a01925ac..140efc3a53f 100644
--- a/llvm/lib/Target/Sparc/SparcISelLowering.cpp
+++ b/llvm/lib/Target/Sparc/SparcISelLowering.cpp
@@ -1613,6 +1613,9 @@ static SDValue LowerVASTART(SDValue Op, SelectionDAG &DAG,
MachineFunction &MF = DAG.getMachineFunction();
SparcMachineFunctionInfo *FuncInfo = MF.getInfo<SparcMachineFunctionInfo>();
+ //Need frame address to find the address of VarArgsFrameIndex
+ MF.getFrameInfo()->setFrameAddressIsTaken(true);
+
// vastart just stores the address of the VarArgsFrameIndex slot into the
// memory location argument.
SDLoc DL(Op);
@@ -1719,6 +1722,9 @@ static SDValue LowerRETURNADDR(SDValue Op, SelectionDAG &DAG) {
if (depth == 0)
RetAddr = DAG.getCopyFromReg(DAG.getEntryNode(), dl, RetReg, VT);
else {
+ //Need frame address to find return address of the caller
+ MFI->setFrameAddressIsTaken(true);
+
// flush first to make sure the windowed registers' values are in stack
SDValue Chain = getFLUSHW(Op, DAG);
RetAddr = DAG.getCopyFromReg(Chain, dl, SP::I6, VT);
OpenPOWER on IntegriCloud