aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-10 18:41:10 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-10 18:41:10 +0000
commit338825c1928b956b2cbcc2c165a60afddd100398 (patch)
treeff202062dddcfe90ec2c604d1094571c44d91902 /lib/Target/X86
parentb2d555b25bee4df71b33bbf9a3d730339b6a4081 (diff)
downloadexternal_llvm-338825c1928b956b2cbcc2c165a60afddd100398.zip
external_llvm-338825c1928b956b2cbcc2c165a60afddd100398.tar.gz
external_llvm-338825c1928b956b2cbcc2c165a60afddd100398.tar.bz2
llvm-mc/AsmMatcher: Change assembler parser match classes to their own record
structure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78581 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r--lib/Target/X86/X86Instr64bit.td4
-rw-r--r--lib/Target/X86/X86InstrInfo.td21
-rw-r--r--lib/Target/X86/X86InstrSSE.td4
3 files changed, 18 insertions, 11 deletions
diff --git a/lib/Target/X86/X86Instr64bit.td b/lib/Target/X86/X86Instr64bit.td
index 34a7728..ef52785 100644
--- a/lib/Target/X86/X86Instr64bit.td
+++ b/lib/Target/X86/X86Instr64bit.td
@@ -33,14 +33,14 @@ def i64i8imm : Operand<i64>;
def lea64mem : Operand<i64> {
let PrintMethod = "printlea64mem";
let MIOperandInfo = (ops GR64, i8imm, GR64_NOSP, i32imm);
- let ParserMatchClass = "Mem";
+ let ParserMatchClass = X86MemAsmOperand;
}
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";
+ let ParserMatchClass = X86MemAsmOperand;
}
//===----------------------------------------------------------------------===//
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td
index 80f03e8..202757b 100644
--- a/lib/Target/X86/X86InstrInfo.td
+++ b/lib/Target/X86/X86InstrInfo.td
@@ -170,10 +170,14 @@ def ptr_rc_nosp : PointerLikeRegClass<1>;
// *mem - Operand definitions for the funky X86 addressing mode operands.
//
+def X86MemAsmOperand : AsmOperandClass {
+ let Name = "Mem";
+ let SuperClass = ImmAsmOperand;
+}
class X86MemOperand<string printMethod> : Operand<iPTR> {
let PrintMethod = printMethod;
let MIOperandInfo = (ops ptr_rc, i8imm, ptr_rc_nosp, i32imm, i8imm);
- let ParserMatchClass = "Mem";
+ let ParserMatchClass = X86MemAsmOperand;
}
def i8mem : X86MemOperand<"printi8mem">;
@@ -193,13 +197,13 @@ def f256mem : X86MemOperand<"printf256mem">;
def i8mem_NOREX : Operand<i64> {
let PrintMethod = "printi8mem";
let MIOperandInfo = (ops GR64_NOREX, i8imm, GR64_NOREX_NOSP, i32imm, i8imm);
- let ParserMatchClass = "Mem";
+ let ParserMatchClass = X86MemAsmOperand;
}
def lea32mem : Operand<i32> {
let PrintMethod = "printlea32mem";
let MIOperandInfo = (ops GR32, i8imm, GR32_NOSP, i32imm);
- let ParserMatchClass = "Mem";
+ let ParserMatchClass = X86MemAsmOperand;
}
def SSECC : Operand<i8> {
@@ -210,16 +214,19 @@ def piclabel: Operand<i32> {
let PrintMethod = "printPICLabel";
}
+def ImmSExt8AsmOperand : AsmOperandClass {
+ let Name = "ImmSExt8";
+ let SuperClass = ImmAsmOperand;
+}
+
// A couple of more descriptive operand definitions.
// 16-bits but only 8 bits are significant.
def i16i8imm : Operand<i16> {
- let ParserMatchClass = "ImmSExt8";
- let ParserMatchSuperClass = "Imm";
+ let ParserMatchClass = ImmSExt8AsmOperand;
}
// 32-bits but only 8 bits are significant.
def i32i8imm : Operand<i32> {
- let ParserMatchClass = "ImmSExt8";
- let ParserMatchSuperClass = "Imm";
+ let ParserMatchClass = ImmSExt8AsmOperand;
}
// Branch targets have OtherVT type and print as pc-relative values.
diff --git a/lib/Target/X86/X86InstrSSE.td b/lib/Target/X86/X86InstrSSE.td
index 99d193c..a0dbe62 100644
--- a/lib/Target/X86/X86InstrSSE.td
+++ b/lib/Target/X86/X86InstrSSE.td
@@ -87,12 +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";
+ let ParserMatchClass = X86MemAsmOperand;
}
def sdmem : Operand<v2f64> {
let PrintMethod = "printf64mem";
let MIOperandInfo = (ops ptr_rc, i8imm, ptr_rc_nosp, i32imm, i8imm);
- let ParserMatchClass = "Mem";
+ let ParserMatchClass = X86MemAsmOperand;
}
//===----------------------------------------------------------------------===//