From 44f63f9335bfb487a2e94cbe20d2950bbdef840e Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 10 Aug 2009 21:06:41 +0000 Subject: [PATCH] llvm-mc/AsmParser: Disambiguate i64i8imm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78598 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86Instr64bit.td | 4 +++- test/MC/AsmParser/x86_instructions.s | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/Target/X86/X86Instr64bit.td b/lib/Target/X86/X86Instr64bit.td index ef52785d5d0..53935689f17 100644 --- a/lib/Target/X86/X86Instr64bit.td +++ b/lib/Target/X86/X86Instr64bit.td @@ -28,7 +28,9 @@ def i64i32imm_pcrel : Operand { // 64-bits but only 8 bits are significant. -def i64i8imm : Operand; +def i64i8imm : Operand { + let ParserMatchClass = ImmSExt8AsmOperand; +} def lea64mem : Operand { let PrintMethod = "printlea64mem"; diff --git a/test/MC/AsmParser/x86_instructions.s b/test/MC/AsmParser/x86_instructions.s index 57d9decaf23..1ddd9e3b380 100644 --- a/test/MC/AsmParser/x86_instructions.s +++ b/test/MC/AsmParser/x86_instructions.s @@ -1,6 +1,6 @@ // FIXME: Switch back to FileCheck once we print actual instructions -// RUN: llvm-mc -triple i386-unknown-unknown %s > %t +// RUN: llvm-mc -triple x86_64-unknown-unknown %s > %t // RUN: grep {MCInst(opcode=.*, operands=.reg:2, reg:0, reg:2.)} %t subb %al, %al @@ -29,4 +29,10 @@ // RUN: grep {MCInst(opcode=.*, operands=.reg:19, reg:0, val:256.)} %t subl $256, %eax +// FIXME: Check that this matches XOR64ri8 +// RUN: grep {MCInst(opcode=.*, operands=.reg:19, reg:0, val:1.)} %t + xorq $1, %eax +// FIXME: Check that this matches XOR64ri32 +// RUN: grep {MCInst(opcode=.*, operands=.reg:19, reg:0, val:256.)} %t + xorq $256, %eax -- 2.34.1