summaryrefslogtreecommitdiff
path: root/test/MC/X86
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2014-01-22 15:08:27 +0000
committerDavid Woodhouse <dwmw2@infradead.org>2014-01-22 15:08:27 +0000
commit6abfcfe1555fb8e95eb7b2c3189785b9e5ed817d (patch)
tree590fd6ee29f0b71e2392b71efa869468d55bdf5e /test/MC/X86
parentccbfd5b18a79a07229f11af478843eae16ac9b26 (diff)
[x86] Allow address-size overrides for SCAS{8,16,32,64} (PR9385)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199805 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/X86')
-rw-r--r--test/MC/X86/index-operations.s20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/MC/X86/index-operations.s b/test/MC/X86/index-operations.s
index ffad9596c83..f1ccfe817cd 100644
--- a/test/MC/X86/index-operations.s
+++ b/test/MC/X86/index-operations.s
@@ -74,3 +74,23 @@ stos %rax, (%edi)
// 64: stosq %rax, %es:(%edi) # encoding: [0x48,0x67,0xab]
// ERR32: only available in 64-bit mode
// ERR16: only available in 64-bit mode
+
+scas %es:(%edi), %al
+// 64: scasb %es:(%edi), %al # encoding: [0x67,0xae]
+// 32: scasb %es:(%edi), %al # encoding: [0xae]
+// 16: scasb %es:(%edi), %al # encoding: [0x67,0xae]
+
+scasq %es:(%edi)
+// 64: scasq %es:(%edi), %rax # encoding: [0x48,0x67,0xaf]
+// ERR32: 64-bit
+// ERR16: 64-bit
+
+scasl %es:(%edi), %al
+// ERR64: invalid operand
+// ERR32: invalid operand
+// ERR16: invalid operand
+
+scas %es:(%di), %ax
+// ERR64: invalid 16-bit base register
+// 16: scasw %es:(%di), %ax # encoding: [0xaf]
+// 32: scasw %es:(%di), %ax # encoding: [0x66,0x67,0xaf]