asmkit/x86/features/CMOV.rs
1use crate::x86::assembler::*;
2use crate::x86::operands::*;
3use super::super::opcodes::*;
4use crate::core::emitter::*;
5use crate::core::operand::*;
6
7/// A dummy operand that represents no register. Here just for simplicity.
8const NOREG: Operand = Operand::new();
9
10/// `CMOVA` (CMOVA).
11/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
12///
13///
14/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
15///
16/// Supported operand variants:
17///
18/// ```text
19/// +---+----------+
20/// | # | Operands |
21/// +---+----------+
22/// | 1 | Gpd, Gpd |
23/// | 2 | Gpd, Mem |
24/// | 3 | Gpq, Gpq |
25/// | 4 | Gpq, Mem |
26/// | 5 | Gpw, Gpw |
27/// | 6 | Gpw, Mem |
28/// +---+----------+
29/// ```
30pub trait CmovaEmitter<A, B> {
31 fn cmova(&mut self, op0: A, op1: B);
32}
33
34impl<'a> CmovaEmitter<Gpw, Gpw> for Assembler<'a> {
35 fn cmova(&mut self, op0: Gpw, op1: Gpw) {
36 self.emit(CMOVA16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
37 }
38}
39
40impl<'a> CmovaEmitter<Gpw, Mem> for Assembler<'a> {
41 fn cmova(&mut self, op0: Gpw, op1: Mem) {
42 self.emit(CMOVA16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
43 }
44}
45
46impl<'a> CmovaEmitter<Gpd, Gpd> for Assembler<'a> {
47 fn cmova(&mut self, op0: Gpd, op1: Gpd) {
48 self.emit(CMOVA32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
49 }
50}
51
52impl<'a> CmovaEmitter<Gpd, Mem> for Assembler<'a> {
53 fn cmova(&mut self, op0: Gpd, op1: Mem) {
54 self.emit(CMOVA32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
55 }
56}
57
58impl<'a> CmovaEmitter<Gpq, Gpq> for Assembler<'a> {
59 fn cmova(&mut self, op0: Gpq, op1: Gpq) {
60 self.emit(CMOVA64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
61 }
62}
63
64impl<'a> CmovaEmitter<Gpq, Mem> for Assembler<'a> {
65 fn cmova(&mut self, op0: Gpq, op1: Mem) {
66 self.emit(CMOVA64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
67 }
68}
69
70/// `CMOVBE` (CMOVBE).
71/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
72///
73///
74/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
75///
76/// Supported operand variants:
77///
78/// ```text
79/// +---+----------+
80/// | # | Operands |
81/// +---+----------+
82/// | 1 | Gpd, Gpd |
83/// | 2 | Gpd, Mem |
84/// | 3 | Gpq, Gpq |
85/// | 4 | Gpq, Mem |
86/// | 5 | Gpw, Gpw |
87/// | 6 | Gpw, Mem |
88/// +---+----------+
89/// ```
90pub trait CmovbeEmitter<A, B> {
91 fn cmovbe(&mut self, op0: A, op1: B);
92}
93
94impl<'a> CmovbeEmitter<Gpw, Gpw> for Assembler<'a> {
95 fn cmovbe(&mut self, op0: Gpw, op1: Gpw) {
96 self.emit(CMOVBE16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
97 }
98}
99
100impl<'a> CmovbeEmitter<Gpw, Mem> for Assembler<'a> {
101 fn cmovbe(&mut self, op0: Gpw, op1: Mem) {
102 self.emit(CMOVBE16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
103 }
104}
105
106impl<'a> CmovbeEmitter<Gpd, Gpd> for Assembler<'a> {
107 fn cmovbe(&mut self, op0: Gpd, op1: Gpd) {
108 self.emit(CMOVBE32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
109 }
110}
111
112impl<'a> CmovbeEmitter<Gpd, Mem> for Assembler<'a> {
113 fn cmovbe(&mut self, op0: Gpd, op1: Mem) {
114 self.emit(CMOVBE32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
115 }
116}
117
118impl<'a> CmovbeEmitter<Gpq, Gpq> for Assembler<'a> {
119 fn cmovbe(&mut self, op0: Gpq, op1: Gpq) {
120 self.emit(CMOVBE64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
121 }
122}
123
124impl<'a> CmovbeEmitter<Gpq, Mem> for Assembler<'a> {
125 fn cmovbe(&mut self, op0: Gpq, op1: Mem) {
126 self.emit(CMOVBE64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
127 }
128}
129
130/// `CMOVC` (CMOVC).
131/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
132///
133///
134/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
135///
136/// Supported operand variants:
137///
138/// ```text
139/// +---+----------+
140/// | # | Operands |
141/// +---+----------+
142/// | 1 | Gpd, Gpd |
143/// | 2 | Gpd, Mem |
144/// | 3 | Gpq, Gpq |
145/// | 4 | Gpq, Mem |
146/// | 5 | Gpw, Gpw |
147/// | 6 | Gpw, Mem |
148/// +---+----------+
149/// ```
150pub trait CmovcEmitter<A, B> {
151 fn cmovc(&mut self, op0: A, op1: B);
152}
153
154impl<'a> CmovcEmitter<Gpw, Gpw> for Assembler<'a> {
155 fn cmovc(&mut self, op0: Gpw, op1: Gpw) {
156 self.emit(CMOVC16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
157 }
158}
159
160impl<'a> CmovcEmitter<Gpw, Mem> for Assembler<'a> {
161 fn cmovc(&mut self, op0: Gpw, op1: Mem) {
162 self.emit(CMOVC16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
163 }
164}
165
166impl<'a> CmovcEmitter<Gpd, Gpd> for Assembler<'a> {
167 fn cmovc(&mut self, op0: Gpd, op1: Gpd) {
168 self.emit(CMOVC32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
169 }
170}
171
172impl<'a> CmovcEmitter<Gpd, Mem> for Assembler<'a> {
173 fn cmovc(&mut self, op0: Gpd, op1: Mem) {
174 self.emit(CMOVC32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
175 }
176}
177
178impl<'a> CmovcEmitter<Gpq, Gpq> for Assembler<'a> {
179 fn cmovc(&mut self, op0: Gpq, op1: Gpq) {
180 self.emit(CMOVC64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
181 }
182}
183
184impl<'a> CmovcEmitter<Gpq, Mem> for Assembler<'a> {
185 fn cmovc(&mut self, op0: Gpq, op1: Mem) {
186 self.emit(CMOVC64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
187 }
188}
189
190/// `CMOVG` (CMOVG).
191/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
192///
193///
194/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
195///
196/// Supported operand variants:
197///
198/// ```text
199/// +---+----------+
200/// | # | Operands |
201/// +---+----------+
202/// | 1 | Gpd, Gpd |
203/// | 2 | Gpd, Mem |
204/// | 3 | Gpq, Gpq |
205/// | 4 | Gpq, Mem |
206/// | 5 | Gpw, Gpw |
207/// | 6 | Gpw, Mem |
208/// +---+----------+
209/// ```
210pub trait CmovgEmitter<A, B> {
211 fn cmovg(&mut self, op0: A, op1: B);
212}
213
214impl<'a> CmovgEmitter<Gpw, Gpw> for Assembler<'a> {
215 fn cmovg(&mut self, op0: Gpw, op1: Gpw) {
216 self.emit(CMOVG16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
217 }
218}
219
220impl<'a> CmovgEmitter<Gpw, Mem> for Assembler<'a> {
221 fn cmovg(&mut self, op0: Gpw, op1: Mem) {
222 self.emit(CMOVG16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
223 }
224}
225
226impl<'a> CmovgEmitter<Gpd, Gpd> for Assembler<'a> {
227 fn cmovg(&mut self, op0: Gpd, op1: Gpd) {
228 self.emit(CMOVG32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
229 }
230}
231
232impl<'a> CmovgEmitter<Gpd, Mem> for Assembler<'a> {
233 fn cmovg(&mut self, op0: Gpd, op1: Mem) {
234 self.emit(CMOVG32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
235 }
236}
237
238impl<'a> CmovgEmitter<Gpq, Gpq> for Assembler<'a> {
239 fn cmovg(&mut self, op0: Gpq, op1: Gpq) {
240 self.emit(CMOVG64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
241 }
242}
243
244impl<'a> CmovgEmitter<Gpq, Mem> for Assembler<'a> {
245 fn cmovg(&mut self, op0: Gpq, op1: Mem) {
246 self.emit(CMOVG64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
247 }
248}
249
250/// `CMOVGE` (CMOVGE).
251/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
252///
253///
254/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
255///
256/// Supported operand variants:
257///
258/// ```text
259/// +---+----------+
260/// | # | Operands |
261/// +---+----------+
262/// | 1 | Gpd, Gpd |
263/// | 2 | Gpd, Mem |
264/// | 3 | Gpq, Gpq |
265/// | 4 | Gpq, Mem |
266/// | 5 | Gpw, Gpw |
267/// | 6 | Gpw, Mem |
268/// +---+----------+
269/// ```
270pub trait CmovgeEmitter<A, B> {
271 fn cmovge(&mut self, op0: A, op1: B);
272}
273
274impl<'a> CmovgeEmitter<Gpw, Gpw> for Assembler<'a> {
275 fn cmovge(&mut self, op0: Gpw, op1: Gpw) {
276 self.emit(CMOVGE16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
277 }
278}
279
280impl<'a> CmovgeEmitter<Gpw, Mem> for Assembler<'a> {
281 fn cmovge(&mut self, op0: Gpw, op1: Mem) {
282 self.emit(CMOVGE16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
283 }
284}
285
286impl<'a> CmovgeEmitter<Gpd, Gpd> for Assembler<'a> {
287 fn cmovge(&mut self, op0: Gpd, op1: Gpd) {
288 self.emit(CMOVGE32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
289 }
290}
291
292impl<'a> CmovgeEmitter<Gpd, Mem> for Assembler<'a> {
293 fn cmovge(&mut self, op0: Gpd, op1: Mem) {
294 self.emit(CMOVGE32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
295 }
296}
297
298impl<'a> CmovgeEmitter<Gpq, Gpq> for Assembler<'a> {
299 fn cmovge(&mut self, op0: Gpq, op1: Gpq) {
300 self.emit(CMOVGE64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
301 }
302}
303
304impl<'a> CmovgeEmitter<Gpq, Mem> for Assembler<'a> {
305 fn cmovge(&mut self, op0: Gpq, op1: Mem) {
306 self.emit(CMOVGE64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
307 }
308}
309
310/// `CMOVL` (CMOVL).
311/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
312///
313///
314/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
315///
316/// Supported operand variants:
317///
318/// ```text
319/// +---+----------+
320/// | # | Operands |
321/// +---+----------+
322/// | 1 | Gpd, Gpd |
323/// | 2 | Gpd, Mem |
324/// | 3 | Gpq, Gpq |
325/// | 4 | Gpq, Mem |
326/// | 5 | Gpw, Gpw |
327/// | 6 | Gpw, Mem |
328/// +---+----------+
329/// ```
330pub trait CmovlEmitter<A, B> {
331 fn cmovl(&mut self, op0: A, op1: B);
332}
333
334impl<'a> CmovlEmitter<Gpw, Gpw> for Assembler<'a> {
335 fn cmovl(&mut self, op0: Gpw, op1: Gpw) {
336 self.emit(CMOVL16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
337 }
338}
339
340impl<'a> CmovlEmitter<Gpw, Mem> for Assembler<'a> {
341 fn cmovl(&mut self, op0: Gpw, op1: Mem) {
342 self.emit(CMOVL16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
343 }
344}
345
346impl<'a> CmovlEmitter<Gpd, Gpd> for Assembler<'a> {
347 fn cmovl(&mut self, op0: Gpd, op1: Gpd) {
348 self.emit(CMOVL32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
349 }
350}
351
352impl<'a> CmovlEmitter<Gpd, Mem> for Assembler<'a> {
353 fn cmovl(&mut self, op0: Gpd, op1: Mem) {
354 self.emit(CMOVL32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
355 }
356}
357
358impl<'a> CmovlEmitter<Gpq, Gpq> for Assembler<'a> {
359 fn cmovl(&mut self, op0: Gpq, op1: Gpq) {
360 self.emit(CMOVL64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
361 }
362}
363
364impl<'a> CmovlEmitter<Gpq, Mem> for Assembler<'a> {
365 fn cmovl(&mut self, op0: Gpq, op1: Mem) {
366 self.emit(CMOVL64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
367 }
368}
369
370/// `CMOVLE` (CMOVLE).
371/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
372///
373///
374/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
375///
376/// Supported operand variants:
377///
378/// ```text
379/// +---+----------+
380/// | # | Operands |
381/// +---+----------+
382/// | 1 | Gpd, Gpd |
383/// | 2 | Gpd, Mem |
384/// | 3 | Gpq, Gpq |
385/// | 4 | Gpq, Mem |
386/// | 5 | Gpw, Gpw |
387/// | 6 | Gpw, Mem |
388/// +---+----------+
389/// ```
390pub trait CmovleEmitter<A, B> {
391 fn cmovle(&mut self, op0: A, op1: B);
392}
393
394impl<'a> CmovleEmitter<Gpw, Gpw> for Assembler<'a> {
395 fn cmovle(&mut self, op0: Gpw, op1: Gpw) {
396 self.emit(CMOVLE16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
397 }
398}
399
400impl<'a> CmovleEmitter<Gpw, Mem> for Assembler<'a> {
401 fn cmovle(&mut self, op0: Gpw, op1: Mem) {
402 self.emit(CMOVLE16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
403 }
404}
405
406impl<'a> CmovleEmitter<Gpd, Gpd> for Assembler<'a> {
407 fn cmovle(&mut self, op0: Gpd, op1: Gpd) {
408 self.emit(CMOVLE32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
409 }
410}
411
412impl<'a> CmovleEmitter<Gpd, Mem> for Assembler<'a> {
413 fn cmovle(&mut self, op0: Gpd, op1: Mem) {
414 self.emit(CMOVLE32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
415 }
416}
417
418impl<'a> CmovleEmitter<Gpq, Gpq> for Assembler<'a> {
419 fn cmovle(&mut self, op0: Gpq, op1: Gpq) {
420 self.emit(CMOVLE64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
421 }
422}
423
424impl<'a> CmovleEmitter<Gpq, Mem> for Assembler<'a> {
425 fn cmovle(&mut self, op0: Gpq, op1: Mem) {
426 self.emit(CMOVLE64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
427 }
428}
429
430/// `CMOVNC` (CMOVNC).
431/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
432///
433///
434/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
435///
436/// Supported operand variants:
437///
438/// ```text
439/// +---+----------+
440/// | # | Operands |
441/// +---+----------+
442/// | 1 | Gpd, Gpd |
443/// | 2 | Gpd, Mem |
444/// | 3 | Gpq, Gpq |
445/// | 4 | Gpq, Mem |
446/// | 5 | Gpw, Gpw |
447/// | 6 | Gpw, Mem |
448/// +---+----------+
449/// ```
450pub trait CmovncEmitter<A, B> {
451 fn cmovnc(&mut self, op0: A, op1: B);
452}
453
454impl<'a> CmovncEmitter<Gpw, Gpw> for Assembler<'a> {
455 fn cmovnc(&mut self, op0: Gpw, op1: Gpw) {
456 self.emit(CMOVNC16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
457 }
458}
459
460impl<'a> CmovncEmitter<Gpw, Mem> for Assembler<'a> {
461 fn cmovnc(&mut self, op0: Gpw, op1: Mem) {
462 self.emit(CMOVNC16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
463 }
464}
465
466impl<'a> CmovncEmitter<Gpd, Gpd> for Assembler<'a> {
467 fn cmovnc(&mut self, op0: Gpd, op1: Gpd) {
468 self.emit(CMOVNC32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
469 }
470}
471
472impl<'a> CmovncEmitter<Gpd, Mem> for Assembler<'a> {
473 fn cmovnc(&mut self, op0: Gpd, op1: Mem) {
474 self.emit(CMOVNC32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
475 }
476}
477
478impl<'a> CmovncEmitter<Gpq, Gpq> for Assembler<'a> {
479 fn cmovnc(&mut self, op0: Gpq, op1: Gpq) {
480 self.emit(CMOVNC64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
481 }
482}
483
484impl<'a> CmovncEmitter<Gpq, Mem> for Assembler<'a> {
485 fn cmovnc(&mut self, op0: Gpq, op1: Mem) {
486 self.emit(CMOVNC64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
487 }
488}
489
490/// `CMOVNO` (CMOVNO).
491/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
492///
493///
494/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
495///
496/// Supported operand variants:
497///
498/// ```text
499/// +---+----------+
500/// | # | Operands |
501/// +---+----------+
502/// | 1 | Gpd, Gpd |
503/// | 2 | Gpd, Mem |
504/// | 3 | Gpq, Gpq |
505/// | 4 | Gpq, Mem |
506/// | 5 | Gpw, Gpw |
507/// | 6 | Gpw, Mem |
508/// +---+----------+
509/// ```
510pub trait CmovnoEmitter<A, B> {
511 fn cmovno(&mut self, op0: A, op1: B);
512}
513
514impl<'a> CmovnoEmitter<Gpw, Gpw> for Assembler<'a> {
515 fn cmovno(&mut self, op0: Gpw, op1: Gpw) {
516 self.emit(CMOVNO16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
517 }
518}
519
520impl<'a> CmovnoEmitter<Gpw, Mem> for Assembler<'a> {
521 fn cmovno(&mut self, op0: Gpw, op1: Mem) {
522 self.emit(CMOVNO16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
523 }
524}
525
526impl<'a> CmovnoEmitter<Gpd, Gpd> for Assembler<'a> {
527 fn cmovno(&mut self, op0: Gpd, op1: Gpd) {
528 self.emit(CMOVNO32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
529 }
530}
531
532impl<'a> CmovnoEmitter<Gpd, Mem> for Assembler<'a> {
533 fn cmovno(&mut self, op0: Gpd, op1: Mem) {
534 self.emit(CMOVNO32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
535 }
536}
537
538impl<'a> CmovnoEmitter<Gpq, Gpq> for Assembler<'a> {
539 fn cmovno(&mut self, op0: Gpq, op1: Gpq) {
540 self.emit(CMOVNO64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
541 }
542}
543
544impl<'a> CmovnoEmitter<Gpq, Mem> for Assembler<'a> {
545 fn cmovno(&mut self, op0: Gpq, op1: Mem) {
546 self.emit(CMOVNO64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
547 }
548}
549
550/// `CMOVNP` (CMOVNP).
551/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
552///
553///
554/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
555///
556/// Supported operand variants:
557///
558/// ```text
559/// +---+----------+
560/// | # | Operands |
561/// +---+----------+
562/// | 1 | Gpd, Gpd |
563/// | 2 | Gpd, Mem |
564/// | 3 | Gpq, Gpq |
565/// | 4 | Gpq, Mem |
566/// | 5 | Gpw, Gpw |
567/// | 6 | Gpw, Mem |
568/// +---+----------+
569/// ```
570pub trait CmovnpEmitter<A, B> {
571 fn cmovnp(&mut self, op0: A, op1: B);
572}
573
574impl<'a> CmovnpEmitter<Gpw, Gpw> for Assembler<'a> {
575 fn cmovnp(&mut self, op0: Gpw, op1: Gpw) {
576 self.emit(CMOVNP16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
577 }
578}
579
580impl<'a> CmovnpEmitter<Gpw, Mem> for Assembler<'a> {
581 fn cmovnp(&mut self, op0: Gpw, op1: Mem) {
582 self.emit(CMOVNP16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
583 }
584}
585
586impl<'a> CmovnpEmitter<Gpd, Gpd> for Assembler<'a> {
587 fn cmovnp(&mut self, op0: Gpd, op1: Gpd) {
588 self.emit(CMOVNP32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
589 }
590}
591
592impl<'a> CmovnpEmitter<Gpd, Mem> for Assembler<'a> {
593 fn cmovnp(&mut self, op0: Gpd, op1: Mem) {
594 self.emit(CMOVNP32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
595 }
596}
597
598impl<'a> CmovnpEmitter<Gpq, Gpq> for Assembler<'a> {
599 fn cmovnp(&mut self, op0: Gpq, op1: Gpq) {
600 self.emit(CMOVNP64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
601 }
602}
603
604impl<'a> CmovnpEmitter<Gpq, Mem> for Assembler<'a> {
605 fn cmovnp(&mut self, op0: Gpq, op1: Mem) {
606 self.emit(CMOVNP64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
607 }
608}
609
610/// `CMOVNS` (CMOVNS).
611/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
612///
613///
614/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
615///
616/// Supported operand variants:
617///
618/// ```text
619/// +---+----------+
620/// | # | Operands |
621/// +---+----------+
622/// | 1 | Gpd, Gpd |
623/// | 2 | Gpd, Mem |
624/// | 3 | Gpq, Gpq |
625/// | 4 | Gpq, Mem |
626/// | 5 | Gpw, Gpw |
627/// | 6 | Gpw, Mem |
628/// +---+----------+
629/// ```
630pub trait CmovnsEmitter<A, B> {
631 fn cmovns(&mut self, op0: A, op1: B);
632}
633
634impl<'a> CmovnsEmitter<Gpw, Gpw> for Assembler<'a> {
635 fn cmovns(&mut self, op0: Gpw, op1: Gpw) {
636 self.emit(CMOVNS16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
637 }
638}
639
640impl<'a> CmovnsEmitter<Gpw, Mem> for Assembler<'a> {
641 fn cmovns(&mut self, op0: Gpw, op1: Mem) {
642 self.emit(CMOVNS16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
643 }
644}
645
646impl<'a> CmovnsEmitter<Gpd, Gpd> for Assembler<'a> {
647 fn cmovns(&mut self, op0: Gpd, op1: Gpd) {
648 self.emit(CMOVNS32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
649 }
650}
651
652impl<'a> CmovnsEmitter<Gpd, Mem> for Assembler<'a> {
653 fn cmovns(&mut self, op0: Gpd, op1: Mem) {
654 self.emit(CMOVNS32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
655 }
656}
657
658impl<'a> CmovnsEmitter<Gpq, Gpq> for Assembler<'a> {
659 fn cmovns(&mut self, op0: Gpq, op1: Gpq) {
660 self.emit(CMOVNS64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
661 }
662}
663
664impl<'a> CmovnsEmitter<Gpq, Mem> for Assembler<'a> {
665 fn cmovns(&mut self, op0: Gpq, op1: Mem) {
666 self.emit(CMOVNS64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
667 }
668}
669
670/// `CMOVNZ` (CMOVNZ).
671/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
672///
673///
674/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
675///
676/// Supported operand variants:
677///
678/// ```text
679/// +---+----------+
680/// | # | Operands |
681/// +---+----------+
682/// | 1 | Gpd, Gpd |
683/// | 2 | Gpd, Mem |
684/// | 3 | Gpq, Gpq |
685/// | 4 | Gpq, Mem |
686/// | 5 | Gpw, Gpw |
687/// | 6 | Gpw, Mem |
688/// +---+----------+
689/// ```
690pub trait CmovnzEmitter<A, B> {
691 fn cmovnz(&mut self, op0: A, op1: B);
692}
693
694impl<'a> CmovnzEmitter<Gpw, Gpw> for Assembler<'a> {
695 fn cmovnz(&mut self, op0: Gpw, op1: Gpw) {
696 self.emit(CMOVNZ16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
697 }
698}
699
700impl<'a> CmovnzEmitter<Gpw, Mem> for Assembler<'a> {
701 fn cmovnz(&mut self, op0: Gpw, op1: Mem) {
702 self.emit(CMOVNZ16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
703 }
704}
705
706impl<'a> CmovnzEmitter<Gpd, Gpd> for Assembler<'a> {
707 fn cmovnz(&mut self, op0: Gpd, op1: Gpd) {
708 self.emit(CMOVNZ32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
709 }
710}
711
712impl<'a> CmovnzEmitter<Gpd, Mem> for Assembler<'a> {
713 fn cmovnz(&mut self, op0: Gpd, op1: Mem) {
714 self.emit(CMOVNZ32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
715 }
716}
717
718impl<'a> CmovnzEmitter<Gpq, Gpq> for Assembler<'a> {
719 fn cmovnz(&mut self, op0: Gpq, op1: Gpq) {
720 self.emit(CMOVNZ64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
721 }
722}
723
724impl<'a> CmovnzEmitter<Gpq, Mem> for Assembler<'a> {
725 fn cmovnz(&mut self, op0: Gpq, op1: Mem) {
726 self.emit(CMOVNZ64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
727 }
728}
729
730/// `CMOVO` (CMOVO).
731/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
732///
733///
734/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
735///
736/// Supported operand variants:
737///
738/// ```text
739/// +---+----------+
740/// | # | Operands |
741/// +---+----------+
742/// | 1 | Gpd, Gpd |
743/// | 2 | Gpd, Mem |
744/// | 3 | Gpq, Gpq |
745/// | 4 | Gpq, Mem |
746/// | 5 | Gpw, Gpw |
747/// | 6 | Gpw, Mem |
748/// +---+----------+
749/// ```
750pub trait CmovoEmitter<A, B> {
751 fn cmovo(&mut self, op0: A, op1: B);
752}
753
754impl<'a> CmovoEmitter<Gpw, Gpw> for Assembler<'a> {
755 fn cmovo(&mut self, op0: Gpw, op1: Gpw) {
756 self.emit(CMOVO16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
757 }
758}
759
760impl<'a> CmovoEmitter<Gpw, Mem> for Assembler<'a> {
761 fn cmovo(&mut self, op0: Gpw, op1: Mem) {
762 self.emit(CMOVO16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
763 }
764}
765
766impl<'a> CmovoEmitter<Gpd, Gpd> for Assembler<'a> {
767 fn cmovo(&mut self, op0: Gpd, op1: Gpd) {
768 self.emit(CMOVO32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
769 }
770}
771
772impl<'a> CmovoEmitter<Gpd, Mem> for Assembler<'a> {
773 fn cmovo(&mut self, op0: Gpd, op1: Mem) {
774 self.emit(CMOVO32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
775 }
776}
777
778impl<'a> CmovoEmitter<Gpq, Gpq> for Assembler<'a> {
779 fn cmovo(&mut self, op0: Gpq, op1: Gpq) {
780 self.emit(CMOVO64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
781 }
782}
783
784impl<'a> CmovoEmitter<Gpq, Mem> for Assembler<'a> {
785 fn cmovo(&mut self, op0: Gpq, op1: Mem) {
786 self.emit(CMOVO64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
787 }
788}
789
790/// `CMOVP` (CMOVP).
791/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
792///
793///
794/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
795///
796/// Supported operand variants:
797///
798/// ```text
799/// +---+----------+
800/// | # | Operands |
801/// +---+----------+
802/// | 1 | Gpd, Gpd |
803/// | 2 | Gpd, Mem |
804/// | 3 | Gpq, Gpq |
805/// | 4 | Gpq, Mem |
806/// | 5 | Gpw, Gpw |
807/// | 6 | Gpw, Mem |
808/// +---+----------+
809/// ```
810pub trait CmovpEmitter<A, B> {
811 fn cmovp(&mut self, op0: A, op1: B);
812}
813
814impl<'a> CmovpEmitter<Gpw, Gpw> for Assembler<'a> {
815 fn cmovp(&mut self, op0: Gpw, op1: Gpw) {
816 self.emit(CMOVP16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
817 }
818}
819
820impl<'a> CmovpEmitter<Gpw, Mem> for Assembler<'a> {
821 fn cmovp(&mut self, op0: Gpw, op1: Mem) {
822 self.emit(CMOVP16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
823 }
824}
825
826impl<'a> CmovpEmitter<Gpd, Gpd> for Assembler<'a> {
827 fn cmovp(&mut self, op0: Gpd, op1: Gpd) {
828 self.emit(CMOVP32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
829 }
830}
831
832impl<'a> CmovpEmitter<Gpd, Mem> for Assembler<'a> {
833 fn cmovp(&mut self, op0: Gpd, op1: Mem) {
834 self.emit(CMOVP32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
835 }
836}
837
838impl<'a> CmovpEmitter<Gpq, Gpq> for Assembler<'a> {
839 fn cmovp(&mut self, op0: Gpq, op1: Gpq) {
840 self.emit(CMOVP64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
841 }
842}
843
844impl<'a> CmovpEmitter<Gpq, Mem> for Assembler<'a> {
845 fn cmovp(&mut self, op0: Gpq, op1: Mem) {
846 self.emit(CMOVP64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
847 }
848}
849
850/// `CMOVS` (CMOVS).
851/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
852///
853///
854/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
855///
856/// Supported operand variants:
857///
858/// ```text
859/// +---+----------+
860/// | # | Operands |
861/// +---+----------+
862/// | 1 | Gpd, Gpd |
863/// | 2 | Gpd, Mem |
864/// | 3 | Gpq, Gpq |
865/// | 4 | Gpq, Mem |
866/// | 5 | Gpw, Gpw |
867/// | 6 | Gpw, Mem |
868/// +---+----------+
869/// ```
870pub trait CmovsEmitter<A, B> {
871 fn cmovs(&mut self, op0: A, op1: B);
872}
873
874impl<'a> CmovsEmitter<Gpw, Gpw> for Assembler<'a> {
875 fn cmovs(&mut self, op0: Gpw, op1: Gpw) {
876 self.emit(CMOVS16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
877 }
878}
879
880impl<'a> CmovsEmitter<Gpw, Mem> for Assembler<'a> {
881 fn cmovs(&mut self, op0: Gpw, op1: Mem) {
882 self.emit(CMOVS16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
883 }
884}
885
886impl<'a> CmovsEmitter<Gpd, Gpd> for Assembler<'a> {
887 fn cmovs(&mut self, op0: Gpd, op1: Gpd) {
888 self.emit(CMOVS32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
889 }
890}
891
892impl<'a> CmovsEmitter<Gpd, Mem> for Assembler<'a> {
893 fn cmovs(&mut self, op0: Gpd, op1: Mem) {
894 self.emit(CMOVS32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
895 }
896}
897
898impl<'a> CmovsEmitter<Gpq, Gpq> for Assembler<'a> {
899 fn cmovs(&mut self, op0: Gpq, op1: Gpq) {
900 self.emit(CMOVS64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
901 }
902}
903
904impl<'a> CmovsEmitter<Gpq, Mem> for Assembler<'a> {
905 fn cmovs(&mut self, op0: Gpq, op1: Mem) {
906 self.emit(CMOVS64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
907 }
908}
909
910/// `CMOVZ` (CMOVZ).
911/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
912///
913///
914/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
915///
916/// Supported operand variants:
917///
918/// ```text
919/// +---+----------+
920/// | # | Operands |
921/// +---+----------+
922/// | 1 | Gpd, Gpd |
923/// | 2 | Gpd, Mem |
924/// | 3 | Gpq, Gpq |
925/// | 4 | Gpq, Mem |
926/// | 5 | Gpw, Gpw |
927/// | 6 | Gpw, Mem |
928/// +---+----------+
929/// ```
930pub trait CmovzEmitter<A, B> {
931 fn cmovz(&mut self, op0: A, op1: B);
932}
933
934impl<'a> CmovzEmitter<Gpw, Gpw> for Assembler<'a> {
935 fn cmovz(&mut self, op0: Gpw, op1: Gpw) {
936 self.emit(CMOVZ16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
937 }
938}
939
940impl<'a> CmovzEmitter<Gpw, Mem> for Assembler<'a> {
941 fn cmovz(&mut self, op0: Gpw, op1: Mem) {
942 self.emit(CMOVZ16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
943 }
944}
945
946impl<'a> CmovzEmitter<Gpd, Gpd> for Assembler<'a> {
947 fn cmovz(&mut self, op0: Gpd, op1: Gpd) {
948 self.emit(CMOVZ32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
949 }
950}
951
952impl<'a> CmovzEmitter<Gpd, Mem> for Assembler<'a> {
953 fn cmovz(&mut self, op0: Gpd, op1: Mem) {
954 self.emit(CMOVZ32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
955 }
956}
957
958impl<'a> CmovzEmitter<Gpq, Gpq> for Assembler<'a> {
959 fn cmovz(&mut self, op0: Gpq, op1: Gpq) {
960 self.emit(CMOVZ64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
961 }
962}
963
964impl<'a> CmovzEmitter<Gpq, Mem> for Assembler<'a> {
965 fn cmovz(&mut self, op0: Gpq, op1: Mem) {
966 self.emit(CMOVZ64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
967 }
968}
969
970/// `CMOVCC` (CMOVO).
971/// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
972///
973///
974/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
975///
976/// Supported operand variants:
977///
978/// ```text
979/// +---+----------+
980/// | # | Operands |
981/// +---+----------+
982/// | 1 | Gpd, Gpd |
983/// | 2 | Gpd, Mem |
984/// | 3 | Gpq, Gpq |
985/// | 4 | Gpq, Mem |
986/// | 5 | Gpw, Gpw |
987/// | 6 | Gpw, Mem |
988/// +---+----------+
989/// ```
990pub trait CmovccEmitter<A, B> {
991 fn cmovcc(&mut self, op0: A, op1: B);
992}
993
994impl<'a> CmovccEmitter<Gpw, Gpw> for Assembler<'a> {
995 fn cmovcc(&mut self, op0: Gpw, op1: Gpw) {
996 self.emit(CMOVCC16RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
997 }
998}
999
1000impl<'a> CmovccEmitter<Gpw, Mem> for Assembler<'a> {
1001 fn cmovcc(&mut self, op0: Gpw, op1: Mem) {
1002 self.emit(CMOVCC16RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1003 }
1004}
1005
1006impl<'a> CmovccEmitter<Gpd, Gpd> for Assembler<'a> {
1007 fn cmovcc(&mut self, op0: Gpd, op1: Gpd) {
1008 self.emit(CMOVCC32RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1009 }
1010}
1011
1012impl<'a> CmovccEmitter<Gpd, Mem> for Assembler<'a> {
1013 fn cmovcc(&mut self, op0: Gpd, op1: Mem) {
1014 self.emit(CMOVCC32RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1015 }
1016}
1017
1018impl<'a> CmovccEmitter<Gpq, Gpq> for Assembler<'a> {
1019 fn cmovcc(&mut self, op0: Gpq, op1: Gpq) {
1020 self.emit(CMOVCC64RR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1021 }
1022}
1023
1024impl<'a> CmovccEmitter<Gpq, Mem> for Assembler<'a> {
1025 fn cmovcc(&mut self, op0: Gpq, op1: Mem) {
1026 self.emit(CMOVCC64RM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1027 }
1028}
1029
1030
1031impl<'a> Assembler<'a> {
1032 /// `CMOVA` (CMOVA).
1033 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1034 ///
1035 ///
1036 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1037 ///
1038 /// Supported operand variants:
1039 ///
1040 /// ```text
1041 /// +---+----------+
1042 /// | # | Operands |
1043 /// +---+----------+
1044 /// | 1 | Gpd, Gpd |
1045 /// | 2 | Gpd, Mem |
1046 /// | 3 | Gpq, Gpq |
1047 /// | 4 | Gpq, Mem |
1048 /// | 5 | Gpw, Gpw |
1049 /// | 6 | Gpw, Mem |
1050 /// +---+----------+
1051 /// ```
1052 #[inline]
1053 pub fn cmova<A, B>(&mut self, op0: A, op1: B)
1054 where Assembler<'a>: CmovaEmitter<A, B> {
1055 <Self as CmovaEmitter<A, B>>::cmova(self, op0, op1);
1056 }
1057 /// `CMOVBE` (CMOVBE).
1058 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1059 ///
1060 ///
1061 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1062 ///
1063 /// Supported operand variants:
1064 ///
1065 /// ```text
1066 /// +---+----------+
1067 /// | # | Operands |
1068 /// +---+----------+
1069 /// | 1 | Gpd, Gpd |
1070 /// | 2 | Gpd, Mem |
1071 /// | 3 | Gpq, Gpq |
1072 /// | 4 | Gpq, Mem |
1073 /// | 5 | Gpw, Gpw |
1074 /// | 6 | Gpw, Mem |
1075 /// +---+----------+
1076 /// ```
1077 #[inline]
1078 pub fn cmovbe<A, B>(&mut self, op0: A, op1: B)
1079 where Assembler<'a>: CmovbeEmitter<A, B> {
1080 <Self as CmovbeEmitter<A, B>>::cmovbe(self, op0, op1);
1081 }
1082 /// `CMOVC` (CMOVC).
1083 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1084 ///
1085 ///
1086 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1087 ///
1088 /// Supported operand variants:
1089 ///
1090 /// ```text
1091 /// +---+----------+
1092 /// | # | Operands |
1093 /// +---+----------+
1094 /// | 1 | Gpd, Gpd |
1095 /// | 2 | Gpd, Mem |
1096 /// | 3 | Gpq, Gpq |
1097 /// | 4 | Gpq, Mem |
1098 /// | 5 | Gpw, Gpw |
1099 /// | 6 | Gpw, Mem |
1100 /// +---+----------+
1101 /// ```
1102 #[inline]
1103 pub fn cmovc<A, B>(&mut self, op0: A, op1: B)
1104 where Assembler<'a>: CmovcEmitter<A, B> {
1105 <Self as CmovcEmitter<A, B>>::cmovc(self, op0, op1);
1106 }
1107 /// `CMOVG` (CMOVG).
1108 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1109 ///
1110 ///
1111 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1112 ///
1113 /// Supported operand variants:
1114 ///
1115 /// ```text
1116 /// +---+----------+
1117 /// | # | Operands |
1118 /// +---+----------+
1119 /// | 1 | Gpd, Gpd |
1120 /// | 2 | Gpd, Mem |
1121 /// | 3 | Gpq, Gpq |
1122 /// | 4 | Gpq, Mem |
1123 /// | 5 | Gpw, Gpw |
1124 /// | 6 | Gpw, Mem |
1125 /// +---+----------+
1126 /// ```
1127 #[inline]
1128 pub fn cmovg<A, B>(&mut self, op0: A, op1: B)
1129 where Assembler<'a>: CmovgEmitter<A, B> {
1130 <Self as CmovgEmitter<A, B>>::cmovg(self, op0, op1);
1131 }
1132 /// `CMOVGE` (CMOVGE).
1133 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1134 ///
1135 ///
1136 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1137 ///
1138 /// Supported operand variants:
1139 ///
1140 /// ```text
1141 /// +---+----------+
1142 /// | # | Operands |
1143 /// +---+----------+
1144 /// | 1 | Gpd, Gpd |
1145 /// | 2 | Gpd, Mem |
1146 /// | 3 | Gpq, Gpq |
1147 /// | 4 | Gpq, Mem |
1148 /// | 5 | Gpw, Gpw |
1149 /// | 6 | Gpw, Mem |
1150 /// +---+----------+
1151 /// ```
1152 #[inline]
1153 pub fn cmovge<A, B>(&mut self, op0: A, op1: B)
1154 where Assembler<'a>: CmovgeEmitter<A, B> {
1155 <Self as CmovgeEmitter<A, B>>::cmovge(self, op0, op1);
1156 }
1157 /// `CMOVL` (CMOVL).
1158 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1159 ///
1160 ///
1161 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1162 ///
1163 /// Supported operand variants:
1164 ///
1165 /// ```text
1166 /// +---+----------+
1167 /// | # | Operands |
1168 /// +---+----------+
1169 /// | 1 | Gpd, Gpd |
1170 /// | 2 | Gpd, Mem |
1171 /// | 3 | Gpq, Gpq |
1172 /// | 4 | Gpq, Mem |
1173 /// | 5 | Gpw, Gpw |
1174 /// | 6 | Gpw, Mem |
1175 /// +---+----------+
1176 /// ```
1177 #[inline]
1178 pub fn cmovl<A, B>(&mut self, op0: A, op1: B)
1179 where Assembler<'a>: CmovlEmitter<A, B> {
1180 <Self as CmovlEmitter<A, B>>::cmovl(self, op0, op1);
1181 }
1182 /// `CMOVLE` (CMOVLE).
1183 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1184 ///
1185 ///
1186 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1187 ///
1188 /// Supported operand variants:
1189 ///
1190 /// ```text
1191 /// +---+----------+
1192 /// | # | Operands |
1193 /// +---+----------+
1194 /// | 1 | Gpd, Gpd |
1195 /// | 2 | Gpd, Mem |
1196 /// | 3 | Gpq, Gpq |
1197 /// | 4 | Gpq, Mem |
1198 /// | 5 | Gpw, Gpw |
1199 /// | 6 | Gpw, Mem |
1200 /// +---+----------+
1201 /// ```
1202 #[inline]
1203 pub fn cmovle<A, B>(&mut self, op0: A, op1: B)
1204 where Assembler<'a>: CmovleEmitter<A, B> {
1205 <Self as CmovleEmitter<A, B>>::cmovle(self, op0, op1);
1206 }
1207 /// `CMOVNC` (CMOVNC).
1208 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1209 ///
1210 ///
1211 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1212 ///
1213 /// Supported operand variants:
1214 ///
1215 /// ```text
1216 /// +---+----------+
1217 /// | # | Operands |
1218 /// +---+----------+
1219 /// | 1 | Gpd, Gpd |
1220 /// | 2 | Gpd, Mem |
1221 /// | 3 | Gpq, Gpq |
1222 /// | 4 | Gpq, Mem |
1223 /// | 5 | Gpw, Gpw |
1224 /// | 6 | Gpw, Mem |
1225 /// +---+----------+
1226 /// ```
1227 #[inline]
1228 pub fn cmovnc<A, B>(&mut self, op0: A, op1: B)
1229 where Assembler<'a>: CmovncEmitter<A, B> {
1230 <Self as CmovncEmitter<A, B>>::cmovnc(self, op0, op1);
1231 }
1232 /// `CMOVNO` (CMOVNO).
1233 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1234 ///
1235 ///
1236 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1237 ///
1238 /// Supported operand variants:
1239 ///
1240 /// ```text
1241 /// +---+----------+
1242 /// | # | Operands |
1243 /// +---+----------+
1244 /// | 1 | Gpd, Gpd |
1245 /// | 2 | Gpd, Mem |
1246 /// | 3 | Gpq, Gpq |
1247 /// | 4 | Gpq, Mem |
1248 /// | 5 | Gpw, Gpw |
1249 /// | 6 | Gpw, Mem |
1250 /// +---+----------+
1251 /// ```
1252 #[inline]
1253 pub fn cmovno<A, B>(&mut self, op0: A, op1: B)
1254 where Assembler<'a>: CmovnoEmitter<A, B> {
1255 <Self as CmovnoEmitter<A, B>>::cmovno(self, op0, op1);
1256 }
1257 /// `CMOVNP` (CMOVNP).
1258 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1259 ///
1260 ///
1261 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1262 ///
1263 /// Supported operand variants:
1264 ///
1265 /// ```text
1266 /// +---+----------+
1267 /// | # | Operands |
1268 /// +---+----------+
1269 /// | 1 | Gpd, Gpd |
1270 /// | 2 | Gpd, Mem |
1271 /// | 3 | Gpq, Gpq |
1272 /// | 4 | Gpq, Mem |
1273 /// | 5 | Gpw, Gpw |
1274 /// | 6 | Gpw, Mem |
1275 /// +---+----------+
1276 /// ```
1277 #[inline]
1278 pub fn cmovnp<A, B>(&mut self, op0: A, op1: B)
1279 where Assembler<'a>: CmovnpEmitter<A, B> {
1280 <Self as CmovnpEmitter<A, B>>::cmovnp(self, op0, op1);
1281 }
1282 /// `CMOVNS` (CMOVNS).
1283 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1284 ///
1285 ///
1286 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1287 ///
1288 /// Supported operand variants:
1289 ///
1290 /// ```text
1291 /// +---+----------+
1292 /// | # | Operands |
1293 /// +---+----------+
1294 /// | 1 | Gpd, Gpd |
1295 /// | 2 | Gpd, Mem |
1296 /// | 3 | Gpq, Gpq |
1297 /// | 4 | Gpq, Mem |
1298 /// | 5 | Gpw, Gpw |
1299 /// | 6 | Gpw, Mem |
1300 /// +---+----------+
1301 /// ```
1302 #[inline]
1303 pub fn cmovns<A, B>(&mut self, op0: A, op1: B)
1304 where Assembler<'a>: CmovnsEmitter<A, B> {
1305 <Self as CmovnsEmitter<A, B>>::cmovns(self, op0, op1);
1306 }
1307 /// `CMOVNZ` (CMOVNZ).
1308 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1309 ///
1310 ///
1311 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1312 ///
1313 /// Supported operand variants:
1314 ///
1315 /// ```text
1316 /// +---+----------+
1317 /// | # | Operands |
1318 /// +---+----------+
1319 /// | 1 | Gpd, Gpd |
1320 /// | 2 | Gpd, Mem |
1321 /// | 3 | Gpq, Gpq |
1322 /// | 4 | Gpq, Mem |
1323 /// | 5 | Gpw, Gpw |
1324 /// | 6 | Gpw, Mem |
1325 /// +---+----------+
1326 /// ```
1327 #[inline]
1328 pub fn cmovnz<A, B>(&mut self, op0: A, op1: B)
1329 where Assembler<'a>: CmovnzEmitter<A, B> {
1330 <Self as CmovnzEmitter<A, B>>::cmovnz(self, op0, op1);
1331 }
1332 /// `CMOVO` (CMOVO).
1333 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1334 ///
1335 ///
1336 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1337 ///
1338 /// Supported operand variants:
1339 ///
1340 /// ```text
1341 /// +---+----------+
1342 /// | # | Operands |
1343 /// +---+----------+
1344 /// | 1 | Gpd, Gpd |
1345 /// | 2 | Gpd, Mem |
1346 /// | 3 | Gpq, Gpq |
1347 /// | 4 | Gpq, Mem |
1348 /// | 5 | Gpw, Gpw |
1349 /// | 6 | Gpw, Mem |
1350 /// +---+----------+
1351 /// ```
1352 #[inline]
1353 pub fn cmovo<A, B>(&mut self, op0: A, op1: B)
1354 where Assembler<'a>: CmovoEmitter<A, B> {
1355 <Self as CmovoEmitter<A, B>>::cmovo(self, op0, op1);
1356 }
1357 /// `CMOVP` (CMOVP).
1358 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1359 ///
1360 ///
1361 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1362 ///
1363 /// Supported operand variants:
1364 ///
1365 /// ```text
1366 /// +---+----------+
1367 /// | # | Operands |
1368 /// +---+----------+
1369 /// | 1 | Gpd, Gpd |
1370 /// | 2 | Gpd, Mem |
1371 /// | 3 | Gpq, Gpq |
1372 /// | 4 | Gpq, Mem |
1373 /// | 5 | Gpw, Gpw |
1374 /// | 6 | Gpw, Mem |
1375 /// +---+----------+
1376 /// ```
1377 #[inline]
1378 pub fn cmovp<A, B>(&mut self, op0: A, op1: B)
1379 where Assembler<'a>: CmovpEmitter<A, B> {
1380 <Self as CmovpEmitter<A, B>>::cmovp(self, op0, op1);
1381 }
1382 /// `CMOVS` (CMOVS).
1383 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1384 ///
1385 ///
1386 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1387 ///
1388 /// Supported operand variants:
1389 ///
1390 /// ```text
1391 /// +---+----------+
1392 /// | # | Operands |
1393 /// +---+----------+
1394 /// | 1 | Gpd, Gpd |
1395 /// | 2 | Gpd, Mem |
1396 /// | 3 | Gpq, Gpq |
1397 /// | 4 | Gpq, Mem |
1398 /// | 5 | Gpw, Gpw |
1399 /// | 6 | Gpw, Mem |
1400 /// +---+----------+
1401 /// ```
1402 #[inline]
1403 pub fn cmovs<A, B>(&mut self, op0: A, op1: B)
1404 where Assembler<'a>: CmovsEmitter<A, B> {
1405 <Self as CmovsEmitter<A, B>>::cmovs(self, op0, op1);
1406 }
1407 /// `CMOVZ` (CMOVZ).
1408 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1409 ///
1410 ///
1411 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1412 ///
1413 /// Supported operand variants:
1414 ///
1415 /// ```text
1416 /// +---+----------+
1417 /// | # | Operands |
1418 /// +---+----------+
1419 /// | 1 | Gpd, Gpd |
1420 /// | 2 | Gpd, Mem |
1421 /// | 3 | Gpq, Gpq |
1422 /// | 4 | Gpq, Mem |
1423 /// | 5 | Gpw, Gpw |
1424 /// | 6 | Gpw, Mem |
1425 /// +---+----------+
1426 /// ```
1427 #[inline]
1428 pub fn cmovz<A, B>(&mut self, op0: A, op1: B)
1429 where Assembler<'a>: CmovzEmitter<A, B> {
1430 <Self as CmovzEmitter<A, B>>::cmovz(self, op0, op1);
1431 }
1432 /// `CMOVCC` (CMOVO).
1433 /// Each of the CMOVcc instructions performs a move operation if the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) are in a specified state (or condition). A condition code (cc) is associated with each instruction to indicate the condition being tested for. If the condition is not satisfied, a move is not performed and execution continues with the instruction following the CMOVcc instruction.
1434 ///
1435 ///
1436 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/CMOVcc.html).
1437 ///
1438 /// Supported operand variants:
1439 ///
1440 /// ```text
1441 /// +---+----------+
1442 /// | # | Operands |
1443 /// +---+----------+
1444 /// | 1 | Gpd, Gpd |
1445 /// | 2 | Gpd, Mem |
1446 /// | 3 | Gpq, Gpq |
1447 /// | 4 | Gpq, Mem |
1448 /// | 5 | Gpw, Gpw |
1449 /// | 6 | Gpw, Mem |
1450 /// +---+----------+
1451 /// ```
1452 #[inline]
1453 pub fn cmovcc<A, B>(&mut self, op0: A, op1: B)
1454 where Assembler<'a>: CmovccEmitter<A, B> {
1455 <Self as CmovccEmitter<A, B>>::cmovcc(self, op0, op1);
1456 }
1457}