summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/X86/intel-syntax-error.s
diff options
context:
space:
mode:
authorNirav Dave <niravd@google.com>2016-08-02 17:56:03 +0000
committerNirav Dave <niravd@google.com>2016-08-02 17:56:03 +0000
commit8601ac11aa301bd62f6de7a311fc8d7b9796ba95 (patch)
treedba0ec927bc29e54f13ed07a51a38c6ae8d53225 /llvm/test/MC/X86/intel-syntax-error.s
parentca2f9d1cb2f806e127a62f3ddef1c61f1402f680 (diff)
downloadbcm5719-llvm-8601ac11aa301bd62f6de7a311fc8d7b9796ba95.tar.gz
bcm5719-llvm-8601ac11aa301bd62f6de7a311fc8d7b9796ba95.zip
[MC] Fix Intel Operand assembly parsing for .set ids
Recommitting after fixing overaggressive fastpath return in parsing. Fix intel syntax special case identifier operands that refer to a constant (e.g. .set <ID> n) to be interpreted as immediate not memory in parsing. Associated commit to fix clang test commited shortly. Reviewers: rnk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D22585 llvm-svn: 277489
Diffstat (limited to 'llvm/test/MC/X86/intel-syntax-error.s')
-rw-r--r--llvm/test/MC/X86/intel-syntax-error.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/MC/X86/intel-syntax-error.s b/llvm/test/MC/X86/intel-syntax-error.s
index 7207c952aba..41b068eb3a1 100644
--- a/llvm/test/MC/X86/intel-syntax-error.s
+++ b/llvm/test/MC/X86/intel-syntax-error.s
@@ -11,3 +11,16 @@ _test2:
.att_syntax noprefix
// CHECK: error: '.att_syntax noprefix' is not supported: registers must have a '%' prefix in .att_syntax
movl $257, -4(esp)
+
+
+.intel_syntax noprefix
+
+.global arr
+.global i
+.set FOO, 2
+//CHECK-STDERR: error: cannot use base register with variable reference
+mov eax, DWORD PTR arr[ebp + 1 + (2 * 5) - 3 + 1<<1]
+//CHECK-STDERR: error: cannot use index register with variable reference
+mov eax, DWORD PTR arr[esi*4]
+//CHECK-STDERR: error: cannot use more than one symbol in memory operand
+mov eax, DWORD PTR arr[i]
OpenPOWER on IntegriCloud