summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CallingConvEmitter.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-11-10 22:07:15 +0000
committerDale Johannesen <dalej@apple.com>2007-11-10 22:07:15 +0000
commitb988e7e8cd92fa9bcc81116c5c055cf01a55b301 (patch)
tree4e9c871260c0df2b47e37faa75f4738ac89822c6 /llvm/utils/TableGen/CallingConvEmitter.cpp
parent0bd56b7727aae58a0a037b9999f7ce88555c3e54 (diff)
downloadbcm5719-llvm-b988e7e8cd92fa9bcc81116c5c055cf01a55b301.tar.gz
bcm5719-llvm-b988e7e8cd92fa9bcc81116c5c055cf01a55b301.zip
Add CCAssignToStackABISizeAlign for convenience in
dealing with types whose size & alignment are different on different subtargets. Use it for x86 f80. llvm-svn: 43988
Diffstat (limited to 'llvm/utils/TableGen/CallingConvEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/CallingConvEmitter.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CallingConvEmitter.cpp b/llvm/utils/TableGen/CallingConvEmitter.cpp
index 5c88b5fc7a4..79e3a9c6cef 100644
--- a/llvm/utils/TableGen/CallingConvEmitter.cpp
+++ b/llvm/utils/TableGen/CallingConvEmitter.cpp
@@ -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";
OpenPOWER on IntegriCloud