OSDN Git Service

Add missing test for r215031
authorReid Kleckner <reid@kleckner.net>
Mon, 11 Aug 2014 18:34:54 +0000 (18:34 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 11 Aug 2014 18:34:54 +0000 (18:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215374 91177308-0d34-0410-b5e6-96231b3b80d8

test/MC/X86/intel-syntax-error.s [new file with mode: 0644]

diff --git a/test/MC/X86/intel-syntax-error.s b/test/MC/X86/intel-syntax-error.s
new file mode 100644 (file)
index 0000000..7207c95
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: not llvm-mc -triple i686-unknown-unknown -x86-asm-syntax=att %s -o /dev/null 2>&1 | FileCheck %s
+
+// This tests weird forms of Intel and AT&T syntax that gas accepts that we
+// don't.  The [no]prefix operand of the syntax directive indicates whether
+// registers need a '%' prefix.
+
+.intel_syntax prefix
+// CHECK: error: '.intel_syntax prefix' is not supported: registers must not have a '%' prefix in .intel_syntax
+_test2:
+       mov     DWORD PTR [%esp - 4], 257
+.att_syntax noprefix
+// CHECK: error: '.att_syntax noprefix' is not supported: registers must have a '%' prefix in .att_syntax
+       movl    $257, -4(esp)