diff options
author | Dale Johannesen <dalej@apple.com> | 2007-11-10 22:07:15 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-11-10 22:07:15 +0000 |
commit | e3ef744d3e3557ee286d2ed3bf8306e5fbbd1ac4 (patch) | |
tree | 44aeee547570621d58158cda9f991cb563d40388 /utils/TableGen | |
parent | e7bbd41af29a2376cf8873da882f54ba25b1d91f (diff) | |
download | external_llvm-e3ef744d3e3557ee286d2ed3bf8306e5fbbd1ac4.zip external_llvm-e3ef744d3e3557ee286d2ed3bf8306e5fbbd1ac4.tar.gz external_llvm-e3ef744d3e3557ee286d2ed3bf8306e5fbbd1ac4.tar.bz2 |
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
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/CallingConvEmitter.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/TableGen/CallingConvEmitter.cpp b/utils/TableGen/CallingConvEmitter.cpp index 5c88b5f..79e3a9c 100644 --- a/utils/TableGen/CallingConvEmitter.cpp +++ b/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"; |