From c3b9d471f638f54be80003e870a09e7bd52d7277 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 24 Feb 2015 08:02:13 +0000 Subject: [PATCH] [X86] Remove the AbsMem32 type from the assembly parser. Only really need the 16-bit version which will automatically get prioritized over AbsMem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230313 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/AsmParser/X86Operand.h | 4 ---- lib/Target/X86/X86InstrInfo.td | 10 ++-------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/Target/X86/AsmParser/X86Operand.h b/lib/Target/X86/AsmParser/X86Operand.h index ac4c0435720..d67e1197117 100644 --- a/lib/Target/X86/AsmParser/X86Operand.h +++ b/lib/Target/X86/AsmParser/X86Operand.h @@ -265,10 +265,6 @@ struct X86Operand : public MCParsedAsmOperand { return isAbsMem() && Mem.ModeSize == 16; } - bool isAbsMem32() const { - return isAbsMem() && Mem.ModeSize != 16; - } - bool isSrcIdx() const { return !getMemIndexReg() && getMemScale() == 1 && (getMemBaseReg() == X86::RSI || getMemBaseReg() == X86::ESI || diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td index 2aa35b646b3..7ab8822ff31 100644 --- a/lib/Target/X86/X86InstrInfo.td +++ b/lib/Target/X86/X86InstrInfo.td @@ -383,25 +383,19 @@ def brtarget8 : Operand; } -// Special parsers to detect mode to disambiguate. +// Special parser to detect 16-bit mode to select 16-bit displacement. def X86AbsMem16AsmOperand : AsmOperandClass { let Name = "AbsMem16"; let RenderMethod = "addAbsMemOperands"; let SuperClasses = [X86AbsMemAsmOperand]; } -def X86AbsMem32AsmOperand : AsmOperandClass { - let Name = "AbsMem32"; - let RenderMethod = "addAbsMemOperands"; - let SuperClasses = [X86AbsMemAsmOperand]; -} - // Branch targets have OtherVT type and print as pc-relative values. let OperandType = "OPERAND_PCREL", PrintMethod = "printPCRelImm" in { let ParserMatchClass = X86AbsMem16AsmOperand in def brtarget16 : Operand; -let ParserMatchClass = X86AbsMem32AsmOperand in +let ParserMatchClass = X86AbsMemAsmOperand in def brtarget32 : Operand; }