asmkit/x86/features/SSE41.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/// `SSE_BLENDPD` (BLENDPD).
11/// Double-precision floating-point values from the second source operand (third operand) are conditionally merged with values from the first source operand (second operand) and written to the destination operand (first operand). The immediate bits [3:0] determine whether the corresponding double precision floating-point value in the destination is copied from the second source or first source. If a bit in the mask, corresponding to a word, is ”1”, then the double precision floating-point value in the second source operand is copied, else the value in the first source operand is copied.
12///
13///
14/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/BLENDPD.html).
15///
16/// Supported operand variants:
17///
18/// ```text
19/// +---+---------------+
20/// | # | Operands |
21/// +---+---------------+
22/// | 1 | Xmm, Mem, Imm |
23/// | 2 | Xmm, Xmm, Imm |
24/// +---+---------------+
25/// ```
26pub trait SseBlendpdEmitter<A, B, C> {
27 fn sse_blendpd(&mut self, op0: A, op1: B, op2: C);
28}
29
30impl<'a> SseBlendpdEmitter<Xmm, Xmm, Imm> for Assembler<'a> {
31 fn sse_blendpd(&mut self, op0: Xmm, op1: Xmm, op2: Imm) {
32 self.emit(SSE_BLENDPDRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
33 }
34}
35
36impl<'a> SseBlendpdEmitter<Xmm, Mem, Imm> for Assembler<'a> {
37 fn sse_blendpd(&mut self, op0: Xmm, op1: Mem, op2: Imm) {
38 self.emit(SSE_BLENDPDRMI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
39 }
40}
41
42/// `SSE_BLENDPS` (BLENDPS).
43/// Packed single precision floating-point values from the second source operand (third operand) are conditionally merged with values from the first source operand (second operand) and written to the destination operand (first operand). The immediate bits [7:0] determine whether the corresponding single precision floating-point value in the destination is copied from the second source or first source. If a bit in the mask, corresponding to a word, is “1”, then the single precision floating-point value in the second source operand is copied, else the value in the first source operand is copied.
44///
45///
46/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/BLENDPS.html).
47///
48/// Supported operand variants:
49///
50/// ```text
51/// +---+---------------+
52/// | # | Operands |
53/// +---+---------------+
54/// | 1 | Xmm, Mem, Imm |
55/// | 2 | Xmm, Xmm, Imm |
56/// +---+---------------+
57/// ```
58pub trait SseBlendpsEmitter<A, B, C> {
59 fn sse_blendps(&mut self, op0: A, op1: B, op2: C);
60}
61
62impl<'a> SseBlendpsEmitter<Xmm, Xmm, Imm> for Assembler<'a> {
63 fn sse_blendps(&mut self, op0: Xmm, op1: Xmm, op2: Imm) {
64 self.emit(SSE_BLENDPSRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
65 }
66}
67
68impl<'a> SseBlendpsEmitter<Xmm, Mem, Imm> for Assembler<'a> {
69 fn sse_blendps(&mut self, op0: Xmm, op1: Mem, op2: Imm) {
70 self.emit(SSE_BLENDPSRMI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
71 }
72}
73
74/// `SSE_BLENDVPD` (BLENDVPD).
75/// Conditionally copy each quadword data element of double precision floating-point value from the second source operand and the first source operand depending on mask bits defined in the mask register operand. The mask bits are the most significant bit in each quadword element of the mask register.
76///
77///
78/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/BLENDVPD.html).
79///
80/// Supported operand variants:
81///
82/// ```text
83/// +---+---------------+
84/// | # | Operands |
85/// +---+---------------+
86/// | 1 | Xmm, Mem, Xmm |
87/// | 2 | Xmm, Xmm, Xmm |
88/// +---+---------------+
89/// ```
90pub trait SseBlendvpdEmitter<A, B, C> {
91 fn sse_blendvpd(&mut self, op0: A, op1: B, op2: C);
92}
93
94impl<'a> SseBlendvpdEmitter<Xmm, Xmm, Xmm> for Assembler<'a> {
95 fn sse_blendvpd(&mut self, op0: Xmm, op1: Xmm, op2: Xmm) {
96 self.emit(SSE_BLENDVPDRRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
97 }
98}
99
100impl<'a> SseBlendvpdEmitter<Xmm, Mem, Xmm> for Assembler<'a> {
101 fn sse_blendvpd(&mut self, op0: Xmm, op1: Mem, op2: Xmm) {
102 self.emit(SSE_BLENDVPDRMR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
103 }
104}
105
106/// `SSE_BLENDVPS` (BLENDVPS).
107/// Conditionally copy each dword data element of single precision floating-point value from the second source operand and the first source operand depending on mask bits defined in the mask register operand. The mask bits are the most significant bit in each dword element of the mask register.
108///
109///
110/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/BLENDVPS.html).
111///
112/// Supported operand variants:
113///
114/// ```text
115/// +---+---------------+
116/// | # | Operands |
117/// +---+---------------+
118/// | 1 | Xmm, Mem, Xmm |
119/// | 2 | Xmm, Xmm, Xmm |
120/// +---+---------------+
121/// ```
122pub trait SseBlendvpsEmitter<A, B, C> {
123 fn sse_blendvps(&mut self, op0: A, op1: B, op2: C);
124}
125
126impl<'a> SseBlendvpsEmitter<Xmm, Xmm, Xmm> for Assembler<'a> {
127 fn sse_blendvps(&mut self, op0: Xmm, op1: Xmm, op2: Xmm) {
128 self.emit(SSE_BLENDVPSRRR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
129 }
130}
131
132impl<'a> SseBlendvpsEmitter<Xmm, Mem, Xmm> for Assembler<'a> {
133 fn sse_blendvps(&mut self, op0: Xmm, op1: Mem, op2: Xmm) {
134 self.emit(SSE_BLENDVPSRMR, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
135 }
136}
137
138/// `SSE_DPPD` (DPPD).
139/// Conditionally multiplies the packed double precision floating-point values in the destination operand (first operand) with the packed double precision floating-point values in the source (second operand) depending on a mask extracted from bits [5:4] of the immediate operand (third operand). If a condition mask bit is zero, the corresponding multiplication is replaced by a value of 0.0 in the manner described by Section 12.8.4 of Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1.
140///
141///
142/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/DPPD.html).
143///
144/// Supported operand variants:
145///
146/// ```text
147/// +---+---------------+
148/// | # | Operands |
149/// +---+---------------+
150/// | 1 | Xmm, Mem, Imm |
151/// | 2 | Xmm, Xmm, Imm |
152/// +---+---------------+
153/// ```
154pub trait SseDppdEmitter<A, B, C> {
155 fn sse_dppd(&mut self, op0: A, op1: B, op2: C);
156}
157
158impl<'a> SseDppdEmitter<Xmm, Xmm, Imm> for Assembler<'a> {
159 fn sse_dppd(&mut self, op0: Xmm, op1: Xmm, op2: Imm) {
160 self.emit(SSE_DPPDRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
161 }
162}
163
164impl<'a> SseDppdEmitter<Xmm, Mem, Imm> for Assembler<'a> {
165 fn sse_dppd(&mut self, op0: Xmm, op1: Mem, op2: Imm) {
166 self.emit(SSE_DPPDRMI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
167 }
168}
169
170/// `SSE_DPPS` (DPPS).
171/// Conditionally multiplies the packed single precision floating-point values in the destination operand (first operand) with the packed single precision floats in the source (second operand) depending on a mask extracted from the high 4 bits of the immediate byte (third operand). If a condition mask bit in imm8[7:4] is zero, the corresponding multiplication is replaced by a value of 0.0 in the manner described by Section 12.8.4 of Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1.
172///
173///
174/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/DPPS.html).
175///
176/// Supported operand variants:
177///
178/// ```text
179/// +---+---------------+
180/// | # | Operands |
181/// +---+---------------+
182/// | 1 | Xmm, Mem, Imm |
183/// | 2 | Xmm, Xmm, Imm |
184/// +---+---------------+
185/// ```
186pub trait SseDppsEmitter<A, B, C> {
187 fn sse_dpps(&mut self, op0: A, op1: B, op2: C);
188}
189
190impl<'a> SseDppsEmitter<Xmm, Xmm, Imm> for Assembler<'a> {
191 fn sse_dpps(&mut self, op0: Xmm, op1: Xmm, op2: Imm) {
192 self.emit(SSE_DPPSRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
193 }
194}
195
196impl<'a> SseDppsEmitter<Xmm, Mem, Imm> for Assembler<'a> {
197 fn sse_dpps(&mut self, op0: Xmm, op1: Mem, op2: Imm) {
198 self.emit(SSE_DPPSRMI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
199 }
200}
201
202/// `SSE_EXTRACTPS` (EXTRACTPS).
203/// Extracts a single precision floating-point value from the source operand (second operand) at the 32-bit offset specified from imm8. Immediate bits higher than the most significant offset for the vector length are ignored.
204///
205///
206/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/EXTRACTPS.html).
207///
208/// Supported operand variants:
209///
210/// ```text
211/// +---+---------------+
212/// | # | Operands |
213/// +---+---------------+
214/// | 1 | Gpd, Xmm, Imm |
215/// | 2 | Mem, Xmm, Imm |
216/// +---+---------------+
217/// ```
218pub trait SseExtractpsEmitter<A, B, C> {
219 fn sse_extractps(&mut self, op0: A, op1: B, op2: C);
220}
221
222impl<'a> SseExtractpsEmitter<Gpd, Xmm, Imm> for Assembler<'a> {
223 fn sse_extractps(&mut self, op0: Gpd, op1: Xmm, op2: Imm) {
224 self.emit(SSE_EXTRACTPSRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
225 }
226}
227
228impl<'a> SseExtractpsEmitter<Mem, Xmm, Imm> for Assembler<'a> {
229 fn sse_extractps(&mut self, op0: Mem, op1: Xmm, op2: Imm) {
230 self.emit(SSE_EXTRACTPSMRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
231 }
232}
233
234/// `SSE_INSERTPS` (INSERTPS).
235/// (register source form)
236///
237///
238/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/INSERTPS.html).
239///
240/// Supported operand variants:
241///
242/// ```text
243/// +---+---------------+
244/// | # | Operands |
245/// +---+---------------+
246/// | 1 | Xmm, Mem, Imm |
247/// | 2 | Xmm, Xmm, Imm |
248/// +---+---------------+
249/// ```
250pub trait SseInsertpsEmitter<A, B, C> {
251 fn sse_insertps(&mut self, op0: A, op1: B, op2: C);
252}
253
254impl<'a> SseInsertpsEmitter<Xmm, Xmm, Imm> for Assembler<'a> {
255 fn sse_insertps(&mut self, op0: Xmm, op1: Xmm, op2: Imm) {
256 self.emit(SSE_INSERTPSRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
257 }
258}
259
260impl<'a> SseInsertpsEmitter<Xmm, Mem, Imm> for Assembler<'a> {
261 fn sse_insertps(&mut self, op0: Xmm, op1: Mem, op2: Imm) {
262 self.emit(SSE_INSERTPSRMI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
263 }
264}
265
266/// `SSE_MOVNTDQA` (MOVNTDQA).
267/// MOVNTDQA loads a double quadword from the source operand (second operand) to the destination operand (first operand) using a non-temporal hint if the memory source is WC (write combining) memory type. For WC memory type, the nontemporal hint may be implemented by loading a temporary internal buffer with the equivalent of an aligned cache line without filling this data to the cache. Any memory-type aliased lines in the cache will be snooped and flushed. Subsequent MOVNTDQA reads to unread portions of the WC cache line will receive data from the temporary internal buffer if data is available. The temporary internal buffer may be flushed by the processor at any time for any reason, for example
268///
269///
270/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/MOVNTDQA.html).
271///
272/// Supported operand variants:
273///
274/// ```text
275/// +---+----------+
276/// | # | Operands |
277/// +---+----------+
278/// | 1 | Xmm, Mem |
279/// +---+----------+
280/// ```
281pub trait SseMovntdqaEmitter<A, B> {
282 fn sse_movntdqa(&mut self, op0: A, op1: B);
283}
284
285impl<'a> SseMovntdqaEmitter<Xmm, Mem> for Assembler<'a> {
286 fn sse_movntdqa(&mut self, op0: Xmm, op1: Mem) {
287 self.emit(SSE_MOVNTDQARM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
288 }
289}
290
291/// `SSE_MPSADBW` (MPSADBW).
292/// (V)MPSADBW calculates packed word results of sum-absolute-difference (SAD) of unsigned bytes from two blocks of 32-bit dword elements, using two select fields in the immediate byte to select the offsets of the two blocks within the first source operand and the second operand. Packed SAD word results are calculated within each 128-bit lane. Each SAD word result is calculated between a stationary block_2 (whose offset within the second source operand is selected by a two bit select control, multiplied by 32 bits) and a sliding block_1 at consecutive byte-granular position within the first source operand. The offset of the first 32-bit block of block_1 is selectable using a one bit select control, multiplied by 32 bits.
293///
294///
295/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/MPSADBW.html).
296///
297/// Supported operand variants:
298///
299/// ```text
300/// +---+---------------+
301/// | # | Operands |
302/// +---+---------------+
303/// | 1 | Xmm, Mem, Imm |
304/// | 2 | Xmm, Xmm, Imm |
305/// +---+---------------+
306/// ```
307pub trait SseMpsadbwEmitter<A, B, C> {
308 fn sse_mpsadbw(&mut self, op0: A, op1: B, op2: C);
309}
310
311impl<'a> SseMpsadbwEmitter<Xmm, Xmm, Imm> for Assembler<'a> {
312 fn sse_mpsadbw(&mut self, op0: Xmm, op1: Xmm, op2: Imm) {
313 self.emit(SSE_MPSADBWRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
314 }
315}
316
317impl<'a> SseMpsadbwEmitter<Xmm, Mem, Imm> for Assembler<'a> {
318 fn sse_mpsadbw(&mut self, op0: Xmm, op1: Mem, op2: Imm) {
319 self.emit(SSE_MPSADBWRMI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
320 }
321}
322
323/// `SSE_PACKUSDW` (PACKUSDW).
324/// Converts packed signed doubleword integers in the first and second source operands into packed unsigned word integers using unsigned saturation to handle overflow conditions. If the signed doubleword value is beyond the range of an unsigned word (that is, greater than FFFFH or less than 0000H), the saturated unsigned word integer value of FFFFH or 0000H, respectively, is stored in the destination.
325///
326///
327/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PACKUSDW.html).
328///
329/// Supported operand variants:
330///
331/// ```text
332/// +---+----------+
333/// | # | Operands |
334/// +---+----------+
335/// | 1 | Xmm, Mem |
336/// | 2 | Xmm, Xmm |
337/// +---+----------+
338/// ```
339pub trait SsePackusdwEmitter<A, B> {
340 fn sse_packusdw(&mut self, op0: A, op1: B);
341}
342
343impl<'a> SsePackusdwEmitter<Xmm, Xmm> for Assembler<'a> {
344 fn sse_packusdw(&mut self, op0: Xmm, op1: Xmm) {
345 self.emit(SSE_PACKUSDWRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
346 }
347}
348
349impl<'a> SsePackusdwEmitter<Xmm, Mem> for Assembler<'a> {
350 fn sse_packusdw(&mut self, op0: Xmm, op1: Mem) {
351 self.emit(SSE_PACKUSDWRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
352 }
353}
354
355/// `SSE_PBLENDVB` (PBLENDVB).
356/// Conditionally copies byte elements from the source operand (second operand) to the destination operand (first operand) depending on mask bits defined in the implicit third register argument, XMM0. The mask bits are the most significant bit in each byte element of the XMM0 register.
357///
358///
359/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PBLENDVB.html).
360///
361/// Supported operand variants:
362///
363/// ```text
364/// +---+----------+
365/// | # | Operands |
366/// +---+----------+
367/// | 1 | Xmm, Mem |
368/// | 2 | Xmm, Xmm |
369/// +---+----------+
370/// ```
371pub trait SsePblendvbEmitter<A, B> {
372 fn sse_pblendvb(&mut self, op0: A, op1: B);
373}
374
375impl<'a> SsePblendvbEmitter<Xmm, Xmm> for Assembler<'a> {
376 fn sse_pblendvb(&mut self, op0: Xmm, op1: Xmm) {
377 self.emit(SSE_PBLENDVBRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
378 }
379}
380
381impl<'a> SsePblendvbEmitter<Xmm, Mem> for Assembler<'a> {
382 fn sse_pblendvb(&mut self, op0: Xmm, op1: Mem) {
383 self.emit(SSE_PBLENDVBRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
384 }
385}
386
387/// `SSE_PBLENDW` (PBLENDW).
388/// Words from the source operand (second operand) are conditionally written to the destination operand (first operand) depending on bits in the immediate operand (third operand). The immediate bits (bits 7:0) form a mask that determines whether the corresponding word in the destination is copied from the source. If a bit in the mask, corresponding to a word, is “1", then the word is copied, else the word element in the destination operand is unchanged.
389///
390///
391/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PBLENDW.html).
392///
393/// Supported operand variants:
394///
395/// ```text
396/// +---+---------------+
397/// | # | Operands |
398/// +---+---------------+
399/// | 1 | Xmm, Mem, Imm |
400/// | 2 | Xmm, Xmm, Imm |
401/// +---+---------------+
402/// ```
403pub trait SsePblendwEmitter<A, B, C> {
404 fn sse_pblendw(&mut self, op0: A, op1: B, op2: C);
405}
406
407impl<'a> SsePblendwEmitter<Xmm, Xmm, Imm> for Assembler<'a> {
408 fn sse_pblendw(&mut self, op0: Xmm, op1: Xmm, op2: Imm) {
409 self.emit(SSE_PBLENDWRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
410 }
411}
412
413impl<'a> SsePblendwEmitter<Xmm, Mem, Imm> for Assembler<'a> {
414 fn sse_pblendw(&mut self, op0: Xmm, op1: Mem, op2: Imm) {
415 self.emit(SSE_PBLENDWRMI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
416 }
417}
418
419/// `SSE_PCMPEQQ` (PCMPEQQ).
420/// Performs an SIMD compare for equality of the packed quadwords in the destination operand (first operand) and the source operand (second operand). If a pair of data elements is equal, the corresponding data element in the destination is set to all 1s; otherwise, it is set to 0s.
421///
422///
423/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PCMPEQQ.html).
424///
425/// Supported operand variants:
426///
427/// ```text
428/// +---+----------+
429/// | # | Operands |
430/// +---+----------+
431/// | 1 | Xmm, Mem |
432/// | 2 | Xmm, Xmm |
433/// +---+----------+
434/// ```
435pub trait SsePcmpeqqEmitter<A, B> {
436 fn sse_pcmpeqq(&mut self, op0: A, op1: B);
437}
438
439impl<'a> SsePcmpeqqEmitter<Xmm, Xmm> for Assembler<'a> {
440 fn sse_pcmpeqq(&mut self, op0: Xmm, op1: Xmm) {
441 self.emit(SSE_PCMPEQQRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
442 }
443}
444
445impl<'a> SsePcmpeqqEmitter<Xmm, Mem> for Assembler<'a> {
446 fn sse_pcmpeqq(&mut self, op0: Xmm, op1: Mem) {
447 self.emit(SSE_PCMPEQQRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
448 }
449}
450
451/// `SSE_PCMPGTQ` (PCMPGTQ).
452/// Performs an SIMD signed compare for the packed quadwords in the destination operand (first operand) and the source operand (second operand). If the data element in the first (destination) operand is greater than the corresponding element in the second (source) operand, the corresponding data element in the destination is set to all 1s; otherwise, it is set to 0s.
453///
454///
455/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PCMPGTQ.html).
456///
457/// Supported operand variants:
458///
459/// ```text
460/// +---+----------+
461/// | # | Operands |
462/// +---+----------+
463/// | 1 | Xmm, Mem |
464/// | 2 | Xmm, Xmm |
465/// +---+----------+
466/// ```
467pub trait SsePcmpgtqEmitter<A, B> {
468 fn sse_pcmpgtq(&mut self, op0: A, op1: B);
469}
470
471impl<'a> SsePcmpgtqEmitter<Xmm, Xmm> for Assembler<'a> {
472 fn sse_pcmpgtq(&mut self, op0: Xmm, op1: Xmm) {
473 self.emit(SSE_PCMPGTQRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
474 }
475}
476
477impl<'a> SsePcmpgtqEmitter<Xmm, Mem> for Assembler<'a> {
478 fn sse_pcmpgtq(&mut self, op0: Xmm, op1: Mem) {
479 self.emit(SSE_PCMPGTQRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
480 }
481}
482
483/// `SSE_PEXTRB` (PEXTRB).
484/// Extract a byte/dword/qword integer value from the source XMM register at a byte/dword/qword offset determined from imm8[3:0]. The destination can be a register or byte/dword/qword memory location. If the destination is a register, the upper bits of the register are zero extended.
485///
486///
487/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PEXTRB%3APEXTRD%3APEXTRQ.html).
488///
489/// Supported operand variants:
490///
491/// ```text
492/// +---+---------------+
493/// | # | Operands |
494/// +---+---------------+
495/// | 1 | Gpd, Xmm, Imm |
496/// | 2 | Mem, Xmm, Imm |
497/// +---+---------------+
498/// ```
499pub trait SsePextrbEmitter<A, B, C> {
500 fn sse_pextrb(&mut self, op0: A, op1: B, op2: C);
501}
502
503impl<'a> SsePextrbEmitter<Mem, Xmm, Imm> for Assembler<'a> {
504 fn sse_pextrb(&mut self, op0: Mem, op1: Xmm, op2: Imm) {
505 self.emit(SSE_PEXTRBMRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
506 }
507}
508
509impl<'a> SsePextrbEmitter<Gpd, Xmm, Imm> for Assembler<'a> {
510 fn sse_pextrb(&mut self, op0: Gpd, op1: Xmm, op2: Imm) {
511 self.emit(SSE_PEXTRBRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
512 }
513}
514
515/// `SSE_PEXTRD` (PEXTRD).
516/// Extract a byte/dword/qword integer value from the source XMM register at a byte/dword/qword offset determined from imm8[3:0]. The destination can be a register or byte/dword/qword memory location. If the destination is a register, the upper bits of the register are zero extended.
517///
518///
519/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PEXTRB%3APEXTRD%3APEXTRQ.html).
520///
521/// Supported operand variants:
522///
523/// ```text
524/// +---+---------------+
525/// | # | Operands |
526/// +---+---------------+
527/// | 1 | Gpd, Xmm, Imm |
528/// | 2 | Mem, Xmm, Imm |
529/// +---+---------------+
530/// ```
531pub trait SsePextrdEmitter<A, B, C> {
532 fn sse_pextrd(&mut self, op0: A, op1: B, op2: C);
533}
534
535impl<'a> SsePextrdEmitter<Gpd, Xmm, Imm> for Assembler<'a> {
536 fn sse_pextrd(&mut self, op0: Gpd, op1: Xmm, op2: Imm) {
537 self.emit(SSE_PEXTRDRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
538 }
539}
540
541impl<'a> SsePextrdEmitter<Mem, Xmm, Imm> for Assembler<'a> {
542 fn sse_pextrd(&mut self, op0: Mem, op1: Xmm, op2: Imm) {
543 self.emit(SSE_PEXTRDMRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
544 }
545}
546
547/// `SSE_PEXTRQ` (PEXTRQ).
548/// Extract a byte/dword/qword integer value from the source XMM register at a byte/dword/qword offset determined from imm8[3:0]. The destination can be a register or byte/dword/qword memory location. If the destination is a register, the upper bits of the register are zero extended.
549///
550///
551/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PEXTRB%3APEXTRD%3APEXTRQ.html).
552///
553/// Supported operand variants:
554///
555/// ```text
556/// +---+---------------+
557/// | # | Operands |
558/// +---+---------------+
559/// | 1 | Gpd, Xmm, Imm |
560/// | 2 | Mem, Xmm, Imm |
561/// +---+---------------+
562/// ```
563pub trait SsePextrqEmitter<A, B, C> {
564 fn sse_pextrq(&mut self, op0: A, op1: B, op2: C);
565}
566
567impl<'a> SsePextrqEmitter<Gpd, Xmm, Imm> for Assembler<'a> {
568 fn sse_pextrq(&mut self, op0: Gpd, op1: Xmm, op2: Imm) {
569 self.emit(SSE_PEXTRQRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
570 }
571}
572
573impl<'a> SsePextrqEmitter<Mem, Xmm, Imm> for Assembler<'a> {
574 fn sse_pextrq(&mut self, op0: Mem, op1: Xmm, op2: Imm) {
575 self.emit(SSE_PEXTRQMRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
576 }
577}
578
579/// `SSE_PHMINPOSUW` (PHMINPOSUW).
580/// Determine the minimum unsigned word value in the source operand (second operand) and place the unsigned word in the low word (bits 0-15) of the destination operand (first operand). The word index of the minimum value is stored in bits 16-18 of the destination operand. The remaining upper bits of the destination are set to zero.
581///
582///
583/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PHMINPOSUW.html).
584///
585/// Supported operand variants:
586///
587/// ```text
588/// +---+----------+
589/// | # | Operands |
590/// +---+----------+
591/// | 1 | Xmm, Mem |
592/// | 2 | Xmm, Xmm |
593/// +---+----------+
594/// ```
595pub trait SsePhminposuwEmitter<A, B> {
596 fn sse_phminposuw(&mut self, op0: A, op1: B);
597}
598
599impl<'a> SsePhminposuwEmitter<Xmm, Xmm> for Assembler<'a> {
600 fn sse_phminposuw(&mut self, op0: Xmm, op1: Xmm) {
601 self.emit(SSE_PHMINPOSUWRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
602 }
603}
604
605impl<'a> SsePhminposuwEmitter<Xmm, Mem> for Assembler<'a> {
606 fn sse_phminposuw(&mut self, op0: Xmm, op1: Mem) {
607 self.emit(SSE_PHMINPOSUWRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
608 }
609}
610
611/// `SSE_PINSRB` (PINSRB).
612/// Copies a byte/dword/qword from the source operand (second operand) and inserts it in the destination operand (first operand) at the location specified with the count operand (third operand). (The other elements in the destination register are left untouched.) The source operand can be a general-purpose register or a memory location. (When the source operand is a general-purpose register, PINSRB copies the low byte of the register.) The destination operand is an XMM register. The count operand is an 8-bit immediate. When specifying a qword[dword, byte] location in an XMM register, the [2, 4] least-significant bit(s) of the count operand specify the location.
613///
614///
615/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PINSRB%3APINSRD%3APINSRQ.html).
616///
617/// Supported operand variants:
618///
619/// ```text
620/// +---+---------------+
621/// | # | Operands |
622/// +---+---------------+
623/// | 1 | Xmm, Gpd, Imm |
624/// | 2 | Xmm, Mem, Imm |
625/// +---+---------------+
626/// ```
627pub trait SsePinsrbEmitter<A, B, C> {
628 fn sse_pinsrb(&mut self, op0: A, op1: B, op2: C);
629}
630
631impl<'a> SsePinsrbEmitter<Xmm, Gpd, Imm> for Assembler<'a> {
632 fn sse_pinsrb(&mut self, op0: Xmm, op1: Gpd, op2: Imm) {
633 self.emit(SSE_PINSRBRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
634 }
635}
636
637impl<'a> SsePinsrbEmitter<Xmm, Mem, Imm> for Assembler<'a> {
638 fn sse_pinsrb(&mut self, op0: Xmm, op1: Mem, op2: Imm) {
639 self.emit(SSE_PINSRBRMI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
640 }
641}
642
643/// `SSE_PINSRD` (PINSRD).
644/// Copies a byte/dword/qword from the source operand (second operand) and inserts it in the destination operand (first operand) at the location specified with the count operand (third operand). (The other elements in the destination register are left untouched.) The source operand can be a general-purpose register or a memory location. (When the source operand is a general-purpose register, PINSRB copies the low byte of the register.) The destination operand is an XMM register. The count operand is an 8-bit immediate. When specifying a qword[dword, byte] location in an XMM register, the [2, 4] least-significant bit(s) of the count operand specify the location.
645///
646///
647/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PINSRB%3APINSRD%3APINSRQ.html).
648///
649/// Supported operand variants:
650///
651/// ```text
652/// +---+---------------+
653/// | # | Operands |
654/// +---+---------------+
655/// | 1 | Xmm, Gpd, Imm |
656/// | 2 | Xmm, Mem, Imm |
657/// +---+---------------+
658/// ```
659pub trait SsePinsrdEmitter<A, B, C> {
660 fn sse_pinsrd(&mut self, op0: A, op1: B, op2: C);
661}
662
663impl<'a> SsePinsrdEmitter<Xmm, Gpd, Imm> for Assembler<'a> {
664 fn sse_pinsrd(&mut self, op0: Xmm, op1: Gpd, op2: Imm) {
665 self.emit(SSE_PINSRDRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
666 }
667}
668
669impl<'a> SsePinsrdEmitter<Xmm, Mem, Imm> for Assembler<'a> {
670 fn sse_pinsrd(&mut self, op0: Xmm, op1: Mem, op2: Imm) {
671 self.emit(SSE_PINSRDRMI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
672 }
673}
674
675/// `SSE_PINSRQ` (PINSRQ).
676/// Copies a byte/dword/qword from the source operand (second operand) and inserts it in the destination operand (first operand) at the location specified with the count operand (third operand). (The other elements in the destination register are left untouched.) The source operand can be a general-purpose register or a memory location. (When the source operand is a general-purpose register, PINSRB copies the low byte of the register.) The destination operand is an XMM register. The count operand is an 8-bit immediate. When specifying a qword[dword, byte] location in an XMM register, the [2, 4] least-significant bit(s) of the count operand specify the location.
677///
678///
679/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PINSRB%3APINSRD%3APINSRQ.html).
680///
681/// Supported operand variants:
682///
683/// ```text
684/// +---+---------------+
685/// | # | Operands |
686/// +---+---------------+
687/// | 1 | Xmm, Gpd, Imm |
688/// | 2 | Xmm, Mem, Imm |
689/// +---+---------------+
690/// ```
691pub trait SsePinsrqEmitter<A, B, C> {
692 fn sse_pinsrq(&mut self, op0: A, op1: B, op2: C);
693}
694
695impl<'a> SsePinsrqEmitter<Xmm, Gpd, Imm> for Assembler<'a> {
696 fn sse_pinsrq(&mut self, op0: Xmm, op1: Gpd, op2: Imm) {
697 self.emit(SSE_PINSRQRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
698 }
699}
700
701impl<'a> SsePinsrqEmitter<Xmm, Mem, Imm> for Assembler<'a> {
702 fn sse_pinsrq(&mut self, op0: Xmm, op1: Mem, op2: Imm) {
703 self.emit(SSE_PINSRQRMI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
704 }
705}
706
707/// `SSE_PMAXSB` (PMAXSB).
708/// Performs a SIMD compare of the packed signed byte, word, dword or qword integers in the second source operand and the first source operand and returns the maximum value for each pair of integers to the destination operand.
709///
710///
711/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMAXSB%3APMAXSW%3APMAXSD%3APMAXSQ.html).
712///
713/// Supported operand variants:
714///
715/// ```text
716/// +---+----------+
717/// | # | Operands |
718/// +---+----------+
719/// | 1 | Xmm, Mem |
720/// | 2 | Xmm, Xmm |
721/// +---+----------+
722/// ```
723pub trait SsePmaxsbEmitter<A, B> {
724 fn sse_pmaxsb(&mut self, op0: A, op1: B);
725}
726
727impl<'a> SsePmaxsbEmitter<Xmm, Xmm> for Assembler<'a> {
728 fn sse_pmaxsb(&mut self, op0: Xmm, op1: Xmm) {
729 self.emit(SSE_PMAXSBRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
730 }
731}
732
733impl<'a> SsePmaxsbEmitter<Xmm, Mem> for Assembler<'a> {
734 fn sse_pmaxsb(&mut self, op0: Xmm, op1: Mem) {
735 self.emit(SSE_PMAXSBRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
736 }
737}
738
739/// `SSE_PMAXSD` (PMAXSD).
740/// Performs a SIMD compare of the packed signed byte, word, dword or qword integers in the second source operand and the first source operand and returns the maximum value for each pair of integers to the destination operand.
741///
742///
743/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMAXSB%3APMAXSW%3APMAXSD%3APMAXSQ.html).
744///
745/// Supported operand variants:
746///
747/// ```text
748/// +---+----------+
749/// | # | Operands |
750/// +---+----------+
751/// | 1 | Xmm, Mem |
752/// | 2 | Xmm, Xmm |
753/// +---+----------+
754/// ```
755pub trait SsePmaxsdEmitter<A, B> {
756 fn sse_pmaxsd(&mut self, op0: A, op1: B);
757}
758
759impl<'a> SsePmaxsdEmitter<Xmm, Xmm> for Assembler<'a> {
760 fn sse_pmaxsd(&mut self, op0: Xmm, op1: Xmm) {
761 self.emit(SSE_PMAXSDRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
762 }
763}
764
765impl<'a> SsePmaxsdEmitter<Xmm, Mem> for Assembler<'a> {
766 fn sse_pmaxsd(&mut self, op0: Xmm, op1: Mem) {
767 self.emit(SSE_PMAXSDRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
768 }
769}
770
771/// `SSE_PMAXUD` (PMAXUD).
772/// Performs a SIMD compare of the packed unsigned dword or qword integers in the second source operand and the first source operand and returns the maximum value for each pair of integers to the destination operand.
773///
774///
775/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMAXUD%3APMAXUQ.html).
776///
777/// Supported operand variants:
778///
779/// ```text
780/// +---+----------+
781/// | # | Operands |
782/// +---+----------+
783/// | 1 | Xmm, Mem |
784/// | 2 | Xmm, Xmm |
785/// +---+----------+
786/// ```
787pub trait SsePmaxudEmitter<A, B> {
788 fn sse_pmaxud(&mut self, op0: A, op1: B);
789}
790
791impl<'a> SsePmaxudEmitter<Xmm, Xmm> for Assembler<'a> {
792 fn sse_pmaxud(&mut self, op0: Xmm, op1: Xmm) {
793 self.emit(SSE_PMAXUDRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
794 }
795}
796
797impl<'a> SsePmaxudEmitter<Xmm, Mem> for Assembler<'a> {
798 fn sse_pmaxud(&mut self, op0: Xmm, op1: Mem) {
799 self.emit(SSE_PMAXUDRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
800 }
801}
802
803/// `SSE_PMAXUW` (PMAXUW).
804/// Performs a SIMD compare of the packed unsigned byte, word integers in the second source operand and the first source operand and returns the maximum value for each pair of integers to the destination operand.
805///
806///
807/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMAXUB%3APMAXUW.html).
808///
809/// Supported operand variants:
810///
811/// ```text
812/// +---+----------+
813/// | # | Operands |
814/// +---+----------+
815/// | 1 | Xmm, Mem |
816/// | 2 | Xmm, Xmm |
817/// +---+----------+
818/// ```
819pub trait SsePmaxuwEmitter<A, B> {
820 fn sse_pmaxuw(&mut self, op0: A, op1: B);
821}
822
823impl<'a> SsePmaxuwEmitter<Xmm, Xmm> for Assembler<'a> {
824 fn sse_pmaxuw(&mut self, op0: Xmm, op1: Xmm) {
825 self.emit(SSE_PMAXUWRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
826 }
827}
828
829impl<'a> SsePmaxuwEmitter<Xmm, Mem> for Assembler<'a> {
830 fn sse_pmaxuw(&mut self, op0: Xmm, op1: Mem) {
831 self.emit(SSE_PMAXUWRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
832 }
833}
834
835/// `SSE_PMINSB` (PMINSB).
836/// Performs a SIMD compare of the packed signed byte, word, or dword integers in the second source operand and the first source operand and returns the minimum value for each pair of integers to the destination operand.
837///
838///
839/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMINSB%3APMINSW.html).
840///
841/// Supported operand variants:
842///
843/// ```text
844/// +---+----------+
845/// | # | Operands |
846/// +---+----------+
847/// | 1 | Xmm, Mem |
848/// | 2 | Xmm, Xmm |
849/// +---+----------+
850/// ```
851pub trait SsePminsbEmitter<A, B> {
852 fn sse_pminsb(&mut self, op0: A, op1: B);
853}
854
855impl<'a> SsePminsbEmitter<Xmm, Xmm> for Assembler<'a> {
856 fn sse_pminsb(&mut self, op0: Xmm, op1: Xmm) {
857 self.emit(SSE_PMINSBRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
858 }
859}
860
861impl<'a> SsePminsbEmitter<Xmm, Mem> for Assembler<'a> {
862 fn sse_pminsb(&mut self, op0: Xmm, op1: Mem) {
863 self.emit(SSE_PMINSBRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
864 }
865}
866
867/// `SSE_PMINSD` (PMINSD).
868/// Performs a SIMD compare of the packed signed dword or qword integers in the second source operand and the first source operand and returns the minimum value for each pair of integers to the destination operand.
869///
870///
871/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMINSD%3APMINSQ.html).
872///
873/// Supported operand variants:
874///
875/// ```text
876/// +---+----------+
877/// | # | Operands |
878/// +---+----------+
879/// | 1 | Xmm, Mem |
880/// | 2 | Xmm, Xmm |
881/// +---+----------+
882/// ```
883pub trait SsePminsdEmitter<A, B> {
884 fn sse_pminsd(&mut self, op0: A, op1: B);
885}
886
887impl<'a> SsePminsdEmitter<Xmm, Xmm> for Assembler<'a> {
888 fn sse_pminsd(&mut self, op0: Xmm, op1: Xmm) {
889 self.emit(SSE_PMINSDRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
890 }
891}
892
893impl<'a> SsePminsdEmitter<Xmm, Mem> for Assembler<'a> {
894 fn sse_pminsd(&mut self, op0: Xmm, op1: Mem) {
895 self.emit(SSE_PMINSDRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
896 }
897}
898
899/// `SSE_PMINUD` (PMINUD).
900/// Performs a SIMD compare of the packed unsigned dword/qword integers in the second source operand and the first source operand and returns the minimum value for each pair of integers to the destination operand.
901///
902///
903/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMINUD%3APMINUQ.html).
904///
905/// Supported operand variants:
906///
907/// ```text
908/// +---+----------+
909/// | # | Operands |
910/// +---+----------+
911/// | 1 | Xmm, Mem |
912/// | 2 | Xmm, Xmm |
913/// +---+----------+
914/// ```
915pub trait SsePminudEmitter<A, B> {
916 fn sse_pminud(&mut self, op0: A, op1: B);
917}
918
919impl<'a> SsePminudEmitter<Xmm, Xmm> for Assembler<'a> {
920 fn sse_pminud(&mut self, op0: Xmm, op1: Xmm) {
921 self.emit(SSE_PMINUDRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
922 }
923}
924
925impl<'a> SsePminudEmitter<Xmm, Mem> for Assembler<'a> {
926 fn sse_pminud(&mut self, op0: Xmm, op1: Mem) {
927 self.emit(SSE_PMINUDRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
928 }
929}
930
931/// `SSE_PMINUW` (PMINUW).
932/// Performs a SIMD compare of the packed unsigned byte or word integers in the second source operand and the first source operand and returns the minimum value for each pair of integers to the destination operand.
933///
934///
935/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMINUB%3APMINUW.html).
936///
937/// Supported operand variants:
938///
939/// ```text
940/// +---+----------+
941/// | # | Operands |
942/// +---+----------+
943/// | 1 | Xmm, Mem |
944/// | 2 | Xmm, Xmm |
945/// +---+----------+
946/// ```
947pub trait SsePminuwEmitter<A, B> {
948 fn sse_pminuw(&mut self, op0: A, op1: B);
949}
950
951impl<'a> SsePminuwEmitter<Xmm, Xmm> for Assembler<'a> {
952 fn sse_pminuw(&mut self, op0: Xmm, op1: Xmm) {
953 self.emit(SSE_PMINUWRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
954 }
955}
956
957impl<'a> SsePminuwEmitter<Xmm, Mem> for Assembler<'a> {
958 fn sse_pminuw(&mut self, op0: Xmm, op1: Mem) {
959 self.emit(SSE_PMINUWRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
960 }
961}
962
963/// `SSE_PMOVSXBD` (PMOVSXBD).
964/// Legacy and VEX encoded versions: Packed byte, word, or dword integers in the low bytes of the source operand (second operand) are sign extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
965///
966///
967/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVSX.html).
968///
969/// Supported operand variants:
970///
971/// ```text
972/// +---+----------+
973/// | # | Operands |
974/// +---+----------+
975/// | 1 | Xmm, Mem |
976/// | 2 | Xmm, Xmm |
977/// +---+----------+
978/// ```
979pub trait SsePmovsxbdEmitter<A, B> {
980 fn sse_pmovsxbd(&mut self, op0: A, op1: B);
981}
982
983impl<'a> SsePmovsxbdEmitter<Xmm, Xmm> for Assembler<'a> {
984 fn sse_pmovsxbd(&mut self, op0: Xmm, op1: Xmm) {
985 self.emit(SSE_PMOVSXBDRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
986 }
987}
988
989impl<'a> SsePmovsxbdEmitter<Xmm, Mem> for Assembler<'a> {
990 fn sse_pmovsxbd(&mut self, op0: Xmm, op1: Mem) {
991 self.emit(SSE_PMOVSXBDRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
992 }
993}
994
995/// `SSE_PMOVSXBQ` (PMOVSXBQ).
996/// Legacy and VEX encoded versions: Packed byte, word, or dword integers in the low bytes of the source operand (second operand) are sign extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
997///
998///
999/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVSX.html).
1000///
1001/// Supported operand variants:
1002///
1003/// ```text
1004/// +---+----------+
1005/// | # | Operands |
1006/// +---+----------+
1007/// | 1 | Xmm, Mem |
1008/// | 2 | Xmm, Xmm |
1009/// +---+----------+
1010/// ```
1011pub trait SsePmovsxbqEmitter<A, B> {
1012 fn sse_pmovsxbq(&mut self, op0: A, op1: B);
1013}
1014
1015impl<'a> SsePmovsxbqEmitter<Xmm, Xmm> for Assembler<'a> {
1016 fn sse_pmovsxbq(&mut self, op0: Xmm, op1: Xmm) {
1017 self.emit(SSE_PMOVSXBQRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1018 }
1019}
1020
1021impl<'a> SsePmovsxbqEmitter<Xmm, Mem> for Assembler<'a> {
1022 fn sse_pmovsxbq(&mut self, op0: Xmm, op1: Mem) {
1023 self.emit(SSE_PMOVSXBQRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1024 }
1025}
1026
1027/// `SSE_PMOVSXBW` (PMOVSXBW).
1028/// Legacy and VEX encoded versions: Packed byte, word, or dword integers in the low bytes of the source operand (second operand) are sign extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
1029///
1030///
1031/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVSX.html).
1032///
1033/// Supported operand variants:
1034///
1035/// ```text
1036/// +---+----------+
1037/// | # | Operands |
1038/// +---+----------+
1039/// | 1 | Xmm, Mem |
1040/// | 2 | Xmm, Xmm |
1041/// +---+----------+
1042/// ```
1043pub trait SsePmovsxbwEmitter<A, B> {
1044 fn sse_pmovsxbw(&mut self, op0: A, op1: B);
1045}
1046
1047impl<'a> SsePmovsxbwEmitter<Xmm, Xmm> for Assembler<'a> {
1048 fn sse_pmovsxbw(&mut self, op0: Xmm, op1: Xmm) {
1049 self.emit(SSE_PMOVSXBWRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1050 }
1051}
1052
1053impl<'a> SsePmovsxbwEmitter<Xmm, Mem> for Assembler<'a> {
1054 fn sse_pmovsxbw(&mut self, op0: Xmm, op1: Mem) {
1055 self.emit(SSE_PMOVSXBWRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1056 }
1057}
1058
1059/// `SSE_PMOVSXDQ` (PMOVSXDQ).
1060/// Legacy and VEX encoded versions: Packed byte, word, or dword integers in the low bytes of the source operand (second operand) are sign extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
1061///
1062///
1063/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVSX.html).
1064///
1065/// Supported operand variants:
1066///
1067/// ```text
1068/// +---+----------+
1069/// | # | Operands |
1070/// +---+----------+
1071/// | 1 | Xmm, Mem |
1072/// | 2 | Xmm, Xmm |
1073/// +---+----------+
1074/// ```
1075pub trait SsePmovsxdqEmitter<A, B> {
1076 fn sse_pmovsxdq(&mut self, op0: A, op1: B);
1077}
1078
1079impl<'a> SsePmovsxdqEmitter<Xmm, Xmm> for Assembler<'a> {
1080 fn sse_pmovsxdq(&mut self, op0: Xmm, op1: Xmm) {
1081 self.emit(SSE_PMOVSXDQRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1082 }
1083}
1084
1085impl<'a> SsePmovsxdqEmitter<Xmm, Mem> for Assembler<'a> {
1086 fn sse_pmovsxdq(&mut self, op0: Xmm, op1: Mem) {
1087 self.emit(SSE_PMOVSXDQRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1088 }
1089}
1090
1091/// `SSE_PMOVSXWD` (PMOVSXWD).
1092/// Legacy and VEX encoded versions: Packed byte, word, or dword integers in the low bytes of the source operand (second operand) are sign extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
1093///
1094///
1095/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVSX.html).
1096///
1097/// Supported operand variants:
1098///
1099/// ```text
1100/// +---+----------+
1101/// | # | Operands |
1102/// +---+----------+
1103/// | 1 | Xmm, Mem |
1104/// | 2 | Xmm, Xmm |
1105/// +---+----------+
1106/// ```
1107pub trait SsePmovsxwdEmitter<A, B> {
1108 fn sse_pmovsxwd(&mut self, op0: A, op1: B);
1109}
1110
1111impl<'a> SsePmovsxwdEmitter<Xmm, Xmm> for Assembler<'a> {
1112 fn sse_pmovsxwd(&mut self, op0: Xmm, op1: Xmm) {
1113 self.emit(SSE_PMOVSXWDRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1114 }
1115}
1116
1117impl<'a> SsePmovsxwdEmitter<Xmm, Mem> for Assembler<'a> {
1118 fn sse_pmovsxwd(&mut self, op0: Xmm, op1: Mem) {
1119 self.emit(SSE_PMOVSXWDRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1120 }
1121}
1122
1123/// `SSE_PMOVSXWQ` (PMOVSXWQ).
1124/// Legacy and VEX encoded versions: Packed byte, word, or dword integers in the low bytes of the source operand (second operand) are sign extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
1125///
1126///
1127/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVSX.html).
1128///
1129/// Supported operand variants:
1130///
1131/// ```text
1132/// +---+----------+
1133/// | # | Operands |
1134/// +---+----------+
1135/// | 1 | Xmm, Mem |
1136/// | 2 | Xmm, Xmm |
1137/// +---+----------+
1138/// ```
1139pub trait SsePmovsxwqEmitter<A, B> {
1140 fn sse_pmovsxwq(&mut self, op0: A, op1: B);
1141}
1142
1143impl<'a> SsePmovsxwqEmitter<Xmm, Xmm> for Assembler<'a> {
1144 fn sse_pmovsxwq(&mut self, op0: Xmm, op1: Xmm) {
1145 self.emit(SSE_PMOVSXWQRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1146 }
1147}
1148
1149impl<'a> SsePmovsxwqEmitter<Xmm, Mem> for Assembler<'a> {
1150 fn sse_pmovsxwq(&mut self, op0: Xmm, op1: Mem) {
1151 self.emit(SSE_PMOVSXWQRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1152 }
1153}
1154
1155/// `SSE_PMOVZXBD` (PMOVZXBD).
1156/// Legacy, VEX, and EVEX encoded versions: Packed byte, word, or dword integers starting from the low bytes of the source operand (second operand) are zero extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
1157///
1158///
1159/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVZX.html).
1160///
1161/// Supported operand variants:
1162///
1163/// ```text
1164/// +---+----------+
1165/// | # | Operands |
1166/// +---+----------+
1167/// | 1 | Xmm, Mem |
1168/// | 2 | Xmm, Xmm |
1169/// +---+----------+
1170/// ```
1171pub trait SsePmovzxbdEmitter<A, B> {
1172 fn sse_pmovzxbd(&mut self, op0: A, op1: B);
1173}
1174
1175impl<'a> SsePmovzxbdEmitter<Xmm, Xmm> for Assembler<'a> {
1176 fn sse_pmovzxbd(&mut self, op0: Xmm, op1: Xmm) {
1177 self.emit(SSE_PMOVZXBDRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1178 }
1179}
1180
1181impl<'a> SsePmovzxbdEmitter<Xmm, Mem> for Assembler<'a> {
1182 fn sse_pmovzxbd(&mut self, op0: Xmm, op1: Mem) {
1183 self.emit(SSE_PMOVZXBDRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1184 }
1185}
1186
1187/// `SSE_PMOVZXBQ` (PMOVZXBQ).
1188/// Legacy, VEX, and EVEX encoded versions: Packed byte, word, or dword integers starting from the low bytes of the source operand (second operand) are zero extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
1189///
1190///
1191/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVZX.html).
1192///
1193/// Supported operand variants:
1194///
1195/// ```text
1196/// +---+----------+
1197/// | # | Operands |
1198/// +---+----------+
1199/// | 1 | Xmm, Mem |
1200/// | 2 | Xmm, Xmm |
1201/// +---+----------+
1202/// ```
1203pub trait SsePmovzxbqEmitter<A, B> {
1204 fn sse_pmovzxbq(&mut self, op0: A, op1: B);
1205}
1206
1207impl<'a> SsePmovzxbqEmitter<Xmm, Xmm> for Assembler<'a> {
1208 fn sse_pmovzxbq(&mut self, op0: Xmm, op1: Xmm) {
1209 self.emit(SSE_PMOVZXBQRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1210 }
1211}
1212
1213impl<'a> SsePmovzxbqEmitter<Xmm, Mem> for Assembler<'a> {
1214 fn sse_pmovzxbq(&mut self, op0: Xmm, op1: Mem) {
1215 self.emit(SSE_PMOVZXBQRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1216 }
1217}
1218
1219/// `SSE_PMOVZXBW` (PMOVZXBW).
1220/// Legacy, VEX, and EVEX encoded versions: Packed byte, word, or dword integers starting from the low bytes of the source operand (second operand) are zero extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
1221///
1222///
1223/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVZX.html).
1224///
1225/// Supported operand variants:
1226///
1227/// ```text
1228/// +---+----------+
1229/// | # | Operands |
1230/// +---+----------+
1231/// | 1 | Xmm, Mem |
1232/// | 2 | Xmm, Xmm |
1233/// +---+----------+
1234/// ```
1235pub trait SsePmovzxbwEmitter<A, B> {
1236 fn sse_pmovzxbw(&mut self, op0: A, op1: B);
1237}
1238
1239impl<'a> SsePmovzxbwEmitter<Xmm, Xmm> for Assembler<'a> {
1240 fn sse_pmovzxbw(&mut self, op0: Xmm, op1: Xmm) {
1241 self.emit(SSE_PMOVZXBWRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1242 }
1243}
1244
1245impl<'a> SsePmovzxbwEmitter<Xmm, Mem> for Assembler<'a> {
1246 fn sse_pmovzxbw(&mut self, op0: Xmm, op1: Mem) {
1247 self.emit(SSE_PMOVZXBWRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1248 }
1249}
1250
1251/// `SSE_PMOVZXDQ` (PMOVZXDQ).
1252/// Legacy, VEX, and EVEX encoded versions: Packed byte, word, or dword integers starting from the low bytes of the source operand (second operand) are zero extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
1253///
1254///
1255/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVZX.html).
1256///
1257/// Supported operand variants:
1258///
1259/// ```text
1260/// +---+----------+
1261/// | # | Operands |
1262/// +---+----------+
1263/// | 1 | Xmm, Mem |
1264/// | 2 | Xmm, Xmm |
1265/// +---+----------+
1266/// ```
1267pub trait SsePmovzxdqEmitter<A, B> {
1268 fn sse_pmovzxdq(&mut self, op0: A, op1: B);
1269}
1270
1271impl<'a> SsePmovzxdqEmitter<Xmm, Xmm> for Assembler<'a> {
1272 fn sse_pmovzxdq(&mut self, op0: Xmm, op1: Xmm) {
1273 self.emit(SSE_PMOVZXDQRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1274 }
1275}
1276
1277impl<'a> SsePmovzxdqEmitter<Xmm, Mem> for Assembler<'a> {
1278 fn sse_pmovzxdq(&mut self, op0: Xmm, op1: Mem) {
1279 self.emit(SSE_PMOVZXDQRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1280 }
1281}
1282
1283/// `SSE_PMOVZXWD` (PMOVZXWD).
1284/// Legacy, VEX, and EVEX encoded versions: Packed byte, word, or dword integers starting from the low bytes of the source operand (second operand) are zero extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
1285///
1286///
1287/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVZX.html).
1288///
1289/// Supported operand variants:
1290///
1291/// ```text
1292/// +---+----------+
1293/// | # | Operands |
1294/// +---+----------+
1295/// | 1 | Xmm, Mem |
1296/// | 2 | Xmm, Xmm |
1297/// +---+----------+
1298/// ```
1299pub trait SsePmovzxwdEmitter<A, B> {
1300 fn sse_pmovzxwd(&mut self, op0: A, op1: B);
1301}
1302
1303impl<'a> SsePmovzxwdEmitter<Xmm, Xmm> for Assembler<'a> {
1304 fn sse_pmovzxwd(&mut self, op0: Xmm, op1: Xmm) {
1305 self.emit(SSE_PMOVZXWDRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1306 }
1307}
1308
1309impl<'a> SsePmovzxwdEmitter<Xmm, Mem> for Assembler<'a> {
1310 fn sse_pmovzxwd(&mut self, op0: Xmm, op1: Mem) {
1311 self.emit(SSE_PMOVZXWDRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1312 }
1313}
1314
1315/// `SSE_PMOVZXWQ` (PMOVZXWQ).
1316/// Legacy, VEX, and EVEX encoded versions: Packed byte, word, or dword integers starting from the low bytes of the source operand (second operand) are zero extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
1317///
1318///
1319/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVZX.html).
1320///
1321/// Supported operand variants:
1322///
1323/// ```text
1324/// +---+----------+
1325/// | # | Operands |
1326/// +---+----------+
1327/// | 1 | Xmm, Mem |
1328/// | 2 | Xmm, Xmm |
1329/// +---+----------+
1330/// ```
1331pub trait SsePmovzxwqEmitter<A, B> {
1332 fn sse_pmovzxwq(&mut self, op0: A, op1: B);
1333}
1334
1335impl<'a> SsePmovzxwqEmitter<Xmm, Xmm> for Assembler<'a> {
1336 fn sse_pmovzxwq(&mut self, op0: Xmm, op1: Xmm) {
1337 self.emit(SSE_PMOVZXWQRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1338 }
1339}
1340
1341impl<'a> SsePmovzxwqEmitter<Xmm, Mem> for Assembler<'a> {
1342 fn sse_pmovzxwq(&mut self, op0: Xmm, op1: Mem) {
1343 self.emit(SSE_PMOVZXWQRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1344 }
1345}
1346
1347/// `SSE_PMULDQ` (PMULDQ).
1348/// Multiplies packed signed doubleword integers in the even-numbered (zero-based reference) elements of the first source operand with the packed signed doubleword integers in the corresponding elements of the second source operand and stores packed signed quadword results in the destination operand.
1349///
1350///
1351/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMULDQ.html).
1352///
1353/// Supported operand variants:
1354///
1355/// ```text
1356/// +---+----------+
1357/// | # | Operands |
1358/// +---+----------+
1359/// | 1 | Xmm, Mem |
1360/// | 2 | Xmm, Xmm |
1361/// +---+----------+
1362/// ```
1363pub trait SsePmuldqEmitter<A, B> {
1364 fn sse_pmuldq(&mut self, op0: A, op1: B);
1365}
1366
1367impl<'a> SsePmuldqEmitter<Xmm, Xmm> for Assembler<'a> {
1368 fn sse_pmuldq(&mut self, op0: Xmm, op1: Xmm) {
1369 self.emit(SSE_PMULDQRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1370 }
1371}
1372
1373impl<'a> SsePmuldqEmitter<Xmm, Mem> for Assembler<'a> {
1374 fn sse_pmuldq(&mut self, op0: Xmm, op1: Mem) {
1375 self.emit(SSE_PMULDQRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1376 }
1377}
1378
1379/// `SSE_PMULLD` (PMULLD).
1380/// Performs a SIMD signed multiply of the packed signed dword/qword integers from each element of the first source operand with the corresponding element in the second source operand. The low 32/64 bits of each 64/128-bit intermediate results are stored to the destination operand.
1381///
1382///
1383/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMULLD%3APMULLQ.html).
1384///
1385/// Supported operand variants:
1386///
1387/// ```text
1388/// +---+----------+
1389/// | # | Operands |
1390/// +---+----------+
1391/// | 1 | Xmm, Mem |
1392/// | 2 | Xmm, Xmm |
1393/// +---+----------+
1394/// ```
1395pub trait SsePmulldEmitter<A, B> {
1396 fn sse_pmulld(&mut self, op0: A, op1: B);
1397}
1398
1399impl<'a> SsePmulldEmitter<Xmm, Xmm> for Assembler<'a> {
1400 fn sse_pmulld(&mut self, op0: Xmm, op1: Xmm) {
1401 self.emit(SSE_PMULLDRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1402 }
1403}
1404
1405impl<'a> SsePmulldEmitter<Xmm, Mem> for Assembler<'a> {
1406 fn sse_pmulld(&mut self, op0: Xmm, op1: Mem) {
1407 self.emit(SSE_PMULLDRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1408 }
1409}
1410
1411/// `SSE_PTEST` (PTEST).
1412/// PTEST and VPTEST set the ZF flag if all bits in the result are 0 of the bitwise AND of the first source operand (first operand) and the second source operand (second operand). VPTEST sets the CF flag if all bits in the result are 0 of the bitwise AND of the second source operand (second operand) and the logical NOT of the destination operand.
1413///
1414///
1415/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PTEST.html).
1416///
1417/// Supported operand variants:
1418///
1419/// ```text
1420/// +---+----------+
1421/// | # | Operands |
1422/// +---+----------+
1423/// | 1 | Xmm, Mem |
1424/// | 2 | Xmm, Xmm |
1425/// +---+----------+
1426/// ```
1427pub trait SsePtestEmitter<A, B> {
1428 fn sse_ptest(&mut self, op0: A, op1: B);
1429}
1430
1431impl<'a> SsePtestEmitter<Xmm, Xmm> for Assembler<'a> {
1432 fn sse_ptest(&mut self, op0: Xmm, op1: Xmm) {
1433 self.emit(SSE_PTESTRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1434 }
1435}
1436
1437impl<'a> SsePtestEmitter<Xmm, Mem> for Assembler<'a> {
1438 fn sse_ptest(&mut self, op0: Xmm, op1: Mem) {
1439 self.emit(SSE_PTESTRM, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1440 }
1441}
1442
1443/// `SSE_ROUNDPD` (ROUNDPD).
1444/// Round the 2 double precision floating-point values in the source operand (second operand) using the rounding mode specified in the immediate operand (third operand) and place the results in the destination operand (first operand). The rounding process rounds each input floating-point value to an integer value and returns the integer result as a double precision floating-point value.
1445///
1446///
1447/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/ROUNDPD.html).
1448///
1449/// Supported operand variants:
1450///
1451/// ```text
1452/// +---+---------------+
1453/// | # | Operands |
1454/// +---+---------------+
1455/// | 1 | Xmm, Mem, Imm |
1456/// | 2 | Xmm, Xmm, Imm |
1457/// +---+---------------+
1458/// ```
1459pub trait SseRoundpdEmitter<A, B, C> {
1460 fn sse_roundpd(&mut self, op0: A, op1: B, op2: C);
1461}
1462
1463impl<'a> SseRoundpdEmitter<Xmm, Xmm, Imm> for Assembler<'a> {
1464 fn sse_roundpd(&mut self, op0: Xmm, op1: Xmm, op2: Imm) {
1465 self.emit(SSE_ROUNDPDRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
1466 }
1467}
1468
1469impl<'a> SseRoundpdEmitter<Xmm, Mem, Imm> for Assembler<'a> {
1470 fn sse_roundpd(&mut self, op0: Xmm, op1: Mem, op2: Imm) {
1471 self.emit(SSE_ROUNDPDRMI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
1472 }
1473}
1474
1475/// `SSE_ROUNDPS` (ROUNDPS).
1476/// Round the 4 single precision floating-point values in the source operand (second operand) using the rounding mode specified in the immediate operand (third operand) and place the results in the destination operand (first operand). The rounding process rounds each input floating-point value to an integer value and returns the integer result as a single precision floating-point value.
1477///
1478///
1479/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/ROUNDPS.html).
1480///
1481/// Supported operand variants:
1482///
1483/// ```text
1484/// +---+---------------+
1485/// | # | Operands |
1486/// +---+---------------+
1487/// | 1 | Xmm, Mem, Imm |
1488/// | 2 | Xmm, Xmm, Imm |
1489/// +---+---------------+
1490/// ```
1491pub trait SseRoundpsEmitter<A, B, C> {
1492 fn sse_roundps(&mut self, op0: A, op1: B, op2: C);
1493}
1494
1495impl<'a> SseRoundpsEmitter<Xmm, Xmm, Imm> for Assembler<'a> {
1496 fn sse_roundps(&mut self, op0: Xmm, op1: Xmm, op2: Imm) {
1497 self.emit(SSE_ROUNDPSRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
1498 }
1499}
1500
1501impl<'a> SseRoundpsEmitter<Xmm, Mem, Imm> for Assembler<'a> {
1502 fn sse_roundps(&mut self, op0: Xmm, op1: Mem, op2: Imm) {
1503 self.emit(SSE_ROUNDPSRMI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
1504 }
1505}
1506
1507/// `SSE_ROUNDSD` (ROUNDSD).
1508/// Round the double precision floating-point value in the lower qword of the source operand (second operand) using the rounding mode specified in the immediate operand (third operand) and place the result in the destination operand (first operand). The rounding process rounds a double precision floating-point input to an integer value and returns the integer result as a double precision floating-point value in the lowest position. The upper double precision floating-point value in the destination is retained.
1509///
1510///
1511/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/ROUNDSD.html).
1512///
1513/// Supported operand variants:
1514///
1515/// ```text
1516/// +---+---------------+
1517/// | # | Operands |
1518/// +---+---------------+
1519/// | 1 | Xmm, Mem, Imm |
1520/// | 2 | Xmm, Xmm, Imm |
1521/// +---+---------------+
1522/// ```
1523pub trait SseRoundsdEmitter<A, B, C> {
1524 fn sse_roundsd(&mut self, op0: A, op1: B, op2: C);
1525}
1526
1527impl<'a> SseRoundsdEmitter<Xmm, Xmm, Imm> for Assembler<'a> {
1528 fn sse_roundsd(&mut self, op0: Xmm, op1: Xmm, op2: Imm) {
1529 self.emit(SSE_ROUNDSDRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
1530 }
1531}
1532
1533impl<'a> SseRoundsdEmitter<Xmm, Mem, Imm> for Assembler<'a> {
1534 fn sse_roundsd(&mut self, op0: Xmm, op1: Mem, op2: Imm) {
1535 self.emit(SSE_ROUNDSDRMI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
1536 }
1537}
1538
1539/// `SSE_ROUNDSS` (ROUNDSS).
1540/// Round the single precision floating-point value in the lowest dword of the source operand (second operand) using the rounding mode specified in the immediate operand (third operand) and place the result in the destination operand (first operand). The rounding process rounds a single precision floating-point input to an integer value and returns the result as a single precision floating-point value in the lowest position. The upper three single precision floating-point values in the destination are retained.
1541///
1542///
1543/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/ROUNDSS.html).
1544///
1545/// Supported operand variants:
1546///
1547/// ```text
1548/// +---+---------------+
1549/// | # | Operands |
1550/// +---+---------------+
1551/// | 1 | Xmm, Mem, Imm |
1552/// | 2 | Xmm, Xmm, Imm |
1553/// +---+---------------+
1554/// ```
1555pub trait SseRoundssEmitter<A, B, C> {
1556 fn sse_roundss(&mut self, op0: A, op1: B, op2: C);
1557}
1558
1559impl<'a> SseRoundssEmitter<Xmm, Xmm, Imm> for Assembler<'a> {
1560 fn sse_roundss(&mut self, op0: Xmm, op1: Xmm, op2: Imm) {
1561 self.emit(SSE_ROUNDSSRRI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
1562 }
1563}
1564
1565impl<'a> SseRoundssEmitter<Xmm, Mem, Imm> for Assembler<'a> {
1566 fn sse_roundss(&mut self, op0: Xmm, op1: Mem, op2: Imm) {
1567 self.emit(SSE_ROUNDSSRMI, op0.as_operand(), op1.as_operand(), op2.as_operand(), &NOREG);
1568 }
1569}
1570
1571
1572impl<'a> Assembler<'a> {
1573 /// `SSE_BLENDPD` (BLENDPD).
1574 /// Double-precision floating-point values from the second source operand (third operand) are conditionally merged with values from the first source operand (second operand) and written to the destination operand (first operand). The immediate bits [3:0] determine whether the corresponding double precision floating-point value in the destination is copied from the second source or first source. If a bit in the mask, corresponding to a word, is ”1”, then the double precision floating-point value in the second source operand is copied, else the value in the first source operand is copied.
1575 ///
1576 ///
1577 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/BLENDPD.html).
1578 ///
1579 /// Supported operand variants:
1580 ///
1581 /// ```text
1582 /// +---+---------------+
1583 /// | # | Operands |
1584 /// +---+---------------+
1585 /// | 1 | Xmm, Mem, Imm |
1586 /// | 2 | Xmm, Xmm, Imm |
1587 /// +---+---------------+
1588 /// ```
1589 #[inline]
1590 pub fn sse_blendpd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
1591 where Assembler<'a>: SseBlendpdEmitter<A, B, C> {
1592 <Self as SseBlendpdEmitter<A, B, C>>::sse_blendpd(self, op0, op1, op2);
1593 }
1594 /// `SSE_BLENDPS` (BLENDPS).
1595 /// Packed single precision floating-point values from the second source operand (third operand) are conditionally merged with values from the first source operand (second operand) and written to the destination operand (first operand). The immediate bits [7:0] determine whether the corresponding single precision floating-point value in the destination is copied from the second source or first source. If a bit in the mask, corresponding to a word, is “1”, then the single precision floating-point value in the second source operand is copied, else the value in the first source operand is copied.
1596 ///
1597 ///
1598 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/BLENDPS.html).
1599 ///
1600 /// Supported operand variants:
1601 ///
1602 /// ```text
1603 /// +---+---------------+
1604 /// | # | Operands |
1605 /// +---+---------------+
1606 /// | 1 | Xmm, Mem, Imm |
1607 /// | 2 | Xmm, Xmm, Imm |
1608 /// +---+---------------+
1609 /// ```
1610 #[inline]
1611 pub fn sse_blendps<A, B, C>(&mut self, op0: A, op1: B, op2: C)
1612 where Assembler<'a>: SseBlendpsEmitter<A, B, C> {
1613 <Self as SseBlendpsEmitter<A, B, C>>::sse_blendps(self, op0, op1, op2);
1614 }
1615 /// `SSE_BLENDVPD` (BLENDVPD).
1616 /// Conditionally copy each quadword data element of double precision floating-point value from the second source operand and the first source operand depending on mask bits defined in the mask register operand. The mask bits are the most significant bit in each quadword element of the mask register.
1617 ///
1618 ///
1619 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/BLENDVPD.html).
1620 ///
1621 /// Supported operand variants:
1622 ///
1623 /// ```text
1624 /// +---+---------------+
1625 /// | # | Operands |
1626 /// +---+---------------+
1627 /// | 1 | Xmm, Mem, Xmm |
1628 /// | 2 | Xmm, Xmm, Xmm |
1629 /// +---+---------------+
1630 /// ```
1631 #[inline]
1632 pub fn sse_blendvpd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
1633 where Assembler<'a>: SseBlendvpdEmitter<A, B, C> {
1634 <Self as SseBlendvpdEmitter<A, B, C>>::sse_blendvpd(self, op0, op1, op2);
1635 }
1636 /// `SSE_BLENDVPS` (BLENDVPS).
1637 /// Conditionally copy each dword data element of single precision floating-point value from the second source operand and the first source operand depending on mask bits defined in the mask register operand. The mask bits are the most significant bit in each dword element of the mask register.
1638 ///
1639 ///
1640 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/BLENDVPS.html).
1641 ///
1642 /// Supported operand variants:
1643 ///
1644 /// ```text
1645 /// +---+---------------+
1646 /// | # | Operands |
1647 /// +---+---------------+
1648 /// | 1 | Xmm, Mem, Xmm |
1649 /// | 2 | Xmm, Xmm, Xmm |
1650 /// +---+---------------+
1651 /// ```
1652 #[inline]
1653 pub fn sse_blendvps<A, B, C>(&mut self, op0: A, op1: B, op2: C)
1654 where Assembler<'a>: SseBlendvpsEmitter<A, B, C> {
1655 <Self as SseBlendvpsEmitter<A, B, C>>::sse_blendvps(self, op0, op1, op2);
1656 }
1657 /// `SSE_DPPD` (DPPD).
1658 /// Conditionally multiplies the packed double precision floating-point values in the destination operand (first operand) with the packed double precision floating-point values in the source (second operand) depending on a mask extracted from bits [5:4] of the immediate operand (third operand). If a condition mask bit is zero, the corresponding multiplication is replaced by a value of 0.0 in the manner described by Section 12.8.4 of Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1.
1659 ///
1660 ///
1661 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/DPPD.html).
1662 ///
1663 /// Supported operand variants:
1664 ///
1665 /// ```text
1666 /// +---+---------------+
1667 /// | # | Operands |
1668 /// +---+---------------+
1669 /// | 1 | Xmm, Mem, Imm |
1670 /// | 2 | Xmm, Xmm, Imm |
1671 /// +---+---------------+
1672 /// ```
1673 #[inline]
1674 pub fn sse_dppd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
1675 where Assembler<'a>: SseDppdEmitter<A, B, C> {
1676 <Self as SseDppdEmitter<A, B, C>>::sse_dppd(self, op0, op1, op2);
1677 }
1678 /// `SSE_DPPS` (DPPS).
1679 /// Conditionally multiplies the packed single precision floating-point values in the destination operand (first operand) with the packed single precision floats in the source (second operand) depending on a mask extracted from the high 4 bits of the immediate byte (third operand). If a condition mask bit in imm8[7:4] is zero, the corresponding multiplication is replaced by a value of 0.0 in the manner described by Section 12.8.4 of Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1.
1680 ///
1681 ///
1682 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/DPPS.html).
1683 ///
1684 /// Supported operand variants:
1685 ///
1686 /// ```text
1687 /// +---+---------------+
1688 /// | # | Operands |
1689 /// +---+---------------+
1690 /// | 1 | Xmm, Mem, Imm |
1691 /// | 2 | Xmm, Xmm, Imm |
1692 /// +---+---------------+
1693 /// ```
1694 #[inline]
1695 pub fn sse_dpps<A, B, C>(&mut self, op0: A, op1: B, op2: C)
1696 where Assembler<'a>: SseDppsEmitter<A, B, C> {
1697 <Self as SseDppsEmitter<A, B, C>>::sse_dpps(self, op0, op1, op2);
1698 }
1699 /// `SSE_EXTRACTPS` (EXTRACTPS).
1700 /// Extracts a single precision floating-point value from the source operand (second operand) at the 32-bit offset specified from imm8. Immediate bits higher than the most significant offset for the vector length are ignored.
1701 ///
1702 ///
1703 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/EXTRACTPS.html).
1704 ///
1705 /// Supported operand variants:
1706 ///
1707 /// ```text
1708 /// +---+---------------+
1709 /// | # | Operands |
1710 /// +---+---------------+
1711 /// | 1 | Gpd, Xmm, Imm |
1712 /// | 2 | Mem, Xmm, Imm |
1713 /// +---+---------------+
1714 /// ```
1715 #[inline]
1716 pub fn sse_extractps<A, B, C>(&mut self, op0: A, op1: B, op2: C)
1717 where Assembler<'a>: SseExtractpsEmitter<A, B, C> {
1718 <Self as SseExtractpsEmitter<A, B, C>>::sse_extractps(self, op0, op1, op2);
1719 }
1720 /// `SSE_INSERTPS` (INSERTPS).
1721 /// (register source form)
1722 ///
1723 ///
1724 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/INSERTPS.html).
1725 ///
1726 /// Supported operand variants:
1727 ///
1728 /// ```text
1729 /// +---+---------------+
1730 /// | # | Operands |
1731 /// +---+---------------+
1732 /// | 1 | Xmm, Mem, Imm |
1733 /// | 2 | Xmm, Xmm, Imm |
1734 /// +---+---------------+
1735 /// ```
1736 #[inline]
1737 pub fn sse_insertps<A, B, C>(&mut self, op0: A, op1: B, op2: C)
1738 where Assembler<'a>: SseInsertpsEmitter<A, B, C> {
1739 <Self as SseInsertpsEmitter<A, B, C>>::sse_insertps(self, op0, op1, op2);
1740 }
1741 /// `SSE_MOVNTDQA` (MOVNTDQA).
1742 /// MOVNTDQA loads a double quadword from the source operand (second operand) to the destination operand (first operand) using a non-temporal hint if the memory source is WC (write combining) memory type. For WC memory type, the nontemporal hint may be implemented by loading a temporary internal buffer with the equivalent of an aligned cache line without filling this data to the cache. Any memory-type aliased lines in the cache will be snooped and flushed. Subsequent MOVNTDQA reads to unread portions of the WC cache line will receive data from the temporary internal buffer if data is available. The temporary internal buffer may be flushed by the processor at any time for any reason, for example
1743 ///
1744 ///
1745 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/MOVNTDQA.html).
1746 ///
1747 /// Supported operand variants:
1748 ///
1749 /// ```text
1750 /// +---+----------+
1751 /// | # | Operands |
1752 /// +---+----------+
1753 /// | 1 | Xmm, Mem |
1754 /// +---+----------+
1755 /// ```
1756 #[inline]
1757 pub fn sse_movntdqa<A, B>(&mut self, op0: A, op1: B)
1758 where Assembler<'a>: SseMovntdqaEmitter<A, B> {
1759 <Self as SseMovntdqaEmitter<A, B>>::sse_movntdqa(self, op0, op1);
1760 }
1761 /// `SSE_MPSADBW` (MPSADBW).
1762 /// (V)MPSADBW calculates packed word results of sum-absolute-difference (SAD) of unsigned bytes from two blocks of 32-bit dword elements, using two select fields in the immediate byte to select the offsets of the two blocks within the first source operand and the second operand. Packed SAD word results are calculated within each 128-bit lane. Each SAD word result is calculated between a stationary block_2 (whose offset within the second source operand is selected by a two bit select control, multiplied by 32 bits) and a sliding block_1 at consecutive byte-granular position within the first source operand. The offset of the first 32-bit block of block_1 is selectable using a one bit select control, multiplied by 32 bits.
1763 ///
1764 ///
1765 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/MPSADBW.html).
1766 ///
1767 /// Supported operand variants:
1768 ///
1769 /// ```text
1770 /// +---+---------------+
1771 /// | # | Operands |
1772 /// +---+---------------+
1773 /// | 1 | Xmm, Mem, Imm |
1774 /// | 2 | Xmm, Xmm, Imm |
1775 /// +---+---------------+
1776 /// ```
1777 #[inline]
1778 pub fn sse_mpsadbw<A, B, C>(&mut self, op0: A, op1: B, op2: C)
1779 where Assembler<'a>: SseMpsadbwEmitter<A, B, C> {
1780 <Self as SseMpsadbwEmitter<A, B, C>>::sse_mpsadbw(self, op0, op1, op2);
1781 }
1782 /// `SSE_PACKUSDW` (PACKUSDW).
1783 /// Converts packed signed doubleword integers in the first and second source operands into packed unsigned word integers using unsigned saturation to handle overflow conditions. If the signed doubleword value is beyond the range of an unsigned word (that is, greater than FFFFH or less than 0000H), the saturated unsigned word integer value of FFFFH or 0000H, respectively, is stored in the destination.
1784 ///
1785 ///
1786 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PACKUSDW.html).
1787 ///
1788 /// Supported operand variants:
1789 ///
1790 /// ```text
1791 /// +---+----------+
1792 /// | # | Operands |
1793 /// +---+----------+
1794 /// | 1 | Xmm, Mem |
1795 /// | 2 | Xmm, Xmm |
1796 /// +---+----------+
1797 /// ```
1798 #[inline]
1799 pub fn sse_packusdw<A, B>(&mut self, op0: A, op1: B)
1800 where Assembler<'a>: SsePackusdwEmitter<A, B> {
1801 <Self as SsePackusdwEmitter<A, B>>::sse_packusdw(self, op0, op1);
1802 }
1803 /// `SSE_PBLENDVB` (PBLENDVB).
1804 /// Conditionally copies byte elements from the source operand (second operand) to the destination operand (first operand) depending on mask bits defined in the implicit third register argument, XMM0. The mask bits are the most significant bit in each byte element of the XMM0 register.
1805 ///
1806 ///
1807 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PBLENDVB.html).
1808 ///
1809 /// Supported operand variants:
1810 ///
1811 /// ```text
1812 /// +---+----------+
1813 /// | # | Operands |
1814 /// +---+----------+
1815 /// | 1 | Xmm, Mem |
1816 /// | 2 | Xmm, Xmm |
1817 /// +---+----------+
1818 /// ```
1819 #[inline]
1820 pub fn sse_pblendvb<A, B>(&mut self, op0: A, op1: B)
1821 where Assembler<'a>: SsePblendvbEmitter<A, B> {
1822 <Self as SsePblendvbEmitter<A, B>>::sse_pblendvb(self, op0, op1);
1823 }
1824 /// `SSE_PBLENDW` (PBLENDW).
1825 /// Words from the source operand (second operand) are conditionally written to the destination operand (first operand) depending on bits in the immediate operand (third operand). The immediate bits (bits 7:0) form a mask that determines whether the corresponding word in the destination is copied from the source. If a bit in the mask, corresponding to a word, is “1", then the word is copied, else the word element in the destination operand is unchanged.
1826 ///
1827 ///
1828 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PBLENDW.html).
1829 ///
1830 /// Supported operand variants:
1831 ///
1832 /// ```text
1833 /// +---+---------------+
1834 /// | # | Operands |
1835 /// +---+---------------+
1836 /// | 1 | Xmm, Mem, Imm |
1837 /// | 2 | Xmm, Xmm, Imm |
1838 /// +---+---------------+
1839 /// ```
1840 #[inline]
1841 pub fn sse_pblendw<A, B, C>(&mut self, op0: A, op1: B, op2: C)
1842 where Assembler<'a>: SsePblendwEmitter<A, B, C> {
1843 <Self as SsePblendwEmitter<A, B, C>>::sse_pblendw(self, op0, op1, op2);
1844 }
1845 /// `SSE_PCMPEQQ` (PCMPEQQ).
1846 /// Performs an SIMD compare for equality of the packed quadwords in the destination operand (first operand) and the source operand (second operand). If a pair of data elements is equal, the corresponding data element in the destination is set to all 1s; otherwise, it is set to 0s.
1847 ///
1848 ///
1849 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PCMPEQQ.html).
1850 ///
1851 /// Supported operand variants:
1852 ///
1853 /// ```text
1854 /// +---+----------+
1855 /// | # | Operands |
1856 /// +---+----------+
1857 /// | 1 | Xmm, Mem |
1858 /// | 2 | Xmm, Xmm |
1859 /// +---+----------+
1860 /// ```
1861 #[inline]
1862 pub fn sse_pcmpeqq<A, B>(&mut self, op0: A, op1: B)
1863 where Assembler<'a>: SsePcmpeqqEmitter<A, B> {
1864 <Self as SsePcmpeqqEmitter<A, B>>::sse_pcmpeqq(self, op0, op1);
1865 }
1866 /// `SSE_PCMPGTQ` (PCMPGTQ).
1867 /// Performs an SIMD signed compare for the packed quadwords in the destination operand (first operand) and the source operand (second operand). If the data element in the first (destination) operand is greater than the corresponding element in the second (source) operand, the corresponding data element in the destination is set to all 1s; otherwise, it is set to 0s.
1868 ///
1869 ///
1870 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PCMPGTQ.html).
1871 ///
1872 /// Supported operand variants:
1873 ///
1874 /// ```text
1875 /// +---+----------+
1876 /// | # | Operands |
1877 /// +---+----------+
1878 /// | 1 | Xmm, Mem |
1879 /// | 2 | Xmm, Xmm |
1880 /// +---+----------+
1881 /// ```
1882 #[inline]
1883 pub fn sse_pcmpgtq<A, B>(&mut self, op0: A, op1: B)
1884 where Assembler<'a>: SsePcmpgtqEmitter<A, B> {
1885 <Self as SsePcmpgtqEmitter<A, B>>::sse_pcmpgtq(self, op0, op1);
1886 }
1887 /// `SSE_PEXTRB` (PEXTRB).
1888 /// Extract a byte/dword/qword integer value from the source XMM register at a byte/dword/qword offset determined from imm8[3:0]. The destination can be a register or byte/dword/qword memory location. If the destination is a register, the upper bits of the register are zero extended.
1889 ///
1890 ///
1891 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PEXTRB%3APEXTRD%3APEXTRQ.html).
1892 ///
1893 /// Supported operand variants:
1894 ///
1895 /// ```text
1896 /// +---+---------------+
1897 /// | # | Operands |
1898 /// +---+---------------+
1899 /// | 1 | Gpd, Xmm, Imm |
1900 /// | 2 | Mem, Xmm, Imm |
1901 /// +---+---------------+
1902 /// ```
1903 #[inline]
1904 pub fn sse_pextrb<A, B, C>(&mut self, op0: A, op1: B, op2: C)
1905 where Assembler<'a>: SsePextrbEmitter<A, B, C> {
1906 <Self as SsePextrbEmitter<A, B, C>>::sse_pextrb(self, op0, op1, op2);
1907 }
1908 /// `SSE_PEXTRD` (PEXTRD).
1909 /// Extract a byte/dword/qword integer value from the source XMM register at a byte/dword/qword offset determined from imm8[3:0]. The destination can be a register or byte/dword/qword memory location. If the destination is a register, the upper bits of the register are zero extended.
1910 ///
1911 ///
1912 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PEXTRB%3APEXTRD%3APEXTRQ.html).
1913 ///
1914 /// Supported operand variants:
1915 ///
1916 /// ```text
1917 /// +---+---------------+
1918 /// | # | Operands |
1919 /// +---+---------------+
1920 /// | 1 | Gpd, Xmm, Imm |
1921 /// | 2 | Mem, Xmm, Imm |
1922 /// +---+---------------+
1923 /// ```
1924 #[inline]
1925 pub fn sse_pextrd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
1926 where Assembler<'a>: SsePextrdEmitter<A, B, C> {
1927 <Self as SsePextrdEmitter<A, B, C>>::sse_pextrd(self, op0, op1, op2);
1928 }
1929 /// `SSE_PEXTRQ` (PEXTRQ).
1930 /// Extract a byte/dword/qword integer value from the source XMM register at a byte/dword/qword offset determined from imm8[3:0]. The destination can be a register or byte/dword/qword memory location. If the destination is a register, the upper bits of the register are zero extended.
1931 ///
1932 ///
1933 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PEXTRB%3APEXTRD%3APEXTRQ.html).
1934 ///
1935 /// Supported operand variants:
1936 ///
1937 /// ```text
1938 /// +---+---------------+
1939 /// | # | Operands |
1940 /// +---+---------------+
1941 /// | 1 | Gpd, Xmm, Imm |
1942 /// | 2 | Mem, Xmm, Imm |
1943 /// +---+---------------+
1944 /// ```
1945 #[inline]
1946 pub fn sse_pextrq<A, B, C>(&mut self, op0: A, op1: B, op2: C)
1947 where Assembler<'a>: SsePextrqEmitter<A, B, C> {
1948 <Self as SsePextrqEmitter<A, B, C>>::sse_pextrq(self, op0, op1, op2);
1949 }
1950 /// `SSE_PHMINPOSUW` (PHMINPOSUW).
1951 /// Determine the minimum unsigned word value in the source operand (second operand) and place the unsigned word in the low word (bits 0-15) of the destination operand (first operand). The word index of the minimum value is stored in bits 16-18 of the destination operand. The remaining upper bits of the destination are set to zero.
1952 ///
1953 ///
1954 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PHMINPOSUW.html).
1955 ///
1956 /// Supported operand variants:
1957 ///
1958 /// ```text
1959 /// +---+----------+
1960 /// | # | Operands |
1961 /// +---+----------+
1962 /// | 1 | Xmm, Mem |
1963 /// | 2 | Xmm, Xmm |
1964 /// +---+----------+
1965 /// ```
1966 #[inline]
1967 pub fn sse_phminposuw<A, B>(&mut self, op0: A, op1: B)
1968 where Assembler<'a>: SsePhminposuwEmitter<A, B> {
1969 <Self as SsePhminposuwEmitter<A, B>>::sse_phminposuw(self, op0, op1);
1970 }
1971 /// `SSE_PINSRB` (PINSRB).
1972 /// Copies a byte/dword/qword from the source operand (second operand) and inserts it in the destination operand (first operand) at the location specified with the count operand (third operand). (The other elements in the destination register are left untouched.) The source operand can be a general-purpose register or a memory location. (When the source operand is a general-purpose register, PINSRB copies the low byte of the register.) The destination operand is an XMM register. The count operand is an 8-bit immediate. When specifying a qword[dword, byte] location in an XMM register, the [2, 4] least-significant bit(s) of the count operand specify the location.
1973 ///
1974 ///
1975 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PINSRB%3APINSRD%3APINSRQ.html).
1976 ///
1977 /// Supported operand variants:
1978 ///
1979 /// ```text
1980 /// +---+---------------+
1981 /// | # | Operands |
1982 /// +---+---------------+
1983 /// | 1 | Xmm, Gpd, Imm |
1984 /// | 2 | Xmm, Mem, Imm |
1985 /// +---+---------------+
1986 /// ```
1987 #[inline]
1988 pub fn sse_pinsrb<A, B, C>(&mut self, op0: A, op1: B, op2: C)
1989 where Assembler<'a>: SsePinsrbEmitter<A, B, C> {
1990 <Self as SsePinsrbEmitter<A, B, C>>::sse_pinsrb(self, op0, op1, op2);
1991 }
1992 /// `SSE_PINSRD` (PINSRD).
1993 /// Copies a byte/dword/qword from the source operand (second operand) and inserts it in the destination operand (first operand) at the location specified with the count operand (third operand). (The other elements in the destination register are left untouched.) The source operand can be a general-purpose register or a memory location. (When the source operand is a general-purpose register, PINSRB copies the low byte of the register.) The destination operand is an XMM register. The count operand is an 8-bit immediate. When specifying a qword[dword, byte] location in an XMM register, the [2, 4] least-significant bit(s) of the count operand specify the location.
1994 ///
1995 ///
1996 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PINSRB%3APINSRD%3APINSRQ.html).
1997 ///
1998 /// Supported operand variants:
1999 ///
2000 /// ```text
2001 /// +---+---------------+
2002 /// | # | Operands |
2003 /// +---+---------------+
2004 /// | 1 | Xmm, Gpd, Imm |
2005 /// | 2 | Xmm, Mem, Imm |
2006 /// +---+---------------+
2007 /// ```
2008 #[inline]
2009 pub fn sse_pinsrd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
2010 where Assembler<'a>: SsePinsrdEmitter<A, B, C> {
2011 <Self as SsePinsrdEmitter<A, B, C>>::sse_pinsrd(self, op0, op1, op2);
2012 }
2013 /// `SSE_PINSRQ` (PINSRQ).
2014 /// Copies a byte/dword/qword from the source operand (second operand) and inserts it in the destination operand (first operand) at the location specified with the count operand (third operand). (The other elements in the destination register are left untouched.) The source operand can be a general-purpose register or a memory location. (When the source operand is a general-purpose register, PINSRB copies the low byte of the register.) The destination operand is an XMM register. The count operand is an 8-bit immediate. When specifying a qword[dword, byte] location in an XMM register, the [2, 4] least-significant bit(s) of the count operand specify the location.
2015 ///
2016 ///
2017 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PINSRB%3APINSRD%3APINSRQ.html).
2018 ///
2019 /// Supported operand variants:
2020 ///
2021 /// ```text
2022 /// +---+---------------+
2023 /// | # | Operands |
2024 /// +---+---------------+
2025 /// | 1 | Xmm, Gpd, Imm |
2026 /// | 2 | Xmm, Mem, Imm |
2027 /// +---+---------------+
2028 /// ```
2029 #[inline]
2030 pub fn sse_pinsrq<A, B, C>(&mut self, op0: A, op1: B, op2: C)
2031 where Assembler<'a>: SsePinsrqEmitter<A, B, C> {
2032 <Self as SsePinsrqEmitter<A, B, C>>::sse_pinsrq(self, op0, op1, op2);
2033 }
2034 /// `SSE_PMAXSB` (PMAXSB).
2035 /// Performs a SIMD compare of the packed signed byte, word, dword or qword integers in the second source operand and the first source operand and returns the maximum value for each pair of integers to the destination operand.
2036 ///
2037 ///
2038 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMAXSB%3APMAXSW%3APMAXSD%3APMAXSQ.html).
2039 ///
2040 /// Supported operand variants:
2041 ///
2042 /// ```text
2043 /// +---+----------+
2044 /// | # | Operands |
2045 /// +---+----------+
2046 /// | 1 | Xmm, Mem |
2047 /// | 2 | Xmm, Xmm |
2048 /// +---+----------+
2049 /// ```
2050 #[inline]
2051 pub fn sse_pmaxsb<A, B>(&mut self, op0: A, op1: B)
2052 where Assembler<'a>: SsePmaxsbEmitter<A, B> {
2053 <Self as SsePmaxsbEmitter<A, B>>::sse_pmaxsb(self, op0, op1);
2054 }
2055 /// `SSE_PMAXSD` (PMAXSD).
2056 /// Performs a SIMD compare of the packed signed byte, word, dword or qword integers in the second source operand and the first source operand and returns the maximum value for each pair of integers to the destination operand.
2057 ///
2058 ///
2059 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMAXSB%3APMAXSW%3APMAXSD%3APMAXSQ.html).
2060 ///
2061 /// Supported operand variants:
2062 ///
2063 /// ```text
2064 /// +---+----------+
2065 /// | # | Operands |
2066 /// +---+----------+
2067 /// | 1 | Xmm, Mem |
2068 /// | 2 | Xmm, Xmm |
2069 /// +---+----------+
2070 /// ```
2071 #[inline]
2072 pub fn sse_pmaxsd<A, B>(&mut self, op0: A, op1: B)
2073 where Assembler<'a>: SsePmaxsdEmitter<A, B> {
2074 <Self as SsePmaxsdEmitter<A, B>>::sse_pmaxsd(self, op0, op1);
2075 }
2076 /// `SSE_PMAXUD` (PMAXUD).
2077 /// Performs a SIMD compare of the packed unsigned dword or qword integers in the second source operand and the first source operand and returns the maximum value for each pair of integers to the destination operand.
2078 ///
2079 ///
2080 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMAXUD%3APMAXUQ.html).
2081 ///
2082 /// Supported operand variants:
2083 ///
2084 /// ```text
2085 /// +---+----------+
2086 /// | # | Operands |
2087 /// +---+----------+
2088 /// | 1 | Xmm, Mem |
2089 /// | 2 | Xmm, Xmm |
2090 /// +---+----------+
2091 /// ```
2092 #[inline]
2093 pub fn sse_pmaxud<A, B>(&mut self, op0: A, op1: B)
2094 where Assembler<'a>: SsePmaxudEmitter<A, B> {
2095 <Self as SsePmaxudEmitter<A, B>>::sse_pmaxud(self, op0, op1);
2096 }
2097 /// `SSE_PMAXUW` (PMAXUW).
2098 /// Performs a SIMD compare of the packed unsigned byte, word integers in the second source operand and the first source operand and returns the maximum value for each pair of integers to the destination operand.
2099 ///
2100 ///
2101 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMAXUB%3APMAXUW.html).
2102 ///
2103 /// Supported operand variants:
2104 ///
2105 /// ```text
2106 /// +---+----------+
2107 /// | # | Operands |
2108 /// +---+----------+
2109 /// | 1 | Xmm, Mem |
2110 /// | 2 | Xmm, Xmm |
2111 /// +---+----------+
2112 /// ```
2113 #[inline]
2114 pub fn sse_pmaxuw<A, B>(&mut self, op0: A, op1: B)
2115 where Assembler<'a>: SsePmaxuwEmitter<A, B> {
2116 <Self as SsePmaxuwEmitter<A, B>>::sse_pmaxuw(self, op0, op1);
2117 }
2118 /// `SSE_PMINSB` (PMINSB).
2119 /// Performs a SIMD compare of the packed signed byte, word, or dword integers in the second source operand and the first source operand and returns the minimum value for each pair of integers to the destination operand.
2120 ///
2121 ///
2122 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMINSB%3APMINSW.html).
2123 ///
2124 /// Supported operand variants:
2125 ///
2126 /// ```text
2127 /// +---+----------+
2128 /// | # | Operands |
2129 /// +---+----------+
2130 /// | 1 | Xmm, Mem |
2131 /// | 2 | Xmm, Xmm |
2132 /// +---+----------+
2133 /// ```
2134 #[inline]
2135 pub fn sse_pminsb<A, B>(&mut self, op0: A, op1: B)
2136 where Assembler<'a>: SsePminsbEmitter<A, B> {
2137 <Self as SsePminsbEmitter<A, B>>::sse_pminsb(self, op0, op1);
2138 }
2139 /// `SSE_PMINSD` (PMINSD).
2140 /// Performs a SIMD compare of the packed signed dword or qword integers in the second source operand and the first source operand and returns the minimum value for each pair of integers to the destination operand.
2141 ///
2142 ///
2143 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMINSD%3APMINSQ.html).
2144 ///
2145 /// Supported operand variants:
2146 ///
2147 /// ```text
2148 /// +---+----------+
2149 /// | # | Operands |
2150 /// +---+----------+
2151 /// | 1 | Xmm, Mem |
2152 /// | 2 | Xmm, Xmm |
2153 /// +---+----------+
2154 /// ```
2155 #[inline]
2156 pub fn sse_pminsd<A, B>(&mut self, op0: A, op1: B)
2157 where Assembler<'a>: SsePminsdEmitter<A, B> {
2158 <Self as SsePminsdEmitter<A, B>>::sse_pminsd(self, op0, op1);
2159 }
2160 /// `SSE_PMINUD` (PMINUD).
2161 /// Performs a SIMD compare of the packed unsigned dword/qword integers in the second source operand and the first source operand and returns the minimum value for each pair of integers to the destination operand.
2162 ///
2163 ///
2164 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMINUD%3APMINUQ.html).
2165 ///
2166 /// Supported operand variants:
2167 ///
2168 /// ```text
2169 /// +---+----------+
2170 /// | # | Operands |
2171 /// +---+----------+
2172 /// | 1 | Xmm, Mem |
2173 /// | 2 | Xmm, Xmm |
2174 /// +---+----------+
2175 /// ```
2176 #[inline]
2177 pub fn sse_pminud<A, B>(&mut self, op0: A, op1: B)
2178 where Assembler<'a>: SsePminudEmitter<A, B> {
2179 <Self as SsePminudEmitter<A, B>>::sse_pminud(self, op0, op1);
2180 }
2181 /// `SSE_PMINUW` (PMINUW).
2182 /// Performs a SIMD compare of the packed unsigned byte or word integers in the second source operand and the first source operand and returns the minimum value for each pair of integers to the destination operand.
2183 ///
2184 ///
2185 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMINUB%3APMINUW.html).
2186 ///
2187 /// Supported operand variants:
2188 ///
2189 /// ```text
2190 /// +---+----------+
2191 /// | # | Operands |
2192 /// +---+----------+
2193 /// | 1 | Xmm, Mem |
2194 /// | 2 | Xmm, Xmm |
2195 /// +---+----------+
2196 /// ```
2197 #[inline]
2198 pub fn sse_pminuw<A, B>(&mut self, op0: A, op1: B)
2199 where Assembler<'a>: SsePminuwEmitter<A, B> {
2200 <Self as SsePminuwEmitter<A, B>>::sse_pminuw(self, op0, op1);
2201 }
2202 /// `SSE_PMOVSXBD` (PMOVSXBD).
2203 /// Legacy and VEX encoded versions: Packed byte, word, or dword integers in the low bytes of the source operand (second operand) are sign extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
2204 ///
2205 ///
2206 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVSX.html).
2207 ///
2208 /// Supported operand variants:
2209 ///
2210 /// ```text
2211 /// +---+----------+
2212 /// | # | Operands |
2213 /// +---+----------+
2214 /// | 1 | Xmm, Mem |
2215 /// | 2 | Xmm, Xmm |
2216 /// +---+----------+
2217 /// ```
2218 #[inline]
2219 pub fn sse_pmovsxbd<A, B>(&mut self, op0: A, op1: B)
2220 where Assembler<'a>: SsePmovsxbdEmitter<A, B> {
2221 <Self as SsePmovsxbdEmitter<A, B>>::sse_pmovsxbd(self, op0, op1);
2222 }
2223 /// `SSE_PMOVSXBQ` (PMOVSXBQ).
2224 /// Legacy and VEX encoded versions: Packed byte, word, or dword integers in the low bytes of the source operand (second operand) are sign extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
2225 ///
2226 ///
2227 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVSX.html).
2228 ///
2229 /// Supported operand variants:
2230 ///
2231 /// ```text
2232 /// +---+----------+
2233 /// | # | Operands |
2234 /// +---+----------+
2235 /// | 1 | Xmm, Mem |
2236 /// | 2 | Xmm, Xmm |
2237 /// +---+----------+
2238 /// ```
2239 #[inline]
2240 pub fn sse_pmovsxbq<A, B>(&mut self, op0: A, op1: B)
2241 where Assembler<'a>: SsePmovsxbqEmitter<A, B> {
2242 <Self as SsePmovsxbqEmitter<A, B>>::sse_pmovsxbq(self, op0, op1);
2243 }
2244 /// `SSE_PMOVSXBW` (PMOVSXBW).
2245 /// Legacy and VEX encoded versions: Packed byte, word, or dword integers in the low bytes of the source operand (second operand) are sign extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
2246 ///
2247 ///
2248 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVSX.html).
2249 ///
2250 /// Supported operand variants:
2251 ///
2252 /// ```text
2253 /// +---+----------+
2254 /// | # | Operands |
2255 /// +---+----------+
2256 /// | 1 | Xmm, Mem |
2257 /// | 2 | Xmm, Xmm |
2258 /// +---+----------+
2259 /// ```
2260 #[inline]
2261 pub fn sse_pmovsxbw<A, B>(&mut self, op0: A, op1: B)
2262 where Assembler<'a>: SsePmovsxbwEmitter<A, B> {
2263 <Self as SsePmovsxbwEmitter<A, B>>::sse_pmovsxbw(self, op0, op1);
2264 }
2265 /// `SSE_PMOVSXDQ` (PMOVSXDQ).
2266 /// Legacy and VEX encoded versions: Packed byte, word, or dword integers in the low bytes of the source operand (second operand) are sign extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
2267 ///
2268 ///
2269 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVSX.html).
2270 ///
2271 /// Supported operand variants:
2272 ///
2273 /// ```text
2274 /// +---+----------+
2275 /// | # | Operands |
2276 /// +---+----------+
2277 /// | 1 | Xmm, Mem |
2278 /// | 2 | Xmm, Xmm |
2279 /// +---+----------+
2280 /// ```
2281 #[inline]
2282 pub fn sse_pmovsxdq<A, B>(&mut self, op0: A, op1: B)
2283 where Assembler<'a>: SsePmovsxdqEmitter<A, B> {
2284 <Self as SsePmovsxdqEmitter<A, B>>::sse_pmovsxdq(self, op0, op1);
2285 }
2286 /// `SSE_PMOVSXWD` (PMOVSXWD).
2287 /// Legacy and VEX encoded versions: Packed byte, word, or dword integers in the low bytes of the source operand (second operand) are sign extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
2288 ///
2289 ///
2290 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVSX.html).
2291 ///
2292 /// Supported operand variants:
2293 ///
2294 /// ```text
2295 /// +---+----------+
2296 /// | # | Operands |
2297 /// +---+----------+
2298 /// | 1 | Xmm, Mem |
2299 /// | 2 | Xmm, Xmm |
2300 /// +---+----------+
2301 /// ```
2302 #[inline]
2303 pub fn sse_pmovsxwd<A, B>(&mut self, op0: A, op1: B)
2304 where Assembler<'a>: SsePmovsxwdEmitter<A, B> {
2305 <Self as SsePmovsxwdEmitter<A, B>>::sse_pmovsxwd(self, op0, op1);
2306 }
2307 /// `SSE_PMOVSXWQ` (PMOVSXWQ).
2308 /// Legacy and VEX encoded versions: Packed byte, word, or dword integers in the low bytes of the source operand (second operand) are sign extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
2309 ///
2310 ///
2311 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVSX.html).
2312 ///
2313 /// Supported operand variants:
2314 ///
2315 /// ```text
2316 /// +---+----------+
2317 /// | # | Operands |
2318 /// +---+----------+
2319 /// | 1 | Xmm, Mem |
2320 /// | 2 | Xmm, Xmm |
2321 /// +---+----------+
2322 /// ```
2323 #[inline]
2324 pub fn sse_pmovsxwq<A, B>(&mut self, op0: A, op1: B)
2325 where Assembler<'a>: SsePmovsxwqEmitter<A, B> {
2326 <Self as SsePmovsxwqEmitter<A, B>>::sse_pmovsxwq(self, op0, op1);
2327 }
2328 /// `SSE_PMOVZXBD` (PMOVZXBD).
2329 /// Legacy, VEX, and EVEX encoded versions: Packed byte, word, or dword integers starting from the low bytes of the source operand (second operand) are zero extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
2330 ///
2331 ///
2332 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVZX.html).
2333 ///
2334 /// Supported operand variants:
2335 ///
2336 /// ```text
2337 /// +---+----------+
2338 /// | # | Operands |
2339 /// +---+----------+
2340 /// | 1 | Xmm, Mem |
2341 /// | 2 | Xmm, Xmm |
2342 /// +---+----------+
2343 /// ```
2344 #[inline]
2345 pub fn sse_pmovzxbd<A, B>(&mut self, op0: A, op1: B)
2346 where Assembler<'a>: SsePmovzxbdEmitter<A, B> {
2347 <Self as SsePmovzxbdEmitter<A, B>>::sse_pmovzxbd(self, op0, op1);
2348 }
2349 /// `SSE_PMOVZXBQ` (PMOVZXBQ).
2350 /// Legacy, VEX, and EVEX encoded versions: Packed byte, word, or dword integers starting from the low bytes of the source operand (second operand) are zero extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
2351 ///
2352 ///
2353 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVZX.html).
2354 ///
2355 /// Supported operand variants:
2356 ///
2357 /// ```text
2358 /// +---+----------+
2359 /// | # | Operands |
2360 /// +---+----------+
2361 /// | 1 | Xmm, Mem |
2362 /// | 2 | Xmm, Xmm |
2363 /// +---+----------+
2364 /// ```
2365 #[inline]
2366 pub fn sse_pmovzxbq<A, B>(&mut self, op0: A, op1: B)
2367 where Assembler<'a>: SsePmovzxbqEmitter<A, B> {
2368 <Self as SsePmovzxbqEmitter<A, B>>::sse_pmovzxbq(self, op0, op1);
2369 }
2370 /// `SSE_PMOVZXBW` (PMOVZXBW).
2371 /// Legacy, VEX, and EVEX encoded versions: Packed byte, word, or dword integers starting from the low bytes of the source operand (second operand) are zero extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
2372 ///
2373 ///
2374 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVZX.html).
2375 ///
2376 /// Supported operand variants:
2377 ///
2378 /// ```text
2379 /// +---+----------+
2380 /// | # | Operands |
2381 /// +---+----------+
2382 /// | 1 | Xmm, Mem |
2383 /// | 2 | Xmm, Xmm |
2384 /// +---+----------+
2385 /// ```
2386 #[inline]
2387 pub fn sse_pmovzxbw<A, B>(&mut self, op0: A, op1: B)
2388 where Assembler<'a>: SsePmovzxbwEmitter<A, B> {
2389 <Self as SsePmovzxbwEmitter<A, B>>::sse_pmovzxbw(self, op0, op1);
2390 }
2391 /// `SSE_PMOVZXDQ` (PMOVZXDQ).
2392 /// Legacy, VEX, and EVEX encoded versions: Packed byte, word, or dword integers starting from the low bytes of the source operand (second operand) are zero extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
2393 ///
2394 ///
2395 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVZX.html).
2396 ///
2397 /// Supported operand variants:
2398 ///
2399 /// ```text
2400 /// +---+----------+
2401 /// | # | Operands |
2402 /// +---+----------+
2403 /// | 1 | Xmm, Mem |
2404 /// | 2 | Xmm, Xmm |
2405 /// +---+----------+
2406 /// ```
2407 #[inline]
2408 pub fn sse_pmovzxdq<A, B>(&mut self, op0: A, op1: B)
2409 where Assembler<'a>: SsePmovzxdqEmitter<A, B> {
2410 <Self as SsePmovzxdqEmitter<A, B>>::sse_pmovzxdq(self, op0, op1);
2411 }
2412 /// `SSE_PMOVZXWD` (PMOVZXWD).
2413 /// Legacy, VEX, and EVEX encoded versions: Packed byte, word, or dword integers starting from the low bytes of the source operand (second operand) are zero extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
2414 ///
2415 ///
2416 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVZX.html).
2417 ///
2418 /// Supported operand variants:
2419 ///
2420 /// ```text
2421 /// +---+----------+
2422 /// | # | Operands |
2423 /// +---+----------+
2424 /// | 1 | Xmm, Mem |
2425 /// | 2 | Xmm, Xmm |
2426 /// +---+----------+
2427 /// ```
2428 #[inline]
2429 pub fn sse_pmovzxwd<A, B>(&mut self, op0: A, op1: B)
2430 where Assembler<'a>: SsePmovzxwdEmitter<A, B> {
2431 <Self as SsePmovzxwdEmitter<A, B>>::sse_pmovzxwd(self, op0, op1);
2432 }
2433 /// `SSE_PMOVZXWQ` (PMOVZXWQ).
2434 /// Legacy, VEX, and EVEX encoded versions: Packed byte, word, or dword integers starting from the low bytes of the source operand (second operand) are zero extended to word, dword, or quadword integers and stored in packed signed bytes the destination operand.
2435 ///
2436 ///
2437 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMOVZX.html).
2438 ///
2439 /// Supported operand variants:
2440 ///
2441 /// ```text
2442 /// +---+----------+
2443 /// | # | Operands |
2444 /// +---+----------+
2445 /// | 1 | Xmm, Mem |
2446 /// | 2 | Xmm, Xmm |
2447 /// +---+----------+
2448 /// ```
2449 #[inline]
2450 pub fn sse_pmovzxwq<A, B>(&mut self, op0: A, op1: B)
2451 where Assembler<'a>: SsePmovzxwqEmitter<A, B> {
2452 <Self as SsePmovzxwqEmitter<A, B>>::sse_pmovzxwq(self, op0, op1);
2453 }
2454 /// `SSE_PMULDQ` (PMULDQ).
2455 /// Multiplies packed signed doubleword integers in the even-numbered (zero-based reference) elements of the first source operand with the packed signed doubleword integers in the corresponding elements of the second source operand and stores packed signed quadword results in the destination operand.
2456 ///
2457 ///
2458 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMULDQ.html).
2459 ///
2460 /// Supported operand variants:
2461 ///
2462 /// ```text
2463 /// +---+----------+
2464 /// | # | Operands |
2465 /// +---+----------+
2466 /// | 1 | Xmm, Mem |
2467 /// | 2 | Xmm, Xmm |
2468 /// +---+----------+
2469 /// ```
2470 #[inline]
2471 pub fn sse_pmuldq<A, B>(&mut self, op0: A, op1: B)
2472 where Assembler<'a>: SsePmuldqEmitter<A, B> {
2473 <Self as SsePmuldqEmitter<A, B>>::sse_pmuldq(self, op0, op1);
2474 }
2475 /// `SSE_PMULLD` (PMULLD).
2476 /// Performs a SIMD signed multiply of the packed signed dword/qword integers from each element of the first source operand with the corresponding element in the second source operand. The low 32/64 bits of each 64/128-bit intermediate results are stored to the destination operand.
2477 ///
2478 ///
2479 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PMULLD%3APMULLQ.html).
2480 ///
2481 /// Supported operand variants:
2482 ///
2483 /// ```text
2484 /// +---+----------+
2485 /// | # | Operands |
2486 /// +---+----------+
2487 /// | 1 | Xmm, Mem |
2488 /// | 2 | Xmm, Xmm |
2489 /// +---+----------+
2490 /// ```
2491 #[inline]
2492 pub fn sse_pmulld<A, B>(&mut self, op0: A, op1: B)
2493 where Assembler<'a>: SsePmulldEmitter<A, B> {
2494 <Self as SsePmulldEmitter<A, B>>::sse_pmulld(self, op0, op1);
2495 }
2496 /// `SSE_PTEST` (PTEST).
2497 /// PTEST and VPTEST set the ZF flag if all bits in the result are 0 of the bitwise AND of the first source operand (first operand) and the second source operand (second operand). VPTEST sets the CF flag if all bits in the result are 0 of the bitwise AND of the second source operand (second operand) and the logical NOT of the destination operand.
2498 ///
2499 ///
2500 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/PTEST.html).
2501 ///
2502 /// Supported operand variants:
2503 ///
2504 /// ```text
2505 /// +---+----------+
2506 /// | # | Operands |
2507 /// +---+----------+
2508 /// | 1 | Xmm, Mem |
2509 /// | 2 | Xmm, Xmm |
2510 /// +---+----------+
2511 /// ```
2512 #[inline]
2513 pub fn sse_ptest<A, B>(&mut self, op0: A, op1: B)
2514 where Assembler<'a>: SsePtestEmitter<A, B> {
2515 <Self as SsePtestEmitter<A, B>>::sse_ptest(self, op0, op1);
2516 }
2517 /// `SSE_ROUNDPD` (ROUNDPD).
2518 /// Round the 2 double precision floating-point values in the source operand (second operand) using the rounding mode specified in the immediate operand (third operand) and place the results in the destination operand (first operand). The rounding process rounds each input floating-point value to an integer value and returns the integer result as a double precision floating-point value.
2519 ///
2520 ///
2521 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/ROUNDPD.html).
2522 ///
2523 /// Supported operand variants:
2524 ///
2525 /// ```text
2526 /// +---+---------------+
2527 /// | # | Operands |
2528 /// +---+---------------+
2529 /// | 1 | Xmm, Mem, Imm |
2530 /// | 2 | Xmm, Xmm, Imm |
2531 /// +---+---------------+
2532 /// ```
2533 #[inline]
2534 pub fn sse_roundpd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
2535 where Assembler<'a>: SseRoundpdEmitter<A, B, C> {
2536 <Self as SseRoundpdEmitter<A, B, C>>::sse_roundpd(self, op0, op1, op2);
2537 }
2538 /// `SSE_ROUNDPS` (ROUNDPS).
2539 /// Round the 4 single precision floating-point values in the source operand (second operand) using the rounding mode specified in the immediate operand (third operand) and place the results in the destination operand (first operand). The rounding process rounds each input floating-point value to an integer value and returns the integer result as a single precision floating-point value.
2540 ///
2541 ///
2542 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/ROUNDPS.html).
2543 ///
2544 /// Supported operand variants:
2545 ///
2546 /// ```text
2547 /// +---+---------------+
2548 /// | # | Operands |
2549 /// +---+---------------+
2550 /// | 1 | Xmm, Mem, Imm |
2551 /// | 2 | Xmm, Xmm, Imm |
2552 /// +---+---------------+
2553 /// ```
2554 #[inline]
2555 pub fn sse_roundps<A, B, C>(&mut self, op0: A, op1: B, op2: C)
2556 where Assembler<'a>: SseRoundpsEmitter<A, B, C> {
2557 <Self as SseRoundpsEmitter<A, B, C>>::sse_roundps(self, op0, op1, op2);
2558 }
2559 /// `SSE_ROUNDSD` (ROUNDSD).
2560 /// Round the double precision floating-point value in the lower qword of the source operand (second operand) using the rounding mode specified in the immediate operand (third operand) and place the result in the destination operand (first operand). The rounding process rounds a double precision floating-point input to an integer value and returns the integer result as a double precision floating-point value in the lowest position. The upper double precision floating-point value in the destination is retained.
2561 ///
2562 ///
2563 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/ROUNDSD.html).
2564 ///
2565 /// Supported operand variants:
2566 ///
2567 /// ```text
2568 /// +---+---------------+
2569 /// | # | Operands |
2570 /// +---+---------------+
2571 /// | 1 | Xmm, Mem, Imm |
2572 /// | 2 | Xmm, Xmm, Imm |
2573 /// +---+---------------+
2574 /// ```
2575 #[inline]
2576 pub fn sse_roundsd<A, B, C>(&mut self, op0: A, op1: B, op2: C)
2577 where Assembler<'a>: SseRoundsdEmitter<A, B, C> {
2578 <Self as SseRoundsdEmitter<A, B, C>>::sse_roundsd(self, op0, op1, op2);
2579 }
2580 /// `SSE_ROUNDSS` (ROUNDSS).
2581 /// Round the single precision floating-point value in the lowest dword of the source operand (second operand) using the rounding mode specified in the immediate operand (third operand) and place the result in the destination operand (first operand). The rounding process rounds a single precision floating-point input to an integer value and returns the result as a single precision floating-point value in the lowest position. The upper three single precision floating-point values in the destination are retained.
2582 ///
2583 ///
2584 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/ROUNDSS.html).
2585 ///
2586 /// Supported operand variants:
2587 ///
2588 /// ```text
2589 /// +---+---------------+
2590 /// | # | Operands |
2591 /// +---+---------------+
2592 /// | 1 | Xmm, Mem, Imm |
2593 /// | 2 | Xmm, Xmm, Imm |
2594 /// +---+---------------+
2595 /// ```
2596 #[inline]
2597 pub fn sse_roundss<A, B, C>(&mut self, op0: A, op1: B, op2: C)
2598 where Assembler<'a>: SseRoundssEmitter<A, B, C> {
2599 <Self as SseRoundssEmitter<A, B, C>>::sse_roundss(self, op0, op1, op2);
2600 }
2601}