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