diff options
author | Chris Lattner <sabre@nondot.org> | 2010-05-06 21:48:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-05-06 21:48:14 +0000 |
commit | e1611f26e332045272923d4e540b055c1c08be4d (patch) | |
tree | 3b7c60ff37013a4034c0d9f585f68eee656a6c1b | |
parent | 1a8b789a4b8290d263c1c75411788ca45bae3230 (diff) |
fix rdar://7947167 - llvm-mc doesn't match movsq
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103199 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86Instr64bit.td | 14 | ||||
-rw-r--r-- | test/MC/AsmParser/X86/x86_64-new-encoder.s | 17 |
2 files changed, 27 insertions, 4 deletions
diff --git a/lib/Target/X86/X86Instr64bit.td b/lib/Target/X86/X86Instr64bit.td index d541bd4cd8..3f41ffd994 100644 --- a/lib/Target/X86/X86Instr64bit.td +++ b/lib/Target/X86/X86Instr64bit.td @@ -309,16 +309,22 @@ def BSR64rm : RI<0xBD, MRMSrcMem, (outs GR64:$dst), (ins i64mem:$src), } // Defs = [EFLAGS] // Repeat string ops -let Defs = [RCX,RDI,RSI], Uses = [RCX,RDI,RSI] in +let Defs = [RCX,RDI,RSI], Uses = [RCX,RDI,RSI], isCodeGenOnly = 1 in def REP_MOVSQ : RI<0xA5, RawFrm, (outs), (ins), "{rep;movsq|rep movsq}", [(X86rep_movs i64)]>, REP; -let Defs = [RCX,RDI], Uses = [RAX,RCX,RDI] in +let Defs = [RCX,RDI], Uses = [RAX,RCX,RDI], isCodeGenOnly = 1 in def REP_STOSQ : RI<0xAB, RawFrm, (outs), (ins), "{rep;stosq|rep stosq}", [(X86rep_stos i64)]>, REP; -def SCAS64 : RI<0xAF, RawFrm, (outs), (ins), "scas{q}", []>; +let Defs = [EDI,ESI], Uses = [EDI,ESI,EFLAGS] in +def MOVSQ : RI<0xA5, RawFrm, (outs), (ins), "movsq", []>; -def CMPS64 : RI<0xA7, RawFrm, (outs), (ins), "cmps{q}", []>; +let Defs = [RCX,RDI], Uses = [RAX,RCX,RDI,EFLAGS] in +def STOSQ : RI<0xAB, RawFrm, (outs), (ins), "stosq", []>; + +def SCAS64 : RI<0xAF, RawFrm, (outs), (ins), "scasq", []>; + +def CMPS64 : RI<0xA7, RawFrm, (outs), (ins), "cmpsq", []>; // Fast system-call instructions def SYSEXIT64 : RI<0x35, RawFrm, diff --git a/test/MC/AsmParser/X86/x86_64-new-encoder.s b/test/MC/AsmParser/X86/x86_64-new-encoder.s index 4028beea74..e2db48495b 100644 --- a/test/MC/AsmParser/X86/x86_64-new-encoder.s +++ b/test/MC/AsmParser/X86/x86_64-new-encoder.s @@ -52,3 +52,20 @@ testq %rax, %rbx // CHECK: cmpq %rbx, %r14 // CHECK: encoding: [0x49,0x39,0xde] cmpq %rbx, %r14 + +// rdar://7947167 + +movsq +// CHECK: movsq +// CHECK: encoding: [0x48,0xa5] + +movsl +// CHECK: movsl +// CHECK: encoding: [0xa5] + +stosq +// CHECK: stosq +// CHECK: encoding: [0x48,0xab] +stosl +// CHECK: stosl +// CHECK: encoding: [0xab] |