diff options
-rw-r--r-- | lib/Target/Mips/MipsISelLowering.cpp | 2 | ||||
-rw-r--r-- | lib/Target/Mips/MipsMachineFunction.h | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsISelLowering.cpp b/lib/Target/Mips/MipsISelLowering.cpp index 77f1bac877..862790b4d2 100644 --- a/lib/Target/Mips/MipsISelLowering.cpp +++ b/lib/Target/Mips/MipsISelLowering.cpp @@ -3021,6 +3021,8 @@ MipsTargetLowering::LowerFormalArguments(SDValue Chain, MipsCC MipsCCInfo(CallConv, isVarArg, IsO32, CCInfo); MipsCCInfo.analyzeFormalArguments(Ins); + MipsFI->setFormalArgInfo(CCInfo.getNextStackOffset(), + MipsCCInfo.hasByValArg()); Function::const_arg_iterator FuncArg = DAG.getMachineFunction().getFunction()->arg_begin(); diff --git a/lib/Target/Mips/MipsMachineFunction.h b/lib/Target/Mips/MipsMachineFunction.h index f9efe07e0e..663aaecf5c 100644 --- a/lib/Target/Mips/MipsMachineFunction.h +++ b/lib/Target/Mips/MipsMachineFunction.h @@ -47,6 +47,10 @@ class MipsFunctionInfo : public MachineFunctionInfo { /// VarArgsFrameIndex - FrameIndex for start of varargs area. int VarArgsFrameIndex; + // Formal argument information obtained during call to LowerFormalArguments. + unsigned NextStackOffset; + bool HasByvalArg; + bool EmitNOAT; public: @@ -67,6 +71,13 @@ public: int getVarArgsFrameIndex() const { return VarArgsFrameIndex; } void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; } + unsigned nextStackOffset() const { return NextStackOffset; } + bool hasByvalArg() const { return HasByvalArg; } + void setFormalArgInfo(unsigned Offset, bool HasByval) { + NextStackOffset = Offset; + HasByvalArg = HasByval; + } + bool getEmitNOAT() const { return EmitNOAT; } void setEmitNOAT() { EmitNOAT = true; } }; |