aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/X86
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-01 05:34:34 +0000
committerChris Lattner <sabre@nondot.org>2010-11-01 05:34:34 +0000
commitb501d4f673c0db267a76800339f9943f2ce6fe33 (patch)
treec835a0e3af765525abdaed5808a87ffd40080f56 /test/MC/X86
parentb8d14a6611276181f9fd0d9b2a1243150e4a5739 (diff)
downloadexternal_llvm-b501d4f673c0db267a76800339f9943f2ce6fe33.zip
external_llvm-b501d4f673c0db267a76800339f9943f2ce6fe33.tar.gz
external_llvm-b501d4f673c0db267a76800339f9943f2ce6fe33.tar.bz2
Implement enough of the missing instalias support to get
aliases installed and working. They now work when the matched pattern and the result instruction have exactly the same operand list. This is now enough for us to define proper aliases for movzx and movsx, implementing rdar://8017633 and PR7459. Note that we do not accept instructions like: movzx 0(%rsp), %rsi GAS accepts this instruction, but it doesn't make any sense because we don't know the size of the memory operand. It could be 8/16/32 bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117901 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/X86')
-rw-r--r--test/MC/X86/x86-64.s48
1 files changed, 45 insertions, 3 deletions
diff --git a/test/MC/X86/x86-64.s b/test/MC/X86/x86-64.s
index a115b34..5cc0844 100644
--- a/test/MC/X86/x86-64.s
+++ b/test/MC/X86/x86-64.s
@@ -648,9 +648,51 @@ btq $0x01,%rdx
// CHECK: encoding: [0x48,0x0f,0xb6,0xf0]
movzx %al, %rsi
-// CHECK: movzbq (%rsp), %rsi
-// CHECK: encoding: [0x48,0x0f,0xb6,0x34,0x24]
- movzx 0(%rsp), %rsi
+// CHECK: movsbw %al, %ax
+// CHECK: encoding: [0x66,0x0f,0xbe,0xc0]
+movsx %al, %ax
+
+// CHECK: movsbl %al, %eax
+// CHECK: encoding: [0x0f,0xbe,0xc0]
+movsx %al, %eax
+
+// CHECK: movswl %ax, %eax
+// CHECK: encoding: [0x0f,0xbf,0xc0]
+movsx %ax, %eax
+
+// CHECK: movsbq %bl, %rax
+// CHECK: encoding: [0x48,0x0f,0xbe,0xc3]
+movsx %bl, %rax
+
+// CHECK: movswq %cx, %rax
+// CHECK: encoding: [0x48,0x0f,0xbf,0xc1]
+movsx %cx, %rax
+
+// CHECK: movslq %edi, %rax
+// CHECK: encoding: [0x48,0x63,0xc7]
+movsx %edi, %rax
+
+// CHECK: movzbw %al, %ax
+// CHECK: encoding: [0x66,0x0f,0xb6,0xc0]
+movzx %al, %ax
+
+// CHECK: movzbl %al, %eax
+// CHECK: encoding: [0x0f,0xb6,0xc0]
+movzx %al, %eax
+
+// CHECK: movzwl %ax, %eax
+// CHECK: encoding: [0x0f,0xb7,0xc0]
+movzx %ax, %eax
+
+// CHECK: movzbq %bl, %rax
+// CHECK: encoding: [0x48,0x0f,0xb6,0xc3]
+movzx %bl, %rax
+
+// CHECK: movzwq %cx, %rax
+// CHECK: encoding: [0x48,0x0f,0xb7,0xc1]
+movzx %cx, %rax
+
+
// rdar://7873482