diff options
author | Kevin Enderby <enderby@apple.com> | 2010-05-28 21:20:21 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2010-05-28 21:20:21 +0000 |
commit | 31cc9655b681c1b9b0a199131588377ce578ec0d (patch) | |
tree | 2edd40d20c8802c2d396e8e07949f809783ffeee | |
parent | 5e394429ab0a51af87056fbdaceeae879e651963 (diff) | |
download | external_llvm-31cc9655b681c1b9b0a199131588377ce578ec0d.zip external_llvm-31cc9655b681c1b9b0a199131588377ce578ec0d.tar.gz external_llvm-31cc9655b681c1b9b0a199131588377ce578ec0d.tar.bz2 |
MC/X86: Add alias for movzx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105005 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/AsmParser/X86AsmParser.cpp | 1 | ||||
-rw-r--r-- | test/MC/AsmParser/X86/x86_64-new-encoder.s | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index fe10598..ac4d4e9 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -645,6 +645,7 @@ ParseInstruction(const StringRef &Name, SMLoc NameLoc, .Case("cmovnzl", "cmovnel") .Case("cmovzl", "cmovel") .Case("fwait", "wait") + .Case("movzx", "movzb") .Default(Name); // FIXME: Hack to recognize cmp<comparison code>{ss,sd,ps,pd}. diff --git a/test/MC/AsmParser/X86/x86_64-new-encoder.s b/test/MC/AsmParser/X86/x86_64-new-encoder.s index 6988110..0c8ee89 100644 --- a/test/MC/AsmParser/X86/x86_64-new-encoder.s +++ b/test/MC/AsmParser/X86/x86_64-new-encoder.s @@ -131,3 +131,16 @@ movl 0, %eax // CHECK: movl 0, %eax # encoding: [0x8b,0x04,0x25,A,A,A,A] btq $0x01,%rdx // CHECK: btq $1, %rdx // CHECK: encoding: [0x48,0x0f,0xba,0xe2,0x01] + +//rdar://8017633 +// CHECK: movzbl %al, %esi +// CHECK: encoding: [0x0f,0xb6,0xf0] + movzx %al, %esi + +// CHECK: movzbq %al, %rsi +// CHECK: encoding: [0x48,0x0f,0xb6,0xf0] + movzx %al, %rsi + +// CHECK: movzbq (%rsp), %rsi +// CHECK: encoding: [0x48,0x0f,0xb6,0x34,0x24] + movzx 0(%rsp), %rsi |