[llvm-commits] [llvm] r104270 - in /llvm/trunk: include/llvm/Target/Target.td utils/TableGen/X86RecognizableInstr.cpp

Daniel Dunbar daniel at zuster.org
Thu May 20 13:20:32 PDT 2010


Author: ddunbar
Date: Thu May 20 15:20:32 2010
New Revision: 104270

URL: http://llvm.org/viewvc/llvm-project?rev=104270&view=rev
Log:
tblgen/Target: Add a isAsmParserOnly bit, and teach the disassembler to honor
it.

Modified:
    llvm/trunk/include/llvm/Target/Target.td
    llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp

Modified: llvm/trunk/include/llvm/Target/Target.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/Target.td?rev=104270&r1=104269&r2=104270&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/Target.td (original)
+++ llvm/trunk/include/llvm/Target/Target.td Thu May 20 15:20:32 2010
@@ -221,6 +221,9 @@
   // purposes.
   bit isCodeGenOnly = 0;
 
+  // Is this instruction a pseudo instruction for use by the assembler parser.
+  bit isAsmParserOnly = 0;
+
   InstrItinClass Itinerary = NoItinerary;// Execution steps used for scheduling.
 
   string Constraints = "";  // OperandConstraint, e.g. $src = $dst.

Modified: llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp?rev=104270&r1=104269&r2=104270&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp (original)
+++ llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp Thu May 20 15:20:32 2010
@@ -230,6 +230,10 @@
                                    const CodeGenInstruction &insn,
                                    InstrUID uid)
 {
+  // Ignore "asm parser only" instructions.
+  if (insn.TheDef->getValueAsBit("isAsmParserOnly"))
+    return;
+  
   RecognizableInstr recogInstr(tables, insn, uid);
   
   recogInstr.emitInstructionSpecifier(tables);





More information about the llvm-commits mailing list