1 // RUN
: not llvm-mc
-triple i686-unknown-unknown
-x86-asm-syntax
=att
%s
-o
/dev
/null
2>&1 | FileCheck
%s
3 // This tests weird forms of Intel
and AT
&T syntax that gas accepts that we
4 // don
't. The [no]prefix operand of the syntax directive indicates whether
5 // registers need a '%' prefix.
8 // CHECK: error: '.intel_syntax prefix' is not supported: registers must not have a '%' prefix in .intel_syntax
10 mov DWORD PTR [%esp - 4], 257
12 // CHECK: error: '.att_syntax noprefix' is not supported: registers must have a '%' prefix in .att_syntax
16 .intel_syntax noprefix
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
27 //CHECK: error: invalid base+index expression
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
35 //CHECK: error: unexpected bracket encountered
40 // CHECK: error: invalid operand for instruction
41 punpcklbw mm0, qword ptr [rsp]
42 // CHECK: error: invalid operand for instruction
43 punpcklwd mm0, word ptr [rsp]
44 // CHECK: error: invalid operand for instruction
45 punpckldq mm0, qword ptr [rsp]
47 // CHECK: error: invalid 16-bit base register
50 // CHECK: invalid base+index expression
53 // CHECK: 16-bit addresses cannot have a scale