aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2012-03-21 05:48:07 +0000
committerJoerg Sonnenberger <joerg@bec.de>2012-03-21 05:48:07 +0000
commit4fd3d292753bd8232a76d5ac6b107f5899e5bfaa (patch)
tree81cc5446da296d25de548dd5fae99bb8cfafd9f8 /test/MC
parent10fa51b950c41e7adcb196ffddff738393ea3460 (diff)
downloadexternal_llvm-4fd3d292753bd8232a76d5ac6b107f5899e5bfaa.zip
external_llvm-4fd3d292753bd8232a76d5ac6b107f5899e5bfaa.tar.gz
external_llvm-4fd3d292753bd8232a76d5ac6b107f5899e5bfaa.tar.bz2
Fix generation of the address size override prefix. Add assertions for
the invalid cases. At least 16bit operand in 64bit mode is currently not rejected in the parser. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153166 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/X86/address-size.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/MC/X86/address-size.s b/test/MC/X86/address-size.s
new file mode 100644
index 0000000..b105b40
--- /dev/null
+++ b/test/MC/X86/address-size.s
@@ -0,0 +1,13 @@
+// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
+
+ .code64
+ movb $0x0, (%esi)
+// CHECK: encoding: [0x67,0xc6,0x06,0x00]
+ movb $0x0, (%rsi)
+// CHECK: encoding: [0xc6,0x06,0x00]
+
+ .code32
+ movb $0x0, (%si)
+// CHECK: encoding: [0x67,0xc6,0x06,0x00]
+ movb $0x0, (%esi)
+// CHECK: encoding: [0xc6,0x06,0x00]