[llvm-commits] [llvm] r124271 - in /llvm/trunk/utils/TableGen: CodeGenInstruction.cpp EDEmitter.cpp

NAKAMURA Takumi geek4civic at gmail.com
Tue Jan 25 18:03:48 PST 2011


Author: chapuni
Date: Tue Jan 25 20:03:48 2011
New Revision: 124271

URL: http://llvm.org/viewvc/llvm-project?rev=124271&view=rev
Log:
TableGen: PointerLikeRegClass can be accepted to operand.

Modified:
    llvm/trunk/utils/TableGen/CodeGenInstruction.cpp
    llvm/trunk/utils/TableGen/EDEmitter.cpp

Modified: llvm/trunk/utils/TableGen/CodeGenInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenInstruction.cpp?rev=124271&r1=124270&r2=124271&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenInstruction.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenInstruction.cpp Tue Jan 25 20:03:48 2011
@@ -94,7 +94,8 @@
       isVariadic = true;
       continue;
     } else if (!Rec->isSubClassOf("RegisterClass") &&
-               Rec->getName() != "ptr_rc" && Rec->getName() != "unknown")
+               !Rec->isSubClassOf("PointerLikeRegClass") &&
+               Rec->getName() != "unknown")
       throw "Unknown operand class '" + Rec->getName() +
       "' in '" + R->getName() + "' instruction!";
 

Modified: llvm/trunk/utils/TableGen/EDEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/EDEmitter.cpp?rev=124271&r1=124270&r2=124271&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/EDEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/EDEmitter.cpp Tue Jan 25 20:03:48 2011
@@ -354,7 +354,8 @@
     const CGIOperandList::OperandInfo &operandInfo = inst.Operands[index];
     Record &rec = *operandInfo.Rec;
 
-    if (X86TypeFromOpName(operandTypes[index], rec.getName())) {
+    if (X86TypeFromOpName(operandTypes[index], rec.getName()) &&
+        !rec.isSubClassOf("PointerLikeRegClass")) {
       errs() << "Operand type: " << rec.getName().c_str() << "\n";
       errs() << "Operand name: " << operandInfo.Name.c_str() << "\n";
       errs() << "Instruction name: " << inst.TheDef->getName().c_str() << "\n";





More information about the llvm-commits mailing list