1use crate::x86::assembler::*;
2use crate::x86::operands::*;
3use super::super::opcodes::*;
4use crate::core::emitter::*;
5use crate::core::operand::*;
6
7const NOREG: Operand = Operand::new();
9
10pub trait CmpbexaddEmitter<A, B, C> {
23 fn cmpbexadd(&mut self, op0: A, op1: B, op2: C);
24}
25
26impl<'a> CmpbexaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
27 fn cmpbexadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
28 self.emit(CMPBEXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
29 }
30}
31
32impl<'a> CmpbexaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
33 fn cmpbexadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
34 self.emit(CMPBEXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
35 }
36}
37
38pub trait CmpbxaddEmitter<A, B, C> {
51 fn cmpbxadd(&mut self, op0: A, op1: B, op2: C);
52}
53
54impl<'a> CmpbxaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
55 fn cmpbxadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
56 self.emit(CMPBXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
57 }
58}
59
60impl<'a> CmpbxaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
61 fn cmpbxadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
62 self.emit(CMPBXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
63 }
64}
65
66pub trait CmplexaddEmitter<A, B, C> {
79 fn cmplexadd(&mut self, op0: A, op1: B, op2: C);
80}
81
82impl<'a> CmplexaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
83 fn cmplexadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
84 self.emit(CMPLEXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
85 }
86}
87
88impl<'a> CmplexaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
89 fn cmplexadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
90 self.emit(CMPLEXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
91 }
92}
93
94pub trait CmplxaddEmitter<A, B, C> {
107 fn cmplxadd(&mut self, op0: A, op1: B, op2: C);
108}
109
110impl<'a> CmplxaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
111 fn cmplxadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
112 self.emit(CMPLXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
113 }
114}
115
116impl<'a> CmplxaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
117 fn cmplxadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
118 self.emit(CMPLXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
119 }
120}
121
122pub trait CmpnbexaddEmitter<A, B, C> {
135 fn cmpnbexadd(&mut self, op0: A, op1: B, op2: C);
136}
137
138impl<'a> CmpnbexaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
139 fn cmpnbexadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
140 self.emit(CMPNBEXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
141 }
142}
143
144impl<'a> CmpnbexaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
145 fn cmpnbexadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
146 self.emit(CMPNBEXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
147 }
148}
149
150pub trait CmpnbxaddEmitter<A, B, C> {
163 fn cmpnbxadd(&mut self, op0: A, op1: B, op2: C);
164}
165
166impl<'a> CmpnbxaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
167 fn cmpnbxadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
168 self.emit(CMPNBXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
169 }
170}
171
172impl<'a> CmpnbxaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
173 fn cmpnbxadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
174 self.emit(CMPNBXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
175 }
176}
177
178pub trait CmpnlexaddEmitter<A, B, C> {
191 fn cmpnlexadd(&mut self, op0: A, op1: B, op2: C);
192}
193
194impl<'a> CmpnlexaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
195 fn cmpnlexadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
196 self.emit(CMPNLEXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
197 }
198}
199
200impl<'a> CmpnlexaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
201 fn cmpnlexadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
202 self.emit(CMPNLEXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
203 }
204}
205
206pub trait CmpnlxaddEmitter<A, B, C> {
219 fn cmpnlxadd(&mut self, op0: A, op1: B, op2: C);
220}
221
222impl<'a> CmpnlxaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
223 fn cmpnlxadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
224 self.emit(CMPNLXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
225 }
226}
227
228impl<'a> CmpnlxaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
229 fn cmpnlxadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
230 self.emit(CMPNLXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
231 }
232}
233
234pub trait CmpnoxaddEmitter<A, B, C> {
247 fn cmpnoxadd(&mut self, op0: A, op1: B, op2: C);
248}
249
250impl<'a> CmpnoxaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
251 fn cmpnoxadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
252 self.emit(CMPNOXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
253 }
254}
255
256impl<'a> CmpnoxaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
257 fn cmpnoxadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
258 self.emit(CMPNOXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
259 }
260}
261
262pub trait CmpnpxaddEmitter<A, B, C> {
275 fn cmpnpxadd(&mut self, op0: A, op1: B, op2: C);
276}
277
278impl<'a> CmpnpxaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
279 fn cmpnpxadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
280 self.emit(CMPNPXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
281 }
282}
283
284impl<'a> CmpnpxaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
285 fn cmpnpxadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
286 self.emit(CMPNPXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
287 }
288}
289
290pub trait CmpnsxaddEmitter<A, B, C> {
303 fn cmpnsxadd(&mut self, op0: A, op1: B, op2: C);
304}
305
306impl<'a> CmpnsxaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
307 fn cmpnsxadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
308 self.emit(CMPNSXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
309 }
310}
311
312impl<'a> CmpnsxaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
313 fn cmpnsxadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
314 self.emit(CMPNSXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
315 }
316}
317
318pub trait CmpnzxaddEmitter<A, B, C> {
331 fn cmpnzxadd(&mut self, op0: A, op1: B, op2: C);
332}
333
334impl<'a> CmpnzxaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
335 fn cmpnzxadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
336 self.emit(CMPNZXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
337 }
338}
339
340impl<'a> CmpnzxaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
341 fn cmpnzxadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
342 self.emit(CMPNZXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
343 }
344}
345
346pub trait CmpoxaddEmitter<A, B, C> {
359 fn cmpoxadd(&mut self, op0: A, op1: B, op2: C);
360}
361
362impl<'a> CmpoxaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
363 fn cmpoxadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
364 self.emit(CMPOXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
365 }
366}
367
368impl<'a> CmpoxaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
369 fn cmpoxadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
370 self.emit(CMPOXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
371 }
372}
373
374pub trait CmppxaddEmitter<A, B, C> {
387 fn cmppxadd(&mut self, op0: A, op1: B, op2: C);
388}
389
390impl<'a> CmppxaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
391 fn cmppxadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
392 self.emit(CMPPXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
393 }
394}
395
396impl<'a> CmppxaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
397 fn cmppxadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
398 self.emit(CMPPXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
399 }
400}
401
402pub trait CmpsxaddEmitter<A, B, C> {
415 fn cmpsxadd(&mut self, op0: A, op1: B, op2: C);
416}
417
418impl<'a> CmpsxaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
419 fn cmpsxadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
420 self.emit(CMPSXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
421 }
422}
423
424impl<'a> CmpsxaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
425 fn cmpsxadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
426 self.emit(CMPSXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
427 }
428}
429
430pub trait CmpzxaddEmitter<A, B, C> {
443 fn cmpzxadd(&mut self, op0: A, op1: B, op2: C);
444}
445
446impl<'a> CmpzxaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
447 fn cmpzxadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
448 self.emit(CMPZXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
449 }
450}
451
452impl<'a> CmpzxaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
453 fn cmpzxadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
454 self.emit(CMPZXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
455 }
456}
457
458pub trait CmpccxaddEmitter<A, B, C> {
471 fn cmpccxadd(&mut self, op0: A, op1: B, op2: C);
472}
473
474impl<'a> CmpccxaddEmitter<Mem, Gpd, Gpd> for Assembler<'a> {
475 fn cmpccxadd(&mut self, op0: Mem, op1: Gpd, op2: Gpd) {
476 self.emit(CMPCCXADD32MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
477 }
478}
479
480impl<'a> CmpccxaddEmitter<Mem, Gpq, Gpq> for Assembler<'a> {
481 fn cmpccxadd(&mut self, op0: Mem, op1: Gpq, op2: Gpq) {
482 self.emit(CMPCCXADD64MRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
483 }
484}
485
486
487impl<'a> Assembler<'a> {
488 #[inline]
501 pub fn cmpbexadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
502 where Assembler<'a>: CmpbexaddEmitter<A, B, C> {
503 <Self as CmpbexaddEmitter<A, B, C>>::cmpbexadd(self, op0, op1, op2);
504 }
505 #[inline]
518 pub fn cmpbxadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
519 where Assembler<'a>: CmpbxaddEmitter<A, B, C> {
520 <Self as CmpbxaddEmitter<A, B, C>>::cmpbxadd(self, op0, op1, op2);
521 }
522 #[inline]
535 pub fn cmplexadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
536 where Assembler<'a>: CmplexaddEmitter<A, B, C> {
537 <Self as CmplexaddEmitter<A, B, C>>::cmplexadd(self, op0, op1, op2);
538 }
539 #[inline]
552 pub fn cmplxadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
553 where Assembler<'a>: CmplxaddEmitter<A, B, C> {
554 <Self as CmplxaddEmitter<A, B, C>>::cmplxadd(self, op0, op1, op2);
555 }
556 #[inline]
569 pub fn cmpnbexadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
570 where Assembler<'a>: CmpnbexaddEmitter<A, B, C> {
571 <Self as CmpnbexaddEmitter<A, B, C>>::cmpnbexadd(self, op0, op1, op2);
572 }
573 #[inline]
586 pub fn cmpnbxadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
587 where Assembler<'a>: CmpnbxaddEmitter<A, B, C> {
588 <Self as CmpnbxaddEmitter<A, B, C>>::cmpnbxadd(self, op0, op1, op2);
589 }
590 #[inline]
603 pub fn cmpnlexadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
604 where Assembler<'a>: CmpnlexaddEmitter<A, B, C> {
605 <Self as CmpnlexaddEmitter<A, B, C>>::cmpnlexadd(self, op0, op1, op2);
606 }
607 #[inline]
620 pub fn cmpnlxadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
621 where Assembler<'a>: CmpnlxaddEmitter<A, B, C> {
622 <Self as CmpnlxaddEmitter<A, B, C>>::cmpnlxadd(self, op0, op1, op2);
623 }
624 #[inline]
637 pub fn cmpnoxadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
638 where Assembler<'a>: CmpnoxaddEmitter<A, B, C> {
639 <Self as CmpnoxaddEmitter<A, B, C>>::cmpnoxadd(self, op0, op1, op2);
640 }
641 #[inline]
654 pub fn cmpnpxadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
655 where Assembler<'a>: CmpnpxaddEmitter<A, B, C> {
656 <Self as CmpnpxaddEmitter<A, B, C>>::cmpnpxadd(self, op0, op1, op2);
657 }
658 #[inline]
671 pub fn cmpnsxadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
672 where Assembler<'a>: CmpnsxaddEmitter<A, B, C> {
673 <Self as CmpnsxaddEmitter<A, B, C>>::cmpnsxadd(self, op0, op1, op2);
674 }
675 #[inline]
688 pub fn cmpnzxadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
689 where Assembler<'a>: CmpnzxaddEmitter<A, B, C> {
690 <Self as CmpnzxaddEmitter<A, B, C>>::cmpnzxadd(self, op0, op1, op2);
691 }
692 #[inline]
705 pub fn cmpoxadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
706 where Assembler<'a>: CmpoxaddEmitter<A, B, C> {
707 <Self as CmpoxaddEmitter<A, B, C>>::cmpoxadd(self, op0, op1, op2);
708 }
709 #[inline]
722 pub fn cmppxadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
723 where Assembler<'a>: CmppxaddEmitter<A, B, C> {
724 <Self as CmppxaddEmitter<A, B, C>>::cmppxadd(self, op0, op1, op2);
725 }
726 #[inline]
739 pub fn cmpsxadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
740 where Assembler<'a>: CmpsxaddEmitter<A, B, C> {
741 <Self as CmpsxaddEmitter<A, B, C>>::cmpsxadd(self, op0, op1, op2);
742 }
743 #[inline]
756 pub fn cmpzxadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
757 where Assembler<'a>: CmpzxaddEmitter<A, B, C> {
758 <Self as CmpzxaddEmitter<A, B, C>>::cmpzxadd(self, op0, op1, op2);
759 }
760 #[inline]
773 pub fn cmpccxadd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
774 where Assembler<'a>: CmpccxaddEmitter<A, B, C> {
775 <Self as CmpccxaddEmitter<A, B, C>>::cmpccxadd(self, op0, op1, op2);
776 }
777}