aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-29 21:10:12 +0000
committerChris Lattner <sabre@nondot.org>2009-07-29 21:10:12 +0000
commitcb778a8634454c70d88955b3732f330a6cbe5b07 (patch)
tree05ae9b449b85cb530a0eca41c2f518730eae8e2f /utils/TableGen
parenta938ac6223c5fd315ab745086d843df5e0604e09 (diff)
downloadexternal_llvm-cb778a8634454c70d88955b3732f330a6cbe5b07.zip
external_llvm-cb778a8634454c70d88955b3732f330a6cbe5b07.tar.gz
external_llvm-cb778a8634454c70d88955b3732f330a6cbe5b07.tar.bz2
1. Introduce a new TargetOperandInfo::getRegClass() helper method
and convert code to using it, instead of having lots of things poke the isLookupPtrRegClass() method directly. 2. Make PointerLikeRegClass contain a 'kind' int, and store it in the existing regclass field of TargetOperandInfo when the isLookupPtrRegClass() predicate is set. Make getRegClass pass this into TargetRegisterInfo::getPointerRegClass(), allowing targets to have multiple ptr_rc things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r--utils/TableGen/InstrInfoEmitter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp
index c0e441c..ef52c07 100644
--- a/utils/TableGen/InstrInfoEmitter.cpp
+++ b/utils/TableGen/InstrInfoEmitter.cpp
@@ -94,8 +94,11 @@ InstrInfoEmitter::GetOperandInfo(const CodeGenInstruction &Inst) {
if (OpR->isSubClassOf("RegisterClass"))
Res += getQualifiedName(OpR) + "RegClassID, ";
+ else if (OpR->isSubClassOf("PointerLikeRegClass"))
+ Res += utostr(OpR->getValueAsInt("RegClassKind")) + ", ";
else
Res += "0, ";
+
// Fill in applicable flags.
Res += "0";