tblgen/Target: Add a isAsmParserOnly bit, and teach the disassembler to honor
authorDaniel Dunbar <daniel@zuster.org>
Thu, 20 May 2010 20:20:32 +0000 (20:20 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 20 May 2010 20:20:32 +0000 (20:20 +0000)
it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104270 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/Target.td
utils/TableGen/X86RecognizableInstr.cpp

index cc19e0de8eb4a76d8172ed9d97be9d0be88ebffb..ee9e83f5d1c23a0958d604ecb7d2255cf33a7644 100644 (file)
@@ -221,6 +221,9 @@ class Instruction {
   // 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.
index 94ed15b0c3751c2019f720522e6f0b02172f77c0..b7085ae6c7b73159e1e0dd77b8ee9d0110afaab0 100644 (file)
@@ -230,6 +230,10 @@ void RecognizableInstr::processInstr(DisassemblerTables &tables,
                                    const CodeGenInstruction &insn,
                                    InstrUID uid)
 {
+  // Ignore "asm parser only" instructions.
+  if (insn.TheDef->getValueAsBit("isAsmParserOnly"))
+    return;
+  
   RecognizableInstr recogInstr(tables, insn, uid);
   
   recogInstr.emitInstructionSpecifier(tables);