[llvm-commits] [llvm] r78635 - in /llvm/trunk/lib/Target/PIC16: PIC16ISelLowering.cpp PIC16ISelLowering.h
Sanjiv Gupta
sanjiv.gupta at microchip.com
Mon Aug 10 18:51:55 PDT 2009
Author: sgupta
Date: Mon Aug 10 20:51:55 2009
New Revision: 78635
URL: http://llvm.org/viewvc/llvm-project?rev=78635&view=rev
Log:
Fixed more problems caused by 78142.
Passing of indirect arguments starts after return value on the callee's frame.
Modified:
llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp
llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h
Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp?rev=78635&r1=78634&r2=78635&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp Mon Aug 10 20:51:55 2009
@@ -404,6 +404,7 @@
Entry.isZExt = !isSigned;
Args.push_back(Entry);
}
+
SDValue Callee = DAG.getExternalSymbol(getPIC16LibcallName(Call), EVT::i16);
const Type *RetTy = RetVT.getTypeForEVT();
@@ -1086,6 +1087,7 @@
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 @@
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 @@
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);
}
Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h?rev=78635&r1=78634&r2=78635&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h Mon Aug 10 20:51:55 2009
@@ -111,6 +111,7 @@
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);
More information about the llvm-commits
mailing list