Add CCAssignToStackABISizeAlign for convenience in

dealing with types whose size & alignment are
different on different subtargets.  Use it for x86 f80.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43988 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dale Johannesen
2007-11-10 22:07:15 +00:00
parent e7bbd41af2
commit e3ef744d3e
3 changed files with 24 additions and 5 deletions
+9
View File
@@ -120,6 +120,15 @@ void CallingConvEmitter::EmitAction(Record *Action,
O << IndentStr << "State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset"
<< Counter << ", LocVT, LocInfo));\n";
O << IndentStr << "return false;\n";
} else if (Action->isSubClassOf("CCAssignToStackABISizeAlign")) {
O << IndentStr << "unsigned Offset" << ++Counter
<< " = State.AllocateStack(State.getTarget().getTargetData()"
"->getABITypeSize(MVT::getTypeForValueType(LocVT)),\n";
O << IndentStr << " State.getTarget().getTargetData()"
"->getABITypeAlignment(MVT::getTypeForValueType(LocVT)));\n";
O << IndentStr << "State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset"
<< Counter << ", LocVT, LocInfo));\n";
O << IndentStr << "return false;\n";
} else if (Action->isSubClassOf("CCPromoteToType")) {
Record *DestTy = Action->getValueAsDef("DestTy");
O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n";