llvm.org GIT mirror llvm / 5daafa9
Revert my last commit. Not needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45994 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 11 years ago
1 changed file(s) with 7 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
114114 int Size = Action->getValueAsInt("Size");
115115 int Align = Action->getValueAsInt("Align");
116116
117 O << IndentStr << "unsigned Size = ";
117 O << IndentStr << "unsigned Offset" << ++Counter
118 << " = State.AllocateStack(";
118119 if (Size)
119 O << Size;
120 O << Size << ", ";
120121 else
121 O << "State.getTarget().getTargetData()"
122 "->getABITypeSize(MVT::getTypeForValueType(LocVT))";
123 O << ";\n"
124 << IndentStr << "unsigned Align = ";
122 O << "\n" << IndentStr << " State.getTarget().getTargetData()"
123 "->getABITypeSize(MVT::getTypeForValueType(LocVT)), ";
125124 if (Align)
126125 O << Align;
127126 else
128 O << "State.getTarget().getTargetData()"
127 O << "\n" << IndentStr << " State.getTarget().getTargetData()"
129128 "->getABITypeAlignment(MVT::getTypeForValueType(LocVT))";
130 O << ";\n";
131 O << IndentStr << "if (ArgFlags & ISD::ParamFlags::ByVal) {\n";
132 O << IndentStr << " " <<
133 "Size = (ArgFlags & ISD::ParamFlags::ByValSize) >> "
134 "ISD::ParamFlags::ByValSizeOffs;\n";
135 O << IndentStr << " " <<
136 "unsigned ParamAlign = 1 << ((ArgFlags & ISD::ParamFlags::ByValAlign) "
137 ">> ISD::ParamFlags::ByValAlignOffs);\n";
138 O << IndentStr << " Align = std::max(Align, ParamAlign);\n"
139 << IndentStr << "}\n";
140 O << IndentStr << "unsigned Offset" << ++Counter
141 << " = State.AllocateStack(Size, Align);\n";
142 O << IndentStr
129 O << ");\n" << IndentStr
143130 << "State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset"
144131 << Counter << ", LocVT, LocInfo));\n";
145132 O << IndentStr << "return false;\n";