77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 // RUN: not llvm-mc -triple i686-unknown-unknown -x86-asm-syntax=att %s -o /dev/null 2>&1 | FileCheck %s
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 // This tests weird forms of Intel and AT&T syntax that gas accepts that we
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 // don't. The [no]prefix operand of the syntax directive indicates whether
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 // registers need a '%' prefix.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 .intel_syntax prefix
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 // CHECK: error: '.intel_syntax prefix' is not supported: registers must not have a '%' prefix in .intel_syntax
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 _test2:
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 mov DWORD PTR [%esp - 4], 257
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 .att_syntax noprefix
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 // CHECK: error: '.att_syntax noprefix' is not supported: registers must have a '%' prefix in .att_syntax
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
13 movl $257, -4(esp)
|
120
|
14
|
|
15
|
|
16 .intel_syntax noprefix
|
|
17
|
|
18 .global arr
|
|
19 .global i
|
|
20 .set FOO, 2
|
121
|
21
|
120
|
22 //CHECK: error: cannot use more than one symbol in memory operand
|
|
23 mov eax, DWORD PTR arr[i]
|
|
24 //CHECK: error: rip can only be used as a base register
|
|
25 .code64
|
|
26 mov rax, rip
|
|
27 //CHECK: error: invalid base+index expression
|
|
28 mov rbx, [rax+rip]
|
121
|
29 //CHECK: error: scale factor in address must be 1, 2, 4 or 8
|
|
30 lea RDX, [unknown_number * RAX + RBX + _foo]
|
|
31 //CHECK: error: BaseReg/IndexReg already set!
|
|
32 lea RDX, [4 * RAX + 27 * RBX + _pat]
|
|
33 //CHECK: error: unexpected bracket encountered
|
|
34 lea RDX, [[arr]
|
|
35 //CHECK: error: unexpected bracket encountered
|
|
36 lea RDX, [arr[]
|