diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2010-01-30 18:32:07 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2010-01-30 18:32:07 +0000 |
commit | 3ed6f876c8c30d82dceccfdd7e3f1774a85adc7c (patch) | |
tree | c6afd736b93e4b4bebea3ef285f3fd42bbafa632 /lib/Target/Mips | |
parent | 5e194602a4e21fbd1b4357fda71a69f88789d53b (diff) | |
download | external_llvm-3ed6f876c8c30d82dceccfdd7e3f1774a85adc7c.zip external_llvm-3ed6f876c8c30d82dceccfdd7e3f1774a85adc7c.tar.gz external_llvm-3ed6f876c8c30d82dceccfdd7e3f1774a85adc7c.tar.bz2 |
Fix PR6144. Reload GP before the emission of CALLSEQ_END to guarantee the right reload order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r-- | lib/Target/Mips/MipsISelLowering.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Target/Mips/MipsISelLowering.cpp b/lib/Target/Mips/MipsISelLowering.cpp index 2bc277c..6d932ec 100644 --- a/lib/Target/Mips/MipsISelLowering.cpp +++ b/lib/Target/Mips/MipsISelLowering.cpp @@ -834,11 +834,6 @@ MipsTargetLowering::LowerCall(SDValue Chain, SDValue Callee, Chain = DAG.getNode(MipsISD::JmpLink, dl, NodeTys, &Ops[0], Ops.size()); InFlag = Chain.getValue(1); - // Create the CALLSEQ_END node. - Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, true), - DAG.getIntPtrConstant(0, true), InFlag); - InFlag = Chain.getValue(1); - // Create a stack location to hold GP when PIC is used. This stack // location is used on function prologue to save GP and also after all // emited CALL's to restore GP. @@ -868,6 +863,11 @@ MipsTargetLowering::LowerCall(SDValue Chain, SDValue Callee, InFlag = Chain.getValue(1); } + // Create the CALLSEQ_END node. + Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, true), + DAG.getIntPtrConstant(0, true), InFlag); + InFlag = Chain.getValue(1); + // Handle result values, copying them out of physregs into vregs that we // return. return LowerCallResult(Chain, InFlag, CallConv, isVarArg, |