aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-08-11 01:51:55 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-08-11 01:51:55 +0000
commit05c742deccf67aafd7ab72a600a4770f41321b0d (patch)
treed8c53d0dfacaf79f343914badfede63640f5a442 /lib
parent0eeb45137a84aaa4dd22567dddce6bb07f487941 (diff)
downloadexternal_llvm-05c742deccf67aafd7ab72a600a4770f41321b0d.zip
external_llvm-05c742deccf67aafd7ab72a600a4770f41321b0d.tar.gz
external_llvm-05c742deccf67aafd7ab72a600a4770f41321b0d.tar.bz2
Fixed more problems caused by 78142.
Passing of indirect arguments starts after return value on the callee's frame. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/PIC16/PIC16ISelLowering.cpp6
-rw-r--r--lib/Target/PIC16/PIC16ISelLowering.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/PIC16/PIC16ISelLowering.cpp b/lib/Target/PIC16/PIC16ISelLowering.cpp
index 72cc1e2..2b40d9f 100644
--- a/lib/Target/PIC16/PIC16ISelLowering.cpp
+++ b/lib/Target/PIC16/PIC16ISelLowering.cpp
@@ -404,6 +404,7 @@ PIC16TargetLowering::MakePIC16Libcall(PIC16ISD::PIC16Libcall Call,
Entry.isZExt = !isSigned;
Args.push_back(Entry);
}
+
SDValue Callee = DAG.getExternalSymbol(getPIC16LibcallName(Call), EVT::i16);
const Type *RetTy = RetVT.getTypeForEVT();
@@ -1086,6 +1087,7 @@ SDValue PIC16TargetLowering::
LowerIndirectCallArguments(SDValue Chain, SDValue InFlag,
SDValue DataAddr_Lo, SDValue DataAddr_Hi,
const SmallVectorImpl<ISD::OutputArg> &Outs,
+ const SmallVectorImpl<ISD::InputArg> &Ins,
DebugLoc dl, SelectionDAG &DAG) {
unsigned NumOps = Outs.size();
@@ -1098,7 +1100,7 @@ LowerIndirectCallArguments(SDValue Chain, SDValue InFlag,
SDValue Arg, StoreRet;
// For PIC16 ABI the arguments come after the return value.
- unsigned RetVals = Outs.size();
+ unsigned RetVals = Ins.size();
for (unsigned i = 0, ArgOffset = RetVals; i < NumOps; i++) {
// Get the arguments
Arg = Outs[i].Val;
@@ -1430,7 +1432,7 @@ PIC16TargetLowering::LowerCall(SDValue Chain, SDValue Callee,
OperFlag = getOutFlag(CallArgs);
} else {
CallArgs = LowerIndirectCallArguments(Chain, OperFlag, DataAddr_Lo,
- DataAddr_Hi, Outs, dl, DAG);
+ DataAddr_Hi, Outs, Ins, dl, DAG);
Chain = getChain(CallArgs);
OperFlag = getOutFlag(CallArgs);
}
diff --git a/lib/Target/PIC16/PIC16ISelLowering.h b/lib/Target/PIC16/PIC16ISelLowering.h
index 5069153..4d44d6d 100644
--- a/lib/Target/PIC16/PIC16ISelLowering.h
+++ b/lib/Target/PIC16/PIC16ISelLowering.h
@@ -111,6 +111,7 @@ namespace llvm {
LowerIndirectCallArguments(SDValue Chain, SDValue InFlag,
SDValue DataAddr_Lo, SDValue DataAddr_Hi,
const SmallVectorImpl<ISD::OutputArg> &Outs,
+ const SmallVectorImpl<ISD::InputArg> &Ins,
DebugLoc dl, SelectionDAG &DAG);
SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG);