x86-64: bndmk, bndldx, and bndstx don't allow RIP-relative addressing
[deliverable/binutils-gdb.git] / gas / testsuite / gas / i386 / x86-64-mpx.s
1 # MPX instructions
2 .allow_index_reg
3 .text
4 start:
5 ### bndmk
6 bndmk (%r11), %bnd1
7 bndmk (%rax), %bnd1
8 bndmk (0x399), %bnd1
9 bndmk 0x3(%r9), %bnd1
10 bndmk 0x3(%rax), %bnd1
11 bndmk 0x3(,%r12,1), %bnd1
12 bndmk (%rax,%rcx), %bnd1
13 bndmk 0x3(%r11,%rax,1), %bnd1
14 bndmk 0x3(%rbx,%r9,1), %bnd1
15
16 ### bndmov
17 bndmov (%r11), %bnd1
18 bndmov (%rax), %bnd1
19 bndmov (0x399), %bnd1
20 bndmov 0x3(%r9), %bnd2
21 bndmov 0x3(%rax), %bnd2
22 bndmov 0x3(,%r12,1), %bnd0
23 bndmov (%rax,%rdx), %bnd2
24 bndmov 0x3(%r11,%rax,1), %bnd1
25 bndmov 0x3(%rbx,%r9,1), %bnd1
26 bndmov %bnd2, %bnd0
27
28 bndmov %bnd1, (%r11)
29 bndmov %bnd1, (%rax)
30 bndmov %bnd1, (0x399)
31 bndmov %bnd2, 0x3(%r9)
32 bndmov %bnd2, 0x3(%rax)
33 bndmov %bnd0, 0x3(,%r12,1)
34 bndmov %bnd2, (%rax,%rdx)
35 bndmov %bnd1, 0x3(%r11,%rax,1)
36 bndmov %bnd1, 0x3(%rbx,%r9,1)
37 bndmov %bnd0, %bnd2
38
39 ### bndcl
40 bndcl (%r11), %bnd1
41 bndcl (%rax), %bnd1
42 bndcl %r11, %bnd1
43 bndcl %rcx, %bnd1
44 bndcl (0x399), %bnd1
45 bndcl 0x3(%r9), %bnd2
46 bndcl 0x3(%rax), %bnd2
47 bndcl 0x3(,%r12,1), %bnd0
48 bndcl (%rax,%rdx), %bnd2
49 bndcl 0x3(%r11,%rax,1), %bnd1
50 bndcl 0x3(%rbx,%r9,1), %bnd1
51
52 ### bndcu
53 bndcu (%r11), %bnd1
54 bndcu (%rax), %bnd1
55 bndcu %r11, %bnd1
56 bndcu %rcx, %bnd1
57 bndcu (0x399), %bnd1
58 bndcu 0x3(%r9), %bnd2
59 bndcu 0x3(%rax), %bnd2
60 bndcu 0x3(,%r12,1), %bnd0
61 bndcu (%rax,%rdx), %bnd2
62 bndcu 0x3(%r11,%rax,1), %bnd1
63 bndcu 0x3(%rbx,%r9,1), %bnd1
64
65 ### bndcn
66 bndcn (%r11), %bnd1
67 bndcn (%rax), %bnd1
68 bndcn %r11, %bnd1
69 bndcn %rcx, %bnd1
70 bndcn (0x399), %bnd1
71 bndcn 0x3(%r9), %bnd2
72 bndcn 0x3(%rax), %bnd2
73 bndcn 0x3(,%r12,1), %bnd0
74 bndcn (%rax,%rdx), %bnd2
75 bndcn 0x3(%r11,%rax,1), %bnd1
76 bndcn 0x3(%rbx,%r9,1), %bnd1
77
78 ### bndstx
79 bndstx %bnd0, 0x3(%rax,%rbx,1)
80 bndstx %bnd2, 3(%rbx,%rdx)
81 bndstx %bnd3, 0x399(%r12)
82 bndstx %bnd1, 0x1234(%r11)
83 bndstx %bnd2, 0x1234(%rbx)
84 bndstx %bnd2, 3(,%rbx,1)
85 bndstx %bnd2, 3(,%r12,1)
86 bndstx %bnd1, (%rdx)
87
88 ### bndldx
89 bndldx 0x3(%rax,%rbx,1), %bnd0
90 bndldx 3(%rbx,%rdx), %bnd2
91 bndldx 0x399(%r12), %bnd3
92 bndldx 0x1234(%r11), %bnd1
93 bndldx 0x1234(%rbx), %bnd2
94 bndldx 3(,%rbx,1), %bnd2
95 bndldx 3(,%r12,1), %bnd2
96 bndldx (%rdx), %bnd1
97
98 ### bnd
99 bnd call foo
100 bnd call *(%rax)
101 bnd call *(%r11)
102 bnd je foo
103 bnd jmp foo
104 bnd jmp *(%rcx)
105 bnd jmp *(%r12)
106 bnd ret
107
108 .intel_syntax noprefix
109 bndmk bnd1, [r11]
110 bndmk bnd1, [rax]
111 bndmk bnd1, [0x399]
112 bndmk bnd1, [r9+0x3]
113 bndmk bnd1, [rax+0x3]
114 bndmk bnd1, [1*r12+0x3]
115 bndmk bnd1, [rax+rcx]
116 bndmk bnd1, [r11+1*rax+0x3]
117 bndmk bnd1, [rbx+1*r9+0x3]
118
119 ### bndmov
120 bndmov bnd1, [r11]
121 bndmov bnd1, [rax]
122 bndmov bnd1, [0x399]
123 bndmov bnd2, [r9+0x3]
124 bndmov bnd2, [rax+0x3]
125 bndmov bnd0, [1*r12+0x3]
126 bndmov bnd2, [rax+rdx]
127 bndmov bnd1, [r11+1*rax+0x3]
128 bndmov bnd1, [rbx+1*r9+0x3]
129 bndmov bnd0, bnd2
130
131 bndmov [r11], bnd1
132 bndmov [rax], bnd1
133 bndmov [0x399], bnd1
134 bndmov [r9+0x3], bnd2
135 bndmov [rax+0x3], bnd2
136 bndmov [1*r12+0x3], bnd0
137 bndmov [rax+rdx], bnd2
138 bndmov [r11+1*rax+0x3], bnd1
139 bndmov [rbx+1*r9+0x3], bnd1
140 bndmov bnd2, bnd0
141
142 ### bndcl
143 bndcl bnd1, [r11]
144 bndcl bnd1, [rax]
145 bndcl bnd1, r11
146 bndcl bnd1, rcx
147 bndcl bnd1, [0x399]
148 bndcl bnd1, [r9+0x3]
149 bndcl bnd1, [rax+0x3]
150 bndcl bnd1, [1*r12+0x3]
151 bndcl bnd1, [rax+rcx]
152 bndcl bnd1, [r11+1*rax+0x3]
153 bndcl bnd1, [rbx+1*r9+0x3]
154
155 ### bndcu
156 bndcu bnd1, [r11]
157 bndcu bnd1, [rax]
158 bndcu bnd1, r11
159 bndcu bnd1, rcx
160 bndcu bnd1, [0x399]
161 bndcu bnd1, [r9+0x3]
162 bndcu bnd1, [rax+0x3]
163 bndcu bnd1, [1*r12+0x3]
164 bndcu bnd1, [rax+rcx]
165 bndcu bnd1, [r11+1*rax+0x3]
166 bndcu bnd1, [rbx+1*r9+0x3]
167
168 ### bndcn
169 bndcn bnd1, [r11]
170 bndcn bnd1, [rax]
171 bndcn bnd1, r11
172 bndcn bnd1, rcx
173 bndcn bnd1, [0x399]
174 bndcn bnd1, [r9+0x3]
175 bndcn bnd1, [rax+0x3]
176 bndcn bnd1, [1*r9+0x3]
177 bndcn bnd1, [rax+rcx]
178 bndcn bnd1, [r11+1*rax+0x3]
179 bndcn bnd1, [rbx+1*r9+0x3]
180
181 ### bndstx
182 bndstx [rax+rbx*1+0x3], bnd0
183 bndstx [rbx+rdx+3], bnd2
184 bndstx [r12+0x399], bnd3
185 bndstx [r11+0x1234], bnd1
186 bndstx [rbx+0x1234], bnd2
187 bndstx [1*rbx+3], bnd2
188 bndstx [1*r12+3], bnd2
189 bndstx [rdx], bnd1
190
191 ### bndldx
192 bndldx bnd0, [rax+rbx*1+0x3]
193 bndldx bnd2, [rbx+rdx+3]
194 bndldx bnd3, [r12+0x399]
195 bndldx bnd1, [r11+0x1234]
196 bndldx bnd2, [rbx+0x1234]
197 bndldx bnd2, [1*rbx+3]
198 bndldx bnd2, [1*r12+3]
199 bndldx bnd1, [rdx]
200
201 ### bnd
202 bnd call foo
203 bnd call rax
204 bnd call r11
205 bnd je foo
206 bnd jmp foo
207 bnd jmp rcx
208 bnd jmp r12
209 bnd ret
210
211 foo: bnd ret
212
213 bad:
214 # bndldx (%eax),(bad)
215 .byte 0x0f
216 .byte 0x1a
217 .byte 0x30
218
219 # bndmov (bad),%bnd0
220 .byte 0x66
221 .byte 0x0f
222 .byte 0x1a
223 .byte 0xc4
224
225 # bndmk (bad),%bnd0
226 .byte 0xf3
227 .byte 0x0f
228 .byte 0x1b
229 .byte 0x05
230 .long 0x90909090
This page took 0.039803 seconds and 4 git commands to generate.