]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gas/testsuite/gas/i386/x86-64-inval.s
x86: Check for more than 2 memory references
[thirdparty/binutils-gdb.git] / gas / testsuite / gas / i386 / x86-64-inval.s
CommitLineData
831b02f6 1 .text
5fe308e1 2 .allow_index_reg
831b02f6 3# All the following should be illegal for x86-64
526355d2
NC
4 aaa # illegal
5 aad # illegal
6 aam # illegal
7 aas # illegal
8 arpl %ax,%ax # illegal
9 bound %eax,(%rax) # illegal
831b02f6
NC
10 calll *%eax # 32-bit data size not allowed
11 calll *(%ax) # 32-bit data size not allowed
12 calll *(%eax) # 32-bit data size not allowed
13 calll *(%r8) # 32-bit data size not allowed
14 calll *(%rax) # 32-bit data size not allowed
849830bd 15 callq *(%ax) # no 16-bit addressing
526355d2
NC
16 daa # illegal
17 das # illegal
18 enterl $0,$0 # can't have 32-bit stack operands
19 into # illegal
831b02f6 20foo: jcxz foo # No prefix exists to select CX as a counter
526355d2 21 jmpl *%eax # 32-bit data size not allowed
849830bd
L
22 jmpl *(%ax) # 32-bit data size not allowed
23 jmpl *(%eax) # 32-bit data size not allowed
24 jmpl *(%r8) # 32-bit data size not allowed
25 jmpl *(%rax) # 32-bit data size not allowed
849830bd 26 jmpq *(%ax) # no 16-bit addressing
526355d2
NC
27 lcalll $0,$0 # illegal
28 lcallq $0,$0 # illegal
29 ldsl %eax,(%rax) # illegal
30 ldsq %rax,(%rax) # illegal
31 lesl %eax,(%rax) # illegal
32 lesq %rax,(%rax) # illegal
33 ljmpl $0,$0 # illegal
34 ljmpq $0,$0 # illegal
35 ljmpq *(%rax) # 64-bit data size not allowed
36 loopw foo # No prefix exists to select CX as a counter
37 loopew foo # No prefix exists to select CX as a counter
38 loopnew foo # No prefix exists to select CX as a counter
39 loopnzw foo # No prefix exists to select CX as a counter
40 loopzw foo # No prefix exists to select CX as a counter
41 leavel # can't have 32-bit stack operands
42 pop %ds # illegal
43 pop %es # illegal
44 pop %ss # illegal
45 popa # illegal
831b02f6 46 popl %eax # can't have 32-bit stack operands
526355d2
NC
47 push %cs # illegal
48 push %ds # illegal
49 push %es # illegal
50 push %ss # illegal
51 pusha # illegal
831b02f6
NC
52 pushl %eax # can't have 32-bit stack operands
53 pushfl # can't have 32-bit stack operands
54 popfl # can't have 32-bit stack operands
526355d2 55 retl # can't have 32-bit stack operands
f48ff2ae 56 insertq $4,$2,%xmm2,%ebx # The last operand must be XMM register.
7d5e4556
L
57 fnstsw %eax
58 fnstsw %al
59 fstsw %eax
60 fstsw %al
61 in $8,%rax
62 out %rax,$8
5c07affc
L
63movzxl (%rax),%rax
64movnti %ax, (%rax)
65movntiw %ax, (%rax)
7d5e4556 66
0e1147d9
L
67mov 0x80000000(%rax),%ebx
68mov 0x80000000,%ebx
69
5fe308e1
L
70 add (%rip,%rsi), %eax
71 add (%rsi,%rip), %eax
72 add (,%rip), %eax
73 add (%eip,%esi), %eax
74 add (%esi,%eip), %eax
75 add (,%eip), %eax
76 add (%rsi,%esi), %eax
77 add (%esi,%rsi), %eax
78 add (%eiz), %eax
79 add (%riz), %eax
80 add (%rax), %riz
81 add (%rax), %eiz
82
f5804c90 83 .intel_syntax noprefix
fb9c77c7 84 cmpxchg16b dword ptr [rax] # Must be oword
582d5edd
L
85 movq xmm1, XMMWORD PTR [rsp]
86 movq xmm1, DWORD PTR [rsp]
87 movq xmm1, WORD PTR [rsp]
88 movq xmm1, BYTE PTR [rsp]
89 movq XMMWORD PTR [rsp],xmm1
90 movq DWORD PTR [rsp],xmm1
91 movq WORD PTR [rsp],xmm1
92 movq BYTE PTR [rsp],xmm1
7d5e4556
L
93 fnstsw eax
94 fnstsw al
95 fstsw eax
96 fstsw al
97 in rax,8
98 out 8,rax
5c07affc
L
99movsx ax, [rax]
100movsx eax, [rax]
101movsx rax, [rax]
102movzx ax, [rax]
103movzx eax, [rax]
104movzx rax, [rax]
105movnti word ptr [rax], ax
849830bd
L
106 calld eax # 32-bit data size not allowed
107 calld [ax] # 32-bit data size not allowed
108 calld [eax] # 32-bit data size not allowed
109 calld [r8] # 32-bit data size not allowed
110 calld [rax] # 32-bit data size not allowed
849830bd
L
111 callq [ax] # no 16-bit addressing
112 jmpd eax # 32-bit data size not allowed
113 jmpd [ax] # 32-bit data size not allowed
114 jmpd [eax] # 32-bit data size not allowed
115 jmpd [r8] # 32-bit data size not allowed
116 jmpd [rax] # 32-bit data size not allowed
849830bd 117 jmpq [ax] # no 16-bit addressing
2abc2bec 118 mov eax,[rax+0x876543210] # out of range displacement
1286ab78
L
119
120 .att_syntax prefix
121 movsd (%rsi), %ss:(%rdi), %ss:(%rax)