Intel syntax: Fix parser match class to check memory operand size.

llvm-svn: 148338
This commit is contained in:
Devang Patel 2012-01-17 21:48:03 +00:00
parent c23e698b5c
commit e03a4f051f
2 changed files with 5 additions and 3 deletions

View File

@ -318,7 +318,7 @@ 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 = X86MemAsmOperand;
let ParserMatchClass = X86Mem8AsmOperand;
let OperandType = "OPERAND_MEMORY";
}
@ -332,7 +332,7 @@ def ptr_rc_tailcall : PointerLikeRegClass<2>;
def i32mem_TC : Operand<i32> {
let PrintMethod = "printi32mem";
let MIOperandInfo = (ops GR32_TC, i8imm, GR32_TC, i32imm, i8imm);
let ParserMatchClass = X86MemAsmOperand;
let ParserMatchClass = X86Mem32AsmOperand;
let OperandType = "OPERAND_MEMORY";
}
@ -343,7 +343,7 @@ def i64mem_TC : Operand<i64> {
let PrintMethod = "printi64mem";
let MIOperandInfo = (ops ptr_rc_tailcall, i8imm,
ptr_rc_tailcall, i32imm, i8imm);
let ParserMatchClass = X86MemAsmOperand;
let ParserMatchClass = X86Mem64AsmOperand;
let OperandType = "OPERAND_MEMORY";
}

View File

@ -25,6 +25,8 @@ _main:
mov EAX, DWORD PTR [RSP + 4*RAX - 24]
// CHECK: movb %dil, (%rdx,%rcx)
mov BYTE PTR [RDX + RCX], DIL
// CHECK: movzwl 2(%rcx), %edi
movzx EDI, WORD PTR [RCX + 2]
// CHECK: callq _test
call _test
ret