From: Daniel Dunbar Date: Sun, 9 Aug 2009 06:00:04 +0000 (+0000) Subject: Extend comment on ParserMatchClass .td field, and add some missing X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=98164afb019a6c9e92e043fa64b902b9d026c9a9;p=oota-llvm.git Extend comment on ParserMatchClass .td field, and add some missing classes for X86. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78524 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Target/Target.td b/include/llvm/Target/Target.td index 98b41254fc7..3ca7567b783 100644 --- a/include/llvm/Target/Target.td +++ b/include/llvm/Target/Target.td @@ -290,6 +290,11 @@ class Operand { // 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 diff --git a/lib/Target/X86/X86Instr64bit.td b/lib/Target/X86/X86Instr64bit.td index a4decbb93a2..34a77282c9c 100644 --- a/lib/Target/X86/X86Instr64bit.td +++ b/lib/Target/X86/X86Instr64bit.td @@ -33,12 +33,14 @@ def i64i8imm : Operand; def lea64mem : Operand { let PrintMethod = "printlea64mem"; let MIOperandInfo = (ops GR64, i8imm, GR64_NOSP, i32imm); + let ParserMatchClass = "Mem"; } def lea64_32mem : Operand { let PrintMethod = "printlea64_32mem"; let AsmOperandLowerMethod = "lower_lea64_32mem"; let MIOperandInfo = (ops GR32, i8imm, GR32_NOSP, i32imm); + let ParserMatchClass = "Mem"; } //===----------------------------------------------------------------------===// diff --git a/lib/Target/X86/X86InstrSSE.td b/lib/Target/X86/X86InstrSSE.td index fefdba096ab..99d193c23c0 100644 --- a/lib/Target/X86/X86InstrSSE.td +++ b/lib/Target/X86/X86InstrSSE.td @@ -87,10 +87,12 @@ def sse_load_f64 : ComplexPattern { let PrintMethod = "printf32mem"; let MIOperandInfo = (ops ptr_rc, i8imm, ptr_rc_nosp, i32imm, i8imm); + let ParserMatchClass = "Mem"; } def sdmem : Operand { let PrintMethod = "printf64mem"; let MIOperandInfo = (ops ptr_rc, i8imm, ptr_rc_nosp, i32imm, i8imm); + let ParserMatchClass = "Mem"; } //===----------------------------------------------------------------------===//