Extend comment on ParserMatchClass .td field, and add some missing
authorDaniel Dunbar <daniel@zuster.org>
Sun, 9 Aug 2009 06:00:04 +0000 (06:00 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sun, 9 Aug 2009 06:00:04 +0000 (06:00 +0000)
classes for X86.

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

include/llvm/Target/Target.td
lib/Target/X86/X86Instr64bit.td
lib/Target/X86/X86InstrSSE.td

index 98b41254fc7c0f335221bad9677f87201aca2f73..3ca7567b783e9a96d7a403f869c15e86ccd5e420 100644 (file)
@@ -290,6 +290,11 @@ class Operand<ValueType ty> {
   // ParserMatchClass - The "match class" that operands of this type fit
   // in. Match classes are used to define the order in which instructions are
   // match, to ensure that which instructions gets matched is deterministic.
+  //
+  // The target specific parser must be able to classify an parsed operand 
+  // into a unique class, which does not partially overlap with any other 
+  // classes. It can match a subset of some other class, in which case 
+  // ParserMatchSuperClass should be set to the name of that class.
   string ParserMatchClass = "Imm";
 
   // ParserMatchSuperClass - The enclosing super class for this operand (if
index a4decbb93a2dd9de7ce7bc635e060d205e3d092f..34a77282c9c10af52fd03bbfad8fe98cd0685f21 100644 (file)
@@ -33,12 +33,14 @@ def i64i8imm   : Operand<i64>;
 def lea64mem : Operand<i64> {
   let PrintMethod = "printlea64mem";
   let MIOperandInfo = (ops GR64, i8imm, GR64_NOSP, i32imm);
+  let ParserMatchClass = "Mem";
 }
 
 def lea64_32mem : Operand<i32> {
   let PrintMethod = "printlea64_32mem";
   let AsmOperandLowerMethod = "lower_lea64_32mem";
   let MIOperandInfo = (ops GR32, i8imm, GR32_NOSP, i32imm);
+  let ParserMatchClass = "Mem";
 }
 
 //===----------------------------------------------------------------------===//
index fefdba096ab1ec5b506ae7fcc340b45189857f4d..99d193c23c0944d6b9cf27d58c838ccd0e42b6c6 100644 (file)
@@ -87,10 +87,12 @@ def sse_load_f64 : ComplexPattern<v2f64, 5, "SelectScalarSSELoad", [],
 def ssmem : Operand<v4f32> {
   let PrintMethod = "printf32mem";
   let MIOperandInfo = (ops ptr_rc, i8imm, ptr_rc_nosp, i32imm, i8imm);
+  let ParserMatchClass = "Mem";
 }
 def sdmem : Operand<v2f64> {
   let PrintMethod = "printf64mem";
   let MIOperandInfo = (ops ptr_rc, i8imm, ptr_rc_nosp, i32imm, i8imm);
+  let ParserMatchClass = "Mem";
 }
 
 //===----------------------------------------------------------------------===//