diff options
author | Bob Wilson <bob.wilson@apple.com> | 2009-04-17 19:07:39 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2009-04-17 19:07:39 +0000 |
commit | 1f595bb42950088ccb8246e6b065a96027b46ec6 (patch) | |
tree | 4f697a8bf24d7aca7c17a6042b6c9307ce43c36d /utils | |
parent | 5bea822a0c21d46b2ee539a38474735b2617365d (diff) | |
download | external_llvm-1f595bb42950088ccb8246e6b065a96027b46ec6.zip external_llvm-1f595bb42950088ccb8246e6b065a96027b46ec6.tar.gz external_llvm-1f595bb42950088ccb8246e6b065a96027b46ec6.tar.bz2 |
Use CallConvLower.h and TableGen descriptions of the calling conventions
for ARM. Patch by Sandeep Patel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69371 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-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 a982985..211ded4 100644 --- a/utils/TableGen/CallingConvEmitter.cpp +++ b/utils/TableGen/CallingConvEmitter.cpp @@ -182,6 +182,10 @@ void CallingConvEmitter::EmitAction(Record *Action, << IndentStr << IndentStr << "LocInfo = CCValAssign::ZExt;\n" << IndentStr << "else\n" << IndentStr << IndentStr << "LocInfo = CCValAssign::AExt;\n"; + } else if (Action->isSubClassOf("CCBitConvertToType")) { + Record *DestTy = Action->getValueAsDef("DestTy"); + O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; + O << IndentStr << "LocInfo = CCValAssign::BCvt;\n"; } else if (Action->isSubClassOf("CCPassByVal")) { int Size = Action->getValueAsInt("Size"); int Align = Action->getValueAsInt("Align"); @@ -189,6 +193,11 @@ void CallingConvEmitter::EmitAction(Record *Action, << "State.HandleByVal(ValNo, ValVT, LocVT, LocInfo, " << Size << ", " << Align << ", ArgFlags);\n"; O << IndentStr << "return false;\n"; + } else if (Action->isSubClassOf("CCCustom")) { + O << IndentStr + << "if (" << Action->getValueAsString("FuncName") << "(ValNo, ValVT, " + << "LocVT, LocInfo, ArgFlags, State))\n"; + O << IndentStr << IndentStr << "return false;\n"; } else { Action->dump(); throw "Unknown CCAction!"; |