asmkit/x86/features/387.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/// `F2XM1`.
11///
12/// Supported operand variants:
13///
14/// ```text
15/// +---+----------+
16/// | # | Operands |
17/// +---+----------+
18/// | 1 | (none) |
19/// +---+----------+
20/// ```
21pub trait F2xm1Emitter {
22 fn f2xm1(&mut self);
23}
24
25impl<'a> F2xm1Emitter for Assembler<'a> {
26 fn f2xm1(&mut self) {
27 self.emit(F2XM1, &NOREG, &NOREG, &NOREG, &NOREG);
28 }
29}
30
31/// `FABS`.
32///
33/// Supported operand variants:
34///
35/// ```text
36/// +---+----------+
37/// | # | Operands |
38/// +---+----------+
39/// | 1 | (none) |
40/// +---+----------+
41/// ```
42pub trait FabsEmitter {
43 fn fabs(&mut self);
44}
45
46impl<'a> FabsEmitter for Assembler<'a> {
47 fn fabs(&mut self) {
48 self.emit(FABS, &NOREG, &NOREG, &NOREG, &NOREG);
49 }
50}
51
52/// `FADD` (FADD).
53/// Adds the destination and source operands and stores the sum in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
54///
55///
56/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FADD%3AFADDP%3AFIADD.html).
57///
58/// Supported operand variants:
59///
60/// ```text
61/// +---+----------+
62/// | # | Operands |
63/// +---+----------+
64/// | 1 | Mem |
65/// +---+----------+
66/// ```
67pub trait FaddEmitter_1<A> {
68 fn fadd_1(&mut self, op0: A);
69}
70
71impl<'a> FaddEmitter_1<Mem> for Assembler<'a> {
72 fn fadd_1(&mut self, op0: Mem) {
73 self.emit(FADDM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
74 }
75}
76
77/// `FADD` (FADD).
78/// Adds the destination and source operands and stores the sum in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
79///
80///
81/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FADD%3AFADDP%3AFIADD.html).
82///
83/// Supported operand variants:
84///
85/// ```text
86/// +---+----------+
87/// | # | Operands |
88/// +---+----------+
89/// | 1 | St, St |
90/// +---+----------+
91/// ```
92pub trait FaddEmitter_2<A, B> {
93 fn fadd_2(&mut self, op0: A, op1: B);
94}
95
96impl<'a> FaddEmitter_2<St, St> for Assembler<'a> {
97 fn fadd_2(&mut self, op0: St, op1: St) {
98 self.emit(FADDRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
99 }
100}
101
102/// `FADDP` (FADDP).
103/// Adds the destination and source operands and stores the sum in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
104///
105///
106/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FADD%3AFADDP%3AFIADD.html).
107///
108/// Supported operand variants:
109///
110/// ```text
111/// +---+----------+
112/// | # | Operands |
113/// +---+----------+
114/// | 1 | St, St |
115/// +---+----------+
116/// ```
117pub trait FaddpEmitter<A, B> {
118 fn faddp(&mut self, op0: A, op1: B);
119}
120
121impl<'a> FaddpEmitter<St, St> for Assembler<'a> {
122 fn faddp(&mut self, op0: St, op1: St) {
123 self.emit(FADDPRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
124 }
125}
126
127/// `FBLD` (FBLD).
128/// Converts the BCD source operand into double extended-precision floating-point format and pushes the value onto the FPU stack. The source operand is loaded without rounding errors. The sign of the source operand is preserved, including that of −0.
129///
130///
131/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FBLD.html).
132///
133/// Supported operand variants:
134///
135/// ```text
136/// +---+----------+
137/// | # | Operands |
138/// +---+----------+
139/// | 1 | Mem |
140/// +---+----------+
141/// ```
142pub trait FbldEmitter<A> {
143 fn fbld(&mut self, op0: A);
144}
145
146impl<'a> FbldEmitter<Mem> for Assembler<'a> {
147 fn fbld(&mut self, op0: Mem) {
148 self.emit(FBLDM, op0.as_operand(), &NOREG, &NOREG, &NOREG);
149 }
150}
151
152/// `FBSTP`.
153///
154/// Supported operand variants:
155///
156/// ```text
157/// +---+----------+
158/// | # | Operands |
159/// +---+----------+
160/// | 1 | Mem |
161/// +---+----------+
162/// ```
163pub trait FbstpEmitter<A> {
164 fn fbstp(&mut self, op0: A);
165}
166
167impl<'a> FbstpEmitter<Mem> for Assembler<'a> {
168 fn fbstp(&mut self, op0: Mem) {
169 self.emit(FBSTPM, op0.as_operand(), &NOREG, &NOREG, &NOREG);
170 }
171}
172
173/// `FCHS`.
174///
175/// Supported operand variants:
176///
177/// ```text
178/// +---+----------+
179/// | # | Operands |
180/// +---+----------+
181/// | 1 | (none) |
182/// +---+----------+
183/// ```
184pub trait FchsEmitter {
185 fn fchs(&mut self);
186}
187
188impl<'a> FchsEmitter for Assembler<'a> {
189 fn fchs(&mut self) {
190 self.emit(FCHS, &NOREG, &NOREG, &NOREG, &NOREG);
191 }
192}
193
194/// `FCLEX` (FCLEX).
195/// Clears the floating-point exception flags (PE, UE, OE, ZE, DE, and IE), the exception summary status flag (ES), the stack fault flag (SF), and the busy flag (B) in the FPU status word. The FCLEX instruction checks for and handles any pending unmasked floating-point exceptions before clearing the exception flags; the FNCLEX instruction does not.
196///
197///
198/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FCLEX%3AFNCLEX.html).
199///
200/// Supported operand variants:
201///
202/// ```text
203/// +---+----------+
204/// | # | Operands |
205/// +---+----------+
206/// | 1 | (none) |
207/// +---+----------+
208/// ```
209pub trait FclexEmitter {
210 fn fclex(&mut self);
211}
212
213impl<'a> FclexEmitter for Assembler<'a> {
214 fn fclex(&mut self) {
215 self.emit(FCLEX, &NOREG, &NOREG, &NOREG, &NOREG);
216 }
217}
218
219/// `FCOM` (FCOM).
220/// Compares the contents of register ST(0) and source value and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). The source operand can be a data register or a memory location. If no source operand is given, the value in ST(0) is compared with the value in ST(1). The sign of zero is ignored, so that –0.0 is equal to +0.0.
221///
222///
223/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FCOM%3AFCOMP%3AFCOMPP.html).
224///
225/// Supported operand variants:
226///
227/// ```text
228/// +---+----------+
229/// | # | Operands |
230/// +---+----------+
231/// | 1 | Mem |
232/// +---+----------+
233/// ```
234pub trait FcomEmitter_1<A> {
235 fn fcom_1(&mut self, op0: A);
236}
237
238impl<'a> FcomEmitter_1<Mem> for Assembler<'a> {
239 fn fcom_1(&mut self, op0: Mem) {
240 self.emit(FCOMM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
241 }
242}
243
244/// `FCOM` (FCOM).
245/// Compares the contents of register ST(0) and source value and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). The source operand can be a data register or a memory location. If no source operand is given, the value in ST(0) is compared with the value in ST(1). The sign of zero is ignored, so that –0.0 is equal to +0.0.
246///
247///
248/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FCOM%3AFCOMP%3AFCOMPP.html).
249///
250/// Supported operand variants:
251///
252/// ```text
253/// +---+----------+
254/// | # | Operands |
255/// +---+----------+
256/// | 1 | St, St |
257/// +---+----------+
258/// ```
259pub trait FcomEmitter_2<A, B> {
260 fn fcom_2(&mut self, op0: A, op1: B);
261}
262
263impl<'a> FcomEmitter_2<St, St> for Assembler<'a> {
264 fn fcom_2(&mut self, op0: St, op1: St) {
265 self.emit(FCOMRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
266 }
267}
268
269/// `FCOMP` (FCOMP).
270/// Compares the contents of register ST(0) and source value and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). The source operand can be a data register or a memory location. If no source operand is given, the value in ST(0) is compared with the value in ST(1). The sign of zero is ignored, so that –0.0 is equal to +0.0.
271///
272///
273/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FCOM%3AFCOMP%3AFCOMPP.html).
274///
275/// Supported operand variants:
276///
277/// ```text
278/// +---+----------+
279/// | # | Operands |
280/// +---+----------+
281/// | 1 | Mem |
282/// +---+----------+
283/// ```
284pub trait FcompEmitter_1<A> {
285 fn fcomp_1(&mut self, op0: A);
286}
287
288impl<'a> FcompEmitter_1<Mem> for Assembler<'a> {
289 fn fcomp_1(&mut self, op0: Mem) {
290 self.emit(FCOMPM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
291 }
292}
293
294/// `FCOMP` (FCOMP).
295/// Compares the contents of register ST(0) and source value and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). The source operand can be a data register or a memory location. If no source operand is given, the value in ST(0) is compared with the value in ST(1). The sign of zero is ignored, so that –0.0 is equal to +0.0.
296///
297///
298/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FCOM%3AFCOMP%3AFCOMPP.html).
299///
300/// Supported operand variants:
301///
302/// ```text
303/// +---+----------+
304/// | # | Operands |
305/// +---+----------+
306/// | 1 | St, St |
307/// +---+----------+
308/// ```
309pub trait FcompEmitter_2<A, B> {
310 fn fcomp_2(&mut self, op0: A, op1: B);
311}
312
313impl<'a> FcompEmitter_2<St, St> for Assembler<'a> {
314 fn fcomp_2(&mut self, op0: St, op1: St) {
315 self.emit(FCOMPRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
316 }
317}
318
319/// `FCOMPP` (FCOMPP).
320/// Compares the contents of register ST(0) and source value and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). The source operand can be a data register or a memory location. If no source operand is given, the value in ST(0) is compared with the value in ST(1). The sign of zero is ignored, so that –0.0 is equal to +0.0.
321///
322///
323/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FCOM%3AFCOMP%3AFCOMPP.html).
324///
325/// Supported operand variants:
326///
327/// ```text
328/// +---+----------+
329/// | # | Operands |
330/// +---+----------+
331/// | 1 | (none) |
332/// +---+----------+
333/// ```
334pub trait FcomppEmitter {
335 fn fcompp(&mut self);
336}
337
338impl<'a> FcomppEmitter for Assembler<'a> {
339 fn fcompp(&mut self) {
340 self.emit(FCOMPP, &NOREG, &NOREG, &NOREG, &NOREG);
341 }
342}
343
344/// `FCOS`.
345///
346/// Supported operand variants:
347///
348/// ```text
349/// +---+----------+
350/// | # | Operands |
351/// +---+----------+
352/// | 1 | (none) |
353/// +---+----------+
354/// ```
355pub trait FcosEmitter {
356 fn fcos(&mut self);
357}
358
359impl<'a> FcosEmitter for Assembler<'a> {
360 fn fcos(&mut self) {
361 self.emit(FCOS, &NOREG, &NOREG, &NOREG, &NOREG);
362 }
363}
364
365/// `FDECSTP`.
366///
367/// Supported operand variants:
368///
369/// ```text
370/// +---+----------+
371/// | # | Operands |
372/// +---+----------+
373/// | 1 | (none) |
374/// +---+----------+
375/// ```
376pub trait FdecstpEmitter {
377 fn fdecstp(&mut self);
378}
379
380impl<'a> FdecstpEmitter for Assembler<'a> {
381 fn fdecstp(&mut self) {
382 self.emit(FDECSTP, &NOREG, &NOREG, &NOREG, &NOREG);
383 }
384}
385
386/// `FDIV` (FDIV).
387/// Divides the destination operand by the source operand and stores the result in the destination location. The destination operand (dividend) is always in an FPU register; the source operand (divisor) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
388///
389///
390/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIV%3AFDIVP%3AFIDIV.html).
391///
392/// Supported operand variants:
393///
394/// ```text
395/// +---+----------+
396/// | # | Operands |
397/// +---+----------+
398/// | 1 | Mem |
399/// +---+----------+
400/// ```
401pub trait FdivEmitter_1<A> {
402 fn fdiv_1(&mut self, op0: A);
403}
404
405impl<'a> FdivEmitter_1<Mem> for Assembler<'a> {
406 fn fdiv_1(&mut self, op0: Mem) {
407 self.emit(FDIVM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
408 }
409}
410
411/// `FDIV` (FDIV).
412/// Divides the destination operand by the source operand and stores the result in the destination location. The destination operand (dividend) is always in an FPU register; the source operand (divisor) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
413///
414///
415/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIV%3AFDIVP%3AFIDIV.html).
416///
417/// Supported operand variants:
418///
419/// ```text
420/// +---+----------+
421/// | # | Operands |
422/// +---+----------+
423/// | 1 | St, St |
424/// +---+----------+
425/// ```
426pub trait FdivEmitter_2<A, B> {
427 fn fdiv_2(&mut self, op0: A, op1: B);
428}
429
430impl<'a> FdivEmitter_2<St, St> for Assembler<'a> {
431 fn fdiv_2(&mut self, op0: St, op1: St) {
432 self.emit(FDIVRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
433 }
434}
435
436/// `FDIVP` (FDIVP).
437/// Divides the destination operand by the source operand and stores the result in the destination location. The destination operand (dividend) is always in an FPU register; the source operand (divisor) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
438///
439///
440/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIV%3AFDIVP%3AFIDIV.html).
441///
442/// Supported operand variants:
443///
444/// ```text
445/// +---+----------+
446/// | # | Operands |
447/// +---+----------+
448/// | 1 | St, St |
449/// +---+----------+
450/// ```
451pub trait FdivpEmitter<A, B> {
452 fn fdivp(&mut self, op0: A, op1: B);
453}
454
455impl<'a> FdivpEmitter<St, St> for Assembler<'a> {
456 fn fdivp(&mut self, op0: St, op1: St) {
457 self.emit(FDIVPRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
458 }
459}
460
461/// `FDIVR` (FDIVR).
462/// Divides the source operand by the destination operand and stores the result in the destination location. The destination operand (divisor) is always in an FPU register; the source operand (dividend) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
463///
464///
465/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIVR%3AFDIVRP%3AFIDIVR.html).
466///
467/// Supported operand variants:
468///
469/// ```text
470/// +---+----------+
471/// | # | Operands |
472/// +---+----------+
473/// | 1 | Mem |
474/// +---+----------+
475/// ```
476pub trait FdivrEmitter_1<A> {
477 fn fdivr_1(&mut self, op0: A);
478}
479
480impl<'a> FdivrEmitter_1<Mem> for Assembler<'a> {
481 fn fdivr_1(&mut self, op0: Mem) {
482 self.emit(FDIVRM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
483 }
484}
485
486/// `FDIVR` (FDIVR).
487/// Divides the source operand by the destination operand and stores the result in the destination location. The destination operand (divisor) is always in an FPU register; the source operand (dividend) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
488///
489///
490/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIVR%3AFDIVRP%3AFIDIVR.html).
491///
492/// Supported operand variants:
493///
494/// ```text
495/// +---+----------+
496/// | # | Operands |
497/// +---+----------+
498/// | 1 | St, St |
499/// +---+----------+
500/// ```
501pub trait FdivrEmitter_2<A, B> {
502 fn fdivr_2(&mut self, op0: A, op1: B);
503}
504
505impl<'a> FdivrEmitter_2<St, St> for Assembler<'a> {
506 fn fdivr_2(&mut self, op0: St, op1: St) {
507 self.emit(FDIVRRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
508 }
509}
510
511/// `FDIVRP` (FDIVRP).
512/// Divides the source operand by the destination operand and stores the result in the destination location. The destination operand (divisor) is always in an FPU register; the source operand (dividend) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
513///
514///
515/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIVR%3AFDIVRP%3AFIDIVR.html).
516///
517/// Supported operand variants:
518///
519/// ```text
520/// +---+----------+
521/// | # | Operands |
522/// +---+----------+
523/// | 1 | St, St |
524/// +---+----------+
525/// ```
526pub trait FdivrpEmitter<A, B> {
527 fn fdivrp(&mut self, op0: A, op1: B);
528}
529
530impl<'a> FdivrpEmitter<St, St> for Assembler<'a> {
531 fn fdivrp(&mut self, op0: St, op1: St) {
532 self.emit(FDIVRPRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
533 }
534}
535
536/// `FFREE`.
537///
538/// Supported operand variants:
539///
540/// ```text
541/// +---+----------+
542/// | # | Operands |
543/// +---+----------+
544/// | 1 | St |
545/// +---+----------+
546/// ```
547pub trait FfreeEmitter<A> {
548 fn ffree(&mut self, op0: A);
549}
550
551impl<'a> FfreeEmitter<St> for Assembler<'a> {
552 fn ffree(&mut self, op0: St) {
553 self.emit(FFREER, op0.as_operand(), &NOREG, &NOREG, &NOREG);
554 }
555}
556
557/// `FIADD` (FIADD).
558/// Adds the destination and source operands and stores the sum in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
559///
560///
561/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FADD%3AFADDP%3AFIADD.html).
562///
563/// Supported operand variants:
564///
565/// ```text
566/// +---+----------+
567/// | # | Operands |
568/// +---+----------+
569/// | 1 | Mem |
570/// +---+----------+
571/// ```
572pub trait FiaddEmitter<A> {
573 fn fiadd(&mut self, op0: A);
574}
575
576impl<'a> FiaddEmitter<Mem> for Assembler<'a> {
577 fn fiadd(&mut self, op0: Mem) {
578 self.emit(FIADDM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
579 }
580}
581
582/// `FICOM` (FICOM).
583/// Compares the value in ST(0) with an integer source operand and sets the condition code flags C0, C2, and C3 in the FPU status word according to the results (see table below). The integer value is converted to double extended-precision floating-point format before the comparison is made.
584///
585///
586/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FICOM%3AFICOMP.html).
587///
588/// Supported operand variants:
589///
590/// ```text
591/// +---+----------+
592/// | # | Operands |
593/// +---+----------+
594/// | 1 | Mem |
595/// +---+----------+
596/// ```
597pub trait FicomEmitter<A> {
598 fn ficom(&mut self, op0: A);
599}
600
601impl<'a> FicomEmitter<Mem> for Assembler<'a> {
602 fn ficom(&mut self, op0: Mem) {
603 self.emit(FICOMM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
604 }
605}
606
607/// `FICOMP` (FICOMP).
608/// Compares the value in ST(0) with an integer source operand and sets the condition code flags C0, C2, and C3 in the FPU status word according to the results (see table below). The integer value is converted to double extended-precision floating-point format before the comparison is made.
609///
610///
611/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FICOM%3AFICOMP.html).
612///
613/// Supported operand variants:
614///
615/// ```text
616/// +---+----------+
617/// | # | Operands |
618/// +---+----------+
619/// | 1 | Mem |
620/// +---+----------+
621/// ```
622pub trait FicompEmitter<A> {
623 fn ficomp(&mut self, op0: A);
624}
625
626impl<'a> FicompEmitter<Mem> for Assembler<'a> {
627 fn ficomp(&mut self, op0: Mem) {
628 self.emit(FICOMPM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
629 }
630}
631
632/// `FIDIV` (FIDIV).
633/// Divides the destination operand by the source operand and stores the result in the destination location. The destination operand (dividend) is always in an FPU register; the source operand (divisor) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
634///
635///
636/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIV%3AFDIVP%3AFIDIV.html).
637///
638/// Supported operand variants:
639///
640/// ```text
641/// +---+----------+
642/// | # | Operands |
643/// +---+----------+
644/// | 1 | Mem |
645/// +---+----------+
646/// ```
647pub trait FidivEmitter<A> {
648 fn fidiv(&mut self, op0: A);
649}
650
651impl<'a> FidivEmitter<Mem> for Assembler<'a> {
652 fn fidiv(&mut self, op0: Mem) {
653 self.emit(FIDIVM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
654 }
655}
656
657/// `FIDIVR` (FIDIVR).
658/// Divides the source operand by the destination operand and stores the result in the destination location. The destination operand (divisor) is always in an FPU register; the source operand (dividend) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
659///
660///
661/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIVR%3AFDIVRP%3AFIDIVR.html).
662///
663/// Supported operand variants:
664///
665/// ```text
666/// +---+----------+
667/// | # | Operands |
668/// +---+----------+
669/// | 1 | Mem |
670/// +---+----------+
671/// ```
672pub trait FidivrEmitter<A> {
673 fn fidivr(&mut self, op0: A);
674}
675
676impl<'a> FidivrEmitter<Mem> for Assembler<'a> {
677 fn fidivr(&mut self, op0: Mem) {
678 self.emit(FIDIVRM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
679 }
680}
681
682/// `FILD` (FILD).
683/// Converts the signed-integer source operand into double extended-precision floating-point format and pushes the value onto the FPU register stack. The source operand can be a word, doubleword, or quadword integer. It is loaded without rounding errors. The sign of the source operand is preserved.
684///
685///
686/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FILD.html).
687///
688/// Supported operand variants:
689///
690/// ```text
691/// +---+----------+
692/// | # | Operands |
693/// +---+----------+
694/// | 1 | Mem |
695/// +---+----------+
696/// ```
697pub trait FildEmitter<A> {
698 fn fild(&mut self, op0: A);
699}
700
701impl<'a> FildEmitter<Mem> for Assembler<'a> {
702 fn fild(&mut self, op0: Mem) {
703 self.emit(FILDM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
704 }
705}
706
707/// `FIMUL` (FIMUL).
708/// Multiplies the destination and source operands and stores the product in the destination location. The destination operand is always an FPU data register; the source operand can be an FPU data register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
709///
710///
711/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FMUL%3AFMULP%3AFIMUL.html).
712///
713/// Supported operand variants:
714///
715/// ```text
716/// +---+----------+
717/// | # | Operands |
718/// +---+----------+
719/// | 1 | Mem |
720/// +---+----------+
721/// ```
722pub trait FimulEmitter<A> {
723 fn fimul(&mut self, op0: A);
724}
725
726impl<'a> FimulEmitter<Mem> for Assembler<'a> {
727 fn fimul(&mut self, op0: Mem) {
728 self.emit(FIMULM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
729 }
730}
731
732/// `FINCSTP`.
733///
734/// Supported operand variants:
735///
736/// ```text
737/// +---+----------+
738/// | # | Operands |
739/// +---+----------+
740/// | 1 | (none) |
741/// +---+----------+
742/// ```
743pub trait FincstpEmitter {
744 fn fincstp(&mut self);
745}
746
747impl<'a> FincstpEmitter for Assembler<'a> {
748 fn fincstp(&mut self) {
749 self.emit(FINCSTP, &NOREG, &NOREG, &NOREG, &NOREG);
750 }
751}
752
753/// `FINIT` (FINIT).
754/// Sets the FPU control, status, tag, instruction pointer, and data pointer registers to their default states. The FPU control word is set to 037FH (round to nearest, all exceptions masked, 64-bit precision). The status word is cleared (no exception flags set, TOP is set to 0). The data registers in the register stack are left unchanged, but they are all tagged as empty (11B). Both the instruction and data pointers are cleared.
755///
756///
757/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FINIT%3AFNINIT.html).
758///
759/// Supported operand variants:
760///
761/// ```text
762/// +---+----------+
763/// | # | Operands |
764/// +---+----------+
765/// | 1 | (none) |
766/// +---+----------+
767/// ```
768pub trait FinitEmitter {
769 fn finit(&mut self);
770}
771
772impl<'a> FinitEmitter for Assembler<'a> {
773 fn finit(&mut self) {
774 self.emit(FINIT, &NOREG, &NOREG, &NOREG, &NOREG);
775 }
776}
777
778/// `FIST` (FIST).
779/// The FIST instruction converts the value in the ST(0) register to a signed integer and stores the result in the destination operand. Values can be stored in word or doubleword integer format. The destination operand specifies the address where the first byte of the destination value is to be stored.
780///
781///
782/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FIST%3AFISTP.html).
783///
784/// Supported operand variants:
785///
786/// ```text
787/// +---+----------+
788/// | # | Operands |
789/// +---+----------+
790/// | 1 | Mem |
791/// +---+----------+
792/// ```
793pub trait FistEmitter<A> {
794 fn fist(&mut self, op0: A);
795}
796
797impl<'a> FistEmitter<Mem> for Assembler<'a> {
798 fn fist(&mut self, op0: Mem) {
799 self.emit(FISTM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
800 }
801}
802
803/// `FISTP` (FISTP).
804/// The FIST instruction converts the value in the ST(0) register to a signed integer and stores the result in the destination operand. Values can be stored in word or doubleword integer format. The destination operand specifies the address where the first byte of the destination value is to be stored.
805///
806///
807/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FIST%3AFISTP.html).
808///
809/// Supported operand variants:
810///
811/// ```text
812/// +---+----------+
813/// | # | Operands |
814/// +---+----------+
815/// | 1 | Mem |
816/// +---+----------+
817/// ```
818pub trait FistpEmitter<A> {
819 fn fistp(&mut self, op0: A);
820}
821
822impl<'a> FistpEmitter<Mem> for Assembler<'a> {
823 fn fistp(&mut self, op0: Mem) {
824 self.emit(FISTPM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
825 }
826}
827
828/// `FISUB` (FISUB).
829/// Subtracts the source operand from the destination operand and stores the difference in the destination location. The destination operand is always an FPU data register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
830///
831///
832/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUB%3AFSUBP%3AFISUB.html).
833///
834/// Supported operand variants:
835///
836/// ```text
837/// +---+----------+
838/// | # | Operands |
839/// +---+----------+
840/// | 1 | Mem |
841/// +---+----------+
842/// ```
843pub trait FisubEmitter<A> {
844 fn fisub(&mut self, op0: A);
845}
846
847impl<'a> FisubEmitter<Mem> for Assembler<'a> {
848 fn fisub(&mut self, op0: Mem) {
849 self.emit(FISUBM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
850 }
851}
852
853/// `FISUBR` (FISUBR).
854/// Subtracts the destination operand from the source operand and stores the difference in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
855///
856///
857/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUBR%3AFSUBRP%3AFISUBR.html).
858///
859/// Supported operand variants:
860///
861/// ```text
862/// +---+----------+
863/// | # | Operands |
864/// +---+----------+
865/// | 1 | Mem |
866/// +---+----------+
867/// ```
868pub trait FisubrEmitter<A> {
869 fn fisubr(&mut self, op0: A);
870}
871
872impl<'a> FisubrEmitter<Mem> for Assembler<'a> {
873 fn fisubr(&mut self, op0: Mem) {
874 self.emit(FISUBRM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
875 }
876}
877
878/// `FLD` (FLD).
879/// Pushes the source operand onto the FPU register stack. The source operand can be in single precision, double precision, or double extended-precision floating-point format. If the source operand is in single precision or double precision floating-point format, it is automatically converted to the double extended-precision floating-point format before being pushed on the stack.
880///
881///
882/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD.html).
883///
884/// Supported operand variants:
885///
886/// ```text
887/// +---+----------+
888/// | # | Operands |
889/// +---+----------+
890/// | 1 | Mem |
891/// | 2 | St |
892/// +---+----------+
893/// ```
894pub trait FldEmitter<A> {
895 fn fld(&mut self, op0: A);
896}
897
898impl<'a> FldEmitter<Mem> for Assembler<'a> {
899 fn fld(&mut self, op0: Mem) {
900 self.emit(FLDM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
901 }
902}
903
904impl<'a> FldEmitter<St> for Assembler<'a> {
905 fn fld(&mut self, op0: St) {
906 self.emit(FLDR, op0.as_operand(), &NOREG, &NOREG, &NOREG);
907 }
908}
909
910/// `FLD1` (FLD1).
911/// Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log210, log2e, π, log102, and loge2. For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.
912///
913///
914/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD1%3AFLDL2T%3AFLDL2E%3AFLDPI%3AFLDLG2%3AFLDLN2%3AFLDZ.html).
915///
916/// Supported operand variants:
917///
918/// ```text
919/// +---+----------+
920/// | # | Operands |
921/// +---+----------+
922/// | 1 | (none) |
923/// +---+----------+
924/// ```
925pub trait Fld1Emitter {
926 fn fld1(&mut self);
927}
928
929impl<'a> Fld1Emitter for Assembler<'a> {
930 fn fld1(&mut self) {
931 self.emit(FLD1, &NOREG, &NOREG, &NOREG, &NOREG);
932 }
933}
934
935/// `FLDCW`.
936///
937/// Supported operand variants:
938///
939/// ```text
940/// +---+----------+
941/// | # | Operands |
942/// +---+----------+
943/// | 1 | Mem |
944/// +---+----------+
945/// ```
946pub trait FldcwEmitter<A> {
947 fn fldcw(&mut self, op0: A);
948}
949
950impl<'a> FldcwEmitter<Mem> for Assembler<'a> {
951 fn fldcw(&mut self, op0: Mem) {
952 self.emit(FLDCWM, op0.as_operand(), &NOREG, &NOREG, &NOREG);
953 }
954}
955
956/// `FLDENV`.
957///
958/// Supported operand variants:
959///
960/// ```text
961/// +---+----------+
962/// | # | Operands |
963/// +---+----------+
964/// | 1 | Mem |
965/// +---+----------+
966/// ```
967pub trait FldenvEmitter<A> {
968 fn fldenv(&mut self, op0: A);
969}
970
971impl<'a> FldenvEmitter<Mem> for Assembler<'a> {
972 fn fldenv(&mut self, op0: Mem) {
973 self.emit(FLDENVM, op0.as_operand(), &NOREG, &NOREG, &NOREG);
974 }
975}
976
977/// `FLDL2E` (FLDL2E).
978/// Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log210, log2e, π, log102, and loge2. For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.
979///
980///
981/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD1%3AFLDL2T%3AFLDL2E%3AFLDPI%3AFLDLG2%3AFLDLN2%3AFLDZ.html).
982///
983/// Supported operand variants:
984///
985/// ```text
986/// +---+----------+
987/// | # | Operands |
988/// +---+----------+
989/// | 1 | (none) |
990/// +---+----------+
991/// ```
992pub trait Fldl2eEmitter {
993 fn fldl2e(&mut self);
994}
995
996impl<'a> Fldl2eEmitter for Assembler<'a> {
997 fn fldl2e(&mut self) {
998 self.emit(FLDL2E, &NOREG, &NOREG, &NOREG, &NOREG);
999 }
1000}
1001
1002/// `FLDL2T` (FLDL2T).
1003/// Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log210, log2e, π, log102, and loge2. For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.
1004///
1005///
1006/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD1%3AFLDL2T%3AFLDL2E%3AFLDPI%3AFLDLG2%3AFLDLN2%3AFLDZ.html).
1007///
1008/// Supported operand variants:
1009///
1010/// ```text
1011/// +---+----------+
1012/// | # | Operands |
1013/// +---+----------+
1014/// | 1 | (none) |
1015/// +---+----------+
1016/// ```
1017pub trait Fldl2tEmitter {
1018 fn fldl2t(&mut self);
1019}
1020
1021impl<'a> Fldl2tEmitter for Assembler<'a> {
1022 fn fldl2t(&mut self) {
1023 self.emit(FLDL2T, &NOREG, &NOREG, &NOREG, &NOREG);
1024 }
1025}
1026
1027/// `FLDLG2` (FLDLG2).
1028/// Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log210, log2e, π, log102, and loge2. For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.
1029///
1030///
1031/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD1%3AFLDL2T%3AFLDL2E%3AFLDPI%3AFLDLG2%3AFLDLN2%3AFLDZ.html).
1032///
1033/// Supported operand variants:
1034///
1035/// ```text
1036/// +---+----------+
1037/// | # | Operands |
1038/// +---+----------+
1039/// | 1 | (none) |
1040/// +---+----------+
1041/// ```
1042pub trait Fldlg2Emitter {
1043 fn fldlg2(&mut self);
1044}
1045
1046impl<'a> Fldlg2Emitter for Assembler<'a> {
1047 fn fldlg2(&mut self) {
1048 self.emit(FLDLG2, &NOREG, &NOREG, &NOREG, &NOREG);
1049 }
1050}
1051
1052/// `FLDLN2` (FLDLN2).
1053/// Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log210, log2e, π, log102, and loge2. For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.
1054///
1055///
1056/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD1%3AFLDL2T%3AFLDL2E%3AFLDPI%3AFLDLG2%3AFLDLN2%3AFLDZ.html).
1057///
1058/// Supported operand variants:
1059///
1060/// ```text
1061/// +---+----------+
1062/// | # | Operands |
1063/// +---+----------+
1064/// | 1 | (none) |
1065/// +---+----------+
1066/// ```
1067pub trait Fldln2Emitter {
1068 fn fldln2(&mut self);
1069}
1070
1071impl<'a> Fldln2Emitter for Assembler<'a> {
1072 fn fldln2(&mut self) {
1073 self.emit(FLDLN2, &NOREG, &NOREG, &NOREG, &NOREG);
1074 }
1075}
1076
1077/// `FLDPI` (FLDPI).
1078/// Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log210, log2e, π, log102, and loge2. For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.
1079///
1080///
1081/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD1%3AFLDL2T%3AFLDL2E%3AFLDPI%3AFLDLG2%3AFLDLN2%3AFLDZ.html).
1082///
1083/// Supported operand variants:
1084///
1085/// ```text
1086/// +---+----------+
1087/// | # | Operands |
1088/// +---+----------+
1089/// | 1 | (none) |
1090/// +---+----------+
1091/// ```
1092pub trait FldpiEmitter {
1093 fn fldpi(&mut self);
1094}
1095
1096impl<'a> FldpiEmitter for Assembler<'a> {
1097 fn fldpi(&mut self) {
1098 self.emit(FLDPI, &NOREG, &NOREG, &NOREG, &NOREG);
1099 }
1100}
1101
1102/// `FLDZ` (FLDZ).
1103/// Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log210, log2e, π, log102, and loge2. For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.
1104///
1105///
1106/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD1%3AFLDL2T%3AFLDL2E%3AFLDPI%3AFLDLG2%3AFLDLN2%3AFLDZ.html).
1107///
1108/// Supported operand variants:
1109///
1110/// ```text
1111/// +---+----------+
1112/// | # | Operands |
1113/// +---+----------+
1114/// | 1 | (none) |
1115/// +---+----------+
1116/// ```
1117pub trait FldzEmitter {
1118 fn fldz(&mut self);
1119}
1120
1121impl<'a> FldzEmitter for Assembler<'a> {
1122 fn fldz(&mut self) {
1123 self.emit(FLDZ, &NOREG, &NOREG, &NOREG, &NOREG);
1124 }
1125}
1126
1127/// `FMUL` (FMUL).
1128/// Multiplies the destination and source operands and stores the product in the destination location. The destination operand is always an FPU data register; the source operand can be an FPU data register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
1129///
1130///
1131/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FMUL%3AFMULP%3AFIMUL.html).
1132///
1133/// Supported operand variants:
1134///
1135/// ```text
1136/// +---+----------+
1137/// | # | Operands |
1138/// +---+----------+
1139/// | 1 | Mem |
1140/// +---+----------+
1141/// ```
1142pub trait FmulEmitter_1<A> {
1143 fn fmul_1(&mut self, op0: A);
1144}
1145
1146impl<'a> FmulEmitter_1<Mem> for Assembler<'a> {
1147 fn fmul_1(&mut self, op0: Mem) {
1148 self.emit(FMULM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1149 }
1150}
1151
1152/// `FMUL` (FMUL).
1153/// Multiplies the destination and source operands and stores the product in the destination location. The destination operand is always an FPU data register; the source operand can be an FPU data register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
1154///
1155///
1156/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FMUL%3AFMULP%3AFIMUL.html).
1157///
1158/// Supported operand variants:
1159///
1160/// ```text
1161/// +---+----------+
1162/// | # | Operands |
1163/// +---+----------+
1164/// | 1 | St, St |
1165/// +---+----------+
1166/// ```
1167pub trait FmulEmitter_2<A, B> {
1168 fn fmul_2(&mut self, op0: A, op1: B);
1169}
1170
1171impl<'a> FmulEmitter_2<St, St> for Assembler<'a> {
1172 fn fmul_2(&mut self, op0: St, op1: St) {
1173 self.emit(FMULRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1174 }
1175}
1176
1177/// `FMULP` (FMULP).
1178/// Multiplies the destination and source operands and stores the product in the destination location. The destination operand is always an FPU data register; the source operand can be an FPU data register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
1179///
1180///
1181/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FMUL%3AFMULP%3AFIMUL.html).
1182///
1183/// Supported operand variants:
1184///
1185/// ```text
1186/// +---+----------+
1187/// | # | Operands |
1188/// +---+----------+
1189/// | 1 | St, St |
1190/// +---+----------+
1191/// ```
1192pub trait FmulpEmitter<A, B> {
1193 fn fmulp(&mut self, op0: A, op1: B);
1194}
1195
1196impl<'a> FmulpEmitter<St, St> for Assembler<'a> {
1197 fn fmulp(&mut self, op0: St, op1: St) {
1198 self.emit(FMULPRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1199 }
1200}
1201
1202/// `FNOP`.
1203///
1204/// Supported operand variants:
1205///
1206/// ```text
1207/// +---+----------+
1208/// | # | Operands |
1209/// +---+----------+
1210/// | 1 | (none) |
1211/// +---+----------+
1212/// ```
1213pub trait FnopEmitter {
1214 fn fnop(&mut self);
1215}
1216
1217impl<'a> FnopEmitter for Assembler<'a> {
1218 fn fnop(&mut self) {
1219 self.emit(FNOP, &NOREG, &NOREG, &NOREG, &NOREG);
1220 }
1221}
1222
1223/// `FPATAN`.
1224///
1225/// Supported operand variants:
1226///
1227/// ```text
1228/// +---+----------+
1229/// | # | Operands |
1230/// +---+----------+
1231/// | 1 | (none) |
1232/// +---+----------+
1233/// ```
1234pub trait FpatanEmitter {
1235 fn fpatan(&mut self);
1236}
1237
1238impl<'a> FpatanEmitter for Assembler<'a> {
1239 fn fpatan(&mut self) {
1240 self.emit(FPATAN, &NOREG, &NOREG, &NOREG, &NOREG);
1241 }
1242}
1243
1244/// `FPREM` (FPREM).
1245/// Computes the remainder obtained from dividing the value in the ST(0) register (the dividend) by the value in the ST(1) register (the divisor or modulus), and stores the result in ST(0). The remainder represents the following value
1246///
1247///
1248/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FPREM.html).
1249///
1250/// Supported operand variants:
1251///
1252/// ```text
1253/// +---+----------+
1254/// | # | Operands |
1255/// +---+----------+
1256/// | 1 | (none) |
1257/// +---+----------+
1258/// ```
1259pub trait FpremEmitter {
1260 fn fprem(&mut self);
1261}
1262
1263impl<'a> FpremEmitter for Assembler<'a> {
1264 fn fprem(&mut self) {
1265 self.emit(FPREM, &NOREG, &NOREG, &NOREG, &NOREG);
1266 }
1267}
1268
1269/// `FPREM1` (FPREM1).
1270/// Computes the IEEE remainder obtained from dividing the value in the ST(0) register (the dividend) by the value in the ST(1) register (the divisor or modulus), and stores the result in ST(0). The remainder represents the following value
1271///
1272///
1273/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FPREM1.html).
1274///
1275/// Supported operand variants:
1276///
1277/// ```text
1278/// +---+----------+
1279/// | # | Operands |
1280/// +---+----------+
1281/// | 1 | (none) |
1282/// +---+----------+
1283/// ```
1284pub trait Fprem1Emitter {
1285 fn fprem1(&mut self);
1286}
1287
1288impl<'a> Fprem1Emitter for Assembler<'a> {
1289 fn fprem1(&mut self) {
1290 self.emit(FPREM1, &NOREG, &NOREG, &NOREG, &NOREG);
1291 }
1292}
1293
1294/// `FPTAN` (FPTAN).
1295/// Computes the approximate tangent of the source operand in register ST(0), stores the result in ST(0), and pushes a 1.0 onto the FPU register stack. The source operand must be given in radians and must be less than ±263. The following table shows the unmasked results obtained when computing the partial tangent of various classes of numbers, assuming that underflow does not occur.
1296///
1297///
1298/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FPTAN.html).
1299///
1300/// Supported operand variants:
1301///
1302/// ```text
1303/// +---+----------+
1304/// | # | Operands |
1305/// +---+----------+
1306/// | 1 | (none) |
1307/// +---+----------+
1308/// ```
1309pub trait FptanEmitter {
1310 fn fptan(&mut self);
1311}
1312
1313impl<'a> FptanEmitter for Assembler<'a> {
1314 fn fptan(&mut self) {
1315 self.emit(FPTAN, &NOREG, &NOREG, &NOREG, &NOREG);
1316 }
1317}
1318
1319/// `FRNDINT`.
1320///
1321/// Supported operand variants:
1322///
1323/// ```text
1324/// +---+----------+
1325/// | # | Operands |
1326/// +---+----------+
1327/// | 1 | (none) |
1328/// +---+----------+
1329/// ```
1330pub trait FrndintEmitter {
1331 fn frndint(&mut self);
1332}
1333
1334impl<'a> FrndintEmitter for Assembler<'a> {
1335 fn frndint(&mut self) {
1336 self.emit(FRNDINT, &NOREG, &NOREG, &NOREG, &NOREG);
1337 }
1338}
1339
1340/// `FRSTOR`.
1341///
1342/// Supported operand variants:
1343///
1344/// ```text
1345/// +---+----------+
1346/// | # | Operands |
1347/// +---+----------+
1348/// | 1 | Mem |
1349/// +---+----------+
1350/// ```
1351pub trait FrstorEmitter<A> {
1352 fn frstor(&mut self, op0: A);
1353}
1354
1355impl<'a> FrstorEmitter<Mem> for Assembler<'a> {
1356 fn frstor(&mut self, op0: Mem) {
1357 self.emit(FRSTORM, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1358 }
1359}
1360
1361/// `FSAVE` (FSAVE).
1362/// Stores the current FPU state (operating environment and register stack) at the specified destination in memory, and then re-initializes the FPU. The FSAVE instruction checks for and handles pending unmasked floating-point exceptions before storing the FPU state; the FNSAVE instruction does not.
1363///
1364///
1365/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSAVE%3AFNSAVE.html).
1366///
1367/// Supported operand variants:
1368///
1369/// ```text
1370/// +---+----------+
1371/// | # | Operands |
1372/// +---+----------+
1373/// | 1 | Mem |
1374/// +---+----------+
1375/// ```
1376pub trait FsaveEmitter<A> {
1377 fn fsave(&mut self, op0: A);
1378}
1379
1380impl<'a> FsaveEmitter<Mem> for Assembler<'a> {
1381 fn fsave(&mut self, op0: Mem) {
1382 self.emit(FSAVEM, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1383 }
1384}
1385
1386/// `FSCALE`.
1387///
1388/// Supported operand variants:
1389///
1390/// ```text
1391/// +---+----------+
1392/// | # | Operands |
1393/// +---+----------+
1394/// | 1 | (none) |
1395/// +---+----------+
1396/// ```
1397pub trait FscaleEmitter {
1398 fn fscale(&mut self);
1399}
1400
1401impl<'a> FscaleEmitter for Assembler<'a> {
1402 fn fscale(&mut self) {
1403 self.emit(FSCALE, &NOREG, &NOREG, &NOREG, &NOREG);
1404 }
1405}
1406
1407/// `FSIN`.
1408///
1409/// Supported operand variants:
1410///
1411/// ```text
1412/// +---+----------+
1413/// | # | Operands |
1414/// +---+----------+
1415/// | 1 | (none) |
1416/// +---+----------+
1417/// ```
1418pub trait FsinEmitter {
1419 fn fsin(&mut self);
1420}
1421
1422impl<'a> FsinEmitter for Assembler<'a> {
1423 fn fsin(&mut self) {
1424 self.emit(FSIN, &NOREG, &NOREG, &NOREG, &NOREG);
1425 }
1426}
1427
1428/// `FSINCOS` (FSINCOS).
1429/// Computes both the approximate sine and the cosine of the source operand in register ST(0), stores the sine in ST(0), and pushes the cosine onto the top of the FPU register stack. (This instruction is faster than executing the FSIN and FCOS instructions in succession.)
1430///
1431///
1432/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSINCOS.html).
1433///
1434/// Supported operand variants:
1435///
1436/// ```text
1437/// +---+----------+
1438/// | # | Operands |
1439/// +---+----------+
1440/// | 1 | (none) |
1441/// +---+----------+
1442/// ```
1443pub trait FsincosEmitter {
1444 fn fsincos(&mut self);
1445}
1446
1447impl<'a> FsincosEmitter for Assembler<'a> {
1448 fn fsincos(&mut self) {
1449 self.emit(FSINCOS, &NOREG, &NOREG, &NOREG, &NOREG);
1450 }
1451}
1452
1453/// `FSQRT`.
1454///
1455/// Supported operand variants:
1456///
1457/// ```text
1458/// +---+----------+
1459/// | # | Operands |
1460/// +---+----------+
1461/// | 1 | (none) |
1462/// +---+----------+
1463/// ```
1464pub trait FsqrtEmitter {
1465 fn fsqrt(&mut self);
1466}
1467
1468impl<'a> FsqrtEmitter for Assembler<'a> {
1469 fn fsqrt(&mut self) {
1470 self.emit(FSQRT, &NOREG, &NOREG, &NOREG, &NOREG);
1471 }
1472}
1473
1474/// `FST` (FST).
1475/// The FST instruction copies the value in the ST(0) register to the destination operand, which can be a memory location or another register in the FPU register stack. When storing the value in memory, the value is converted to single precision or double precision floating-point format.
1476///
1477///
1478/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FST%3AFSTP.html).
1479///
1480/// Supported operand variants:
1481///
1482/// ```text
1483/// +---+----------+
1484/// | # | Operands |
1485/// +---+----------+
1486/// | 1 | Mem |
1487/// | 2 | St |
1488/// +---+----------+
1489/// ```
1490pub trait FstEmitter<A> {
1491 fn fst(&mut self, op0: A);
1492}
1493
1494impl<'a> FstEmitter<Mem> for Assembler<'a> {
1495 fn fst(&mut self, op0: Mem) {
1496 self.emit(FSTM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1497 }
1498}
1499
1500impl<'a> FstEmitter<St> for Assembler<'a> {
1501 fn fst(&mut self, op0: St) {
1502 self.emit(FSTR, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1503 }
1504}
1505
1506/// `FSTCW` (FSTCW).
1507/// Stores the current value of the FPU control word at the specified destination in memory. The FSTCW instruction checks for and handles pending unmasked floating-point exceptions before storing the control word; the FNSTCW instruction does not.
1508///
1509///
1510/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSTCW%3AFNSTCW.html).
1511///
1512/// Supported operand variants:
1513///
1514/// ```text
1515/// +---+----------+
1516/// | # | Operands |
1517/// +---+----------+
1518/// | 1 | Mem |
1519/// +---+----------+
1520/// ```
1521pub trait FstcwEmitter<A> {
1522 fn fstcw(&mut self, op0: A);
1523}
1524
1525impl<'a> FstcwEmitter<Mem> for Assembler<'a> {
1526 fn fstcw(&mut self, op0: Mem) {
1527 self.emit(FSTCWM, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1528 }
1529}
1530
1531/// `FSTENV` (FSTENV).
1532/// Saves the current FPU operating environment at the memory location specified with the destination operand, and then masks all floating-point exceptions. The FPU operating environment consists of the FPU control word, status word, tag word, instruction pointer, data pointer, and last opcode. Figures 8-9 through 8-12 in the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1, show the layout in memory of the stored environment, depending on the operating mode of the processor (protected or real) and the current operand-size attribute (16-bit or 32-bit). In virtual-8086 mode, the real mode layouts are used.
1533///
1534///
1535/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSTENV%3AFNSTENV.html).
1536///
1537/// Supported operand variants:
1538///
1539/// ```text
1540/// +---+----------+
1541/// | # | Operands |
1542/// +---+----------+
1543/// | 1 | Mem |
1544/// +---+----------+
1545/// ```
1546pub trait FstenvEmitter<A> {
1547 fn fstenv(&mut self, op0: A);
1548}
1549
1550impl<'a> FstenvEmitter<Mem> for Assembler<'a> {
1551 fn fstenv(&mut self, op0: Mem) {
1552 self.emit(FSTENVM, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1553 }
1554}
1555
1556/// `FSTP` (FSTP).
1557/// The FST instruction copies the value in the ST(0) register to the destination operand, which can be a memory location or another register in the FPU register stack. When storing the value in memory, the value is converted to single precision or double precision floating-point format.
1558///
1559///
1560/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FST%3AFSTP.html).
1561///
1562/// Supported operand variants:
1563///
1564/// ```text
1565/// +---+----------+
1566/// | # | Operands |
1567/// +---+----------+
1568/// | 1 | Mem |
1569/// | 2 | St |
1570/// +---+----------+
1571/// ```
1572pub trait FstpEmitter<A> {
1573 fn fstp(&mut self, op0: A);
1574}
1575
1576impl<'a> FstpEmitter<Mem> for Assembler<'a> {
1577 fn fstp(&mut self, op0: Mem) {
1578 self.emit(FSTPM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1579 }
1580}
1581
1582impl<'a> FstpEmitter<St> for Assembler<'a> {
1583 fn fstp(&mut self, op0: St) {
1584 self.emit(FSTPR, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1585 }
1586}
1587
1588/// `FSTSW` (FSTSW).
1589/// Stores the current value of the x87 FPU status word in the destination location. The destination operand can be either a two-byte memory location or the AX register. The FSTSW instruction checks for and handles pending unmasked floating-point exceptions before storing the status word; the FNSTSW instruction does not.
1590///
1591///
1592/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSTSW%3AFNSTSW.html).
1593///
1594/// Supported operand variants:
1595///
1596/// ```text
1597/// +---+----------+
1598/// | # | Operands |
1599/// +---+----------+
1600/// | 1 | Gpd |
1601/// | 2 | Mem |
1602/// +---+----------+
1603/// ```
1604pub trait FstswEmitter<A> {
1605 fn fstsw(&mut self, op0: A);
1606}
1607
1608impl<'a> FstswEmitter<Mem> for Assembler<'a> {
1609 fn fstsw(&mut self, op0: Mem) {
1610 self.emit(FSTSWM, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1611 }
1612}
1613
1614impl<'a> FstswEmitter<Gpd> for Assembler<'a> {
1615 fn fstsw(&mut self, op0: Gpd) {
1616 self.emit(FSTSWR, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1617 }
1618}
1619
1620/// `FSUB` (FSUB).
1621/// Subtracts the source operand from the destination operand and stores the difference in the destination location. The destination operand is always an FPU data register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
1622///
1623///
1624/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUB%3AFSUBP%3AFISUB.html).
1625///
1626/// Supported operand variants:
1627///
1628/// ```text
1629/// +---+----------+
1630/// | # | Operands |
1631/// +---+----------+
1632/// | 1 | Mem |
1633/// +---+----------+
1634/// ```
1635pub trait FsubEmitter_1<A> {
1636 fn fsub_1(&mut self, op0: A);
1637}
1638
1639impl<'a> FsubEmitter_1<Mem> for Assembler<'a> {
1640 fn fsub_1(&mut self, op0: Mem) {
1641 self.emit(FSUBM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1642 }
1643}
1644
1645/// `FSUB` (FSUB).
1646/// Subtracts the source operand from the destination operand and stores the difference in the destination location. The destination operand is always an FPU data register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
1647///
1648///
1649/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUB%3AFSUBP%3AFISUB.html).
1650///
1651/// Supported operand variants:
1652///
1653/// ```text
1654/// +---+----------+
1655/// | # | Operands |
1656/// +---+----------+
1657/// | 1 | St, St |
1658/// +---+----------+
1659/// ```
1660pub trait FsubEmitter_2<A, B> {
1661 fn fsub_2(&mut self, op0: A, op1: B);
1662}
1663
1664impl<'a> FsubEmitter_2<St, St> for Assembler<'a> {
1665 fn fsub_2(&mut self, op0: St, op1: St) {
1666 self.emit(FSUBRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1667 }
1668}
1669
1670/// `FSUBP` (FSUBP).
1671/// Subtracts the source operand from the destination operand and stores the difference in the destination location. The destination operand is always an FPU data register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
1672///
1673///
1674/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUB%3AFSUBP%3AFISUB.html).
1675///
1676/// Supported operand variants:
1677///
1678/// ```text
1679/// +---+----------+
1680/// | # | Operands |
1681/// +---+----------+
1682/// | 1 | St, St |
1683/// +---+----------+
1684/// ```
1685pub trait FsubpEmitter<A, B> {
1686 fn fsubp(&mut self, op0: A, op1: B);
1687}
1688
1689impl<'a> FsubpEmitter<St, St> for Assembler<'a> {
1690 fn fsubp(&mut self, op0: St, op1: St) {
1691 self.emit(FSUBPRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1692 }
1693}
1694
1695/// `FSUBR` (FSUBR).
1696/// Subtracts the destination operand from the source operand and stores the difference in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
1697///
1698///
1699/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUBR%3AFSUBRP%3AFISUBR.html).
1700///
1701/// Supported operand variants:
1702///
1703/// ```text
1704/// +---+----------+
1705/// | # | Operands |
1706/// +---+----------+
1707/// | 1 | Mem |
1708/// +---+----------+
1709/// ```
1710pub trait FsubrEmitter_1<A> {
1711 fn fsubr_1(&mut self, op0: A);
1712}
1713
1714impl<'a> FsubrEmitter_1<Mem> for Assembler<'a> {
1715 fn fsubr_1(&mut self, op0: Mem) {
1716 self.emit(FSUBRM32, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1717 }
1718}
1719
1720/// `FSUBR` (FSUBR).
1721/// Subtracts the destination operand from the source operand and stores the difference in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
1722///
1723///
1724/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUBR%3AFSUBRP%3AFISUBR.html).
1725///
1726/// Supported operand variants:
1727///
1728/// ```text
1729/// +---+----------+
1730/// | # | Operands |
1731/// +---+----------+
1732/// | 1 | St, St |
1733/// +---+----------+
1734/// ```
1735pub trait FsubrEmitter_2<A, B> {
1736 fn fsubr_2(&mut self, op0: A, op1: B);
1737}
1738
1739impl<'a> FsubrEmitter_2<St, St> for Assembler<'a> {
1740 fn fsubr_2(&mut self, op0: St, op1: St) {
1741 self.emit(FSUBRRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1742 }
1743}
1744
1745/// `FSUBRP` (FSUBRP).
1746/// Subtracts the destination operand from the source operand and stores the difference in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
1747///
1748///
1749/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUBR%3AFSUBRP%3AFISUBR.html).
1750///
1751/// Supported operand variants:
1752///
1753/// ```text
1754/// +---+----------+
1755/// | # | Operands |
1756/// +---+----------+
1757/// | 1 | St, St |
1758/// +---+----------+
1759/// ```
1760pub trait FsubrpEmitter<A, B> {
1761 fn fsubrp(&mut self, op0: A, op1: B);
1762}
1763
1764impl<'a> FsubrpEmitter<St, St> for Assembler<'a> {
1765 fn fsubrp(&mut self, op0: St, op1: St) {
1766 self.emit(FSUBRPRR, op0.as_operand(), op1.as_operand(), &NOREG, &NOREG);
1767 }
1768}
1769
1770/// `FTST`.
1771///
1772/// Supported operand variants:
1773///
1774/// ```text
1775/// +---+----------+
1776/// | # | Operands |
1777/// +---+----------+
1778/// | 1 | (none) |
1779/// +---+----------+
1780/// ```
1781pub trait FtstEmitter {
1782 fn ftst(&mut self);
1783}
1784
1785impl<'a> FtstEmitter for Assembler<'a> {
1786 fn ftst(&mut self) {
1787 self.emit(FTST, &NOREG, &NOREG, &NOREG, &NOREG);
1788 }
1789}
1790
1791/// `FUCOM` (FUCOM).
1792/// Performs an unordered comparison of the contents of register ST(0) and ST(i) and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). If no operand is specified, the contents of registers ST(0) and ST(1) are compared. The sign of zero is ignored, so that –0.0 is equal to +0.0.
1793///
1794///
1795/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FUCOM%3AFUCOMP%3AFUCOMPP.html).
1796///
1797/// Supported operand variants:
1798///
1799/// ```text
1800/// +---+----------+
1801/// | # | Operands |
1802/// +---+----------+
1803/// | 1 | St |
1804/// +---+----------+
1805/// ```
1806pub trait FucomEmitter<A> {
1807 fn fucom(&mut self, op0: A);
1808}
1809
1810impl<'a> FucomEmitter<St> for Assembler<'a> {
1811 fn fucom(&mut self, op0: St) {
1812 self.emit(FUCOMR, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1813 }
1814}
1815
1816/// `FUCOMP` (FUCOMP).
1817/// Performs an unordered comparison of the contents of register ST(0) and ST(i) and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). If no operand is specified, the contents of registers ST(0) and ST(1) are compared. The sign of zero is ignored, so that –0.0 is equal to +0.0.
1818///
1819///
1820/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FUCOM%3AFUCOMP%3AFUCOMPP.html).
1821///
1822/// Supported operand variants:
1823///
1824/// ```text
1825/// +---+----------+
1826/// | # | Operands |
1827/// +---+----------+
1828/// | 1 | St |
1829/// +---+----------+
1830/// ```
1831pub trait FucompEmitter<A> {
1832 fn fucomp(&mut self, op0: A);
1833}
1834
1835impl<'a> FucompEmitter<St> for Assembler<'a> {
1836 fn fucomp(&mut self, op0: St) {
1837 self.emit(FUCOMPR, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1838 }
1839}
1840
1841/// `FUCOMPP` (FUCOMPP).
1842/// Performs an unordered comparison of the contents of register ST(0) and ST(i) and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). If no operand is specified, the contents of registers ST(0) and ST(1) are compared. The sign of zero is ignored, so that –0.0 is equal to +0.0.
1843///
1844///
1845/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FUCOM%3AFUCOMP%3AFUCOMPP.html).
1846///
1847/// Supported operand variants:
1848///
1849/// ```text
1850/// +---+----------+
1851/// | # | Operands |
1852/// +---+----------+
1853/// | 1 | (none) |
1854/// +---+----------+
1855/// ```
1856pub trait FucomppEmitter {
1857 fn fucompp(&mut self);
1858}
1859
1860impl<'a> FucomppEmitter for Assembler<'a> {
1861 fn fucompp(&mut self) {
1862 self.emit(FUCOMPP, &NOREG, &NOREG, &NOREG, &NOREG);
1863 }
1864}
1865
1866/// `FXAM`.
1867///
1868/// Supported operand variants:
1869///
1870/// ```text
1871/// +---+----------+
1872/// | # | Operands |
1873/// +---+----------+
1874/// | 1 | (none) |
1875/// +---+----------+
1876/// ```
1877pub trait FxamEmitter {
1878 fn fxam(&mut self);
1879}
1880
1881impl<'a> FxamEmitter for Assembler<'a> {
1882 fn fxam(&mut self) {
1883 self.emit(FXAM, &NOREG, &NOREG, &NOREG, &NOREG);
1884 }
1885}
1886
1887/// `FXCH` (FXCH).
1888/// Exchanges the contents of registers ST(0) and ST(i). If no source operand is specified, the contents of ST(0) and ST(1) are exchanged.
1889///
1890///
1891/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FXCH.html).
1892///
1893/// Supported operand variants:
1894///
1895/// ```text
1896/// +---+----------+
1897/// | # | Operands |
1898/// +---+----------+
1899/// | 1 | St |
1900/// +---+----------+
1901/// ```
1902pub trait FxchEmitter<A> {
1903 fn fxch(&mut self, op0: A);
1904}
1905
1906impl<'a> FxchEmitter<St> for Assembler<'a> {
1907 fn fxch(&mut self, op0: St) {
1908 self.emit(FXCHR, op0.as_operand(), &NOREG, &NOREG, &NOREG);
1909 }
1910}
1911
1912/// `FXTRACT` (FXTRACT).
1913/// Separates the source value in the ST(0) register into its exponent and significand, stores the exponent in ST(0), and pushes the significand onto the register stack. Following this operation, the new top-of-stack register ST(0) contains the value of the original significand expressed as a floating-point value. The sign and significand of this value are the same as those found in the source operand, and the exponent is 3FFFH (biased value for a true exponent of zero). The ST(1) register contains the value of the original operand’s true (unbiased) exponent expressed as a floating-point value. (The operation performed by this instruction is a superset of the IEEE-recommended logb(x) function.)
1914///
1915///
1916/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FXTRACT.html).
1917///
1918/// Supported operand variants:
1919///
1920/// ```text
1921/// +---+----------+
1922/// | # | Operands |
1923/// +---+----------+
1924/// | 1 | (none) |
1925/// +---+----------+
1926/// ```
1927pub trait FxtractEmitter {
1928 fn fxtract(&mut self);
1929}
1930
1931impl<'a> FxtractEmitter for Assembler<'a> {
1932 fn fxtract(&mut self) {
1933 self.emit(FXTRACT, &NOREG, &NOREG, &NOREG, &NOREG);
1934 }
1935}
1936
1937/// `FYL2X` (FYL2X).
1938/// Computes (ST(1) ∗ log2 (ST(0))), stores the result in register ST(1), and pops the FPU register stack. The source operand in ST(0) must be a non-zero positive number.
1939///
1940///
1941/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FYL2X.html).
1942///
1943/// Supported operand variants:
1944///
1945/// ```text
1946/// +---+----------+
1947/// | # | Operands |
1948/// +---+----------+
1949/// | 1 | (none) |
1950/// +---+----------+
1951/// ```
1952pub trait Fyl2xEmitter {
1953 fn fyl2x(&mut self);
1954}
1955
1956impl<'a> Fyl2xEmitter for Assembler<'a> {
1957 fn fyl2x(&mut self) {
1958 self.emit(FYL2X, &NOREG, &NOREG, &NOREG, &NOREG);
1959 }
1960}
1961
1962/// `FYL2XP1` (FYL2XP1).
1963/// Computes (ST(1) ∗ log2(ST(0) + 1.0)), stores the result in register ST(1), and pops the FPU register stack. The source operand in ST(0) must be in the range
1964///
1965///
1966/// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FYL2XP1.html).
1967///
1968/// Supported operand variants:
1969///
1970/// ```text
1971/// +---+----------+
1972/// | # | Operands |
1973/// +---+----------+
1974/// | 1 | (none) |
1975/// +---+----------+
1976/// ```
1977pub trait Fyl2xp1Emitter {
1978 fn fyl2xp1(&mut self);
1979}
1980
1981impl<'a> Fyl2xp1Emitter for Assembler<'a> {
1982 fn fyl2xp1(&mut self) {
1983 self.emit(FYL2XP1, &NOREG, &NOREG, &NOREG, &NOREG);
1984 }
1985}
1986
1987
1988impl<'a> Assembler<'a> {
1989 /// `F2XM1`.
1990 ///
1991 /// Supported operand variants:
1992 ///
1993 /// ```text
1994 /// +---+----------+
1995 /// | # | Operands |
1996 /// +---+----------+
1997 /// | 1 | (none) |
1998 /// +---+----------+
1999 /// ```
2000 #[inline]
2001 pub fn f2xm1(&mut self)
2002 where Assembler<'a>: F2xm1Emitter {
2003 <Self as F2xm1Emitter>::f2xm1(self);
2004 }
2005 /// `FABS`.
2006 ///
2007 /// Supported operand variants:
2008 ///
2009 /// ```text
2010 /// +---+----------+
2011 /// | # | Operands |
2012 /// +---+----------+
2013 /// | 1 | (none) |
2014 /// +---+----------+
2015 /// ```
2016 #[inline]
2017 pub fn fabs(&mut self)
2018 where Assembler<'a>: FabsEmitter {
2019 <Self as FabsEmitter>::fabs(self);
2020 }
2021 /// `FADD` (FADD).
2022 /// Adds the destination and source operands and stores the sum in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
2023 ///
2024 ///
2025 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FADD%3AFADDP%3AFIADD.html).
2026 ///
2027 /// Supported operand variants:
2028 ///
2029 /// ```text
2030 /// +---+----------+
2031 /// | # | Operands |
2032 /// +---+----------+
2033 /// | 1 | Mem |
2034 /// +---+----------+
2035 /// ```
2036 #[inline]
2037 pub fn fadd_1<A>(&mut self, op0: A)
2038 where Assembler<'a>: FaddEmitter_1<A> {
2039 <Self as FaddEmitter_1<A>>::fadd_1(self, op0);
2040 }
2041 /// `FADD` (FADD).
2042 /// Adds the destination and source operands and stores the sum in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
2043 ///
2044 ///
2045 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FADD%3AFADDP%3AFIADD.html).
2046 ///
2047 /// Supported operand variants:
2048 ///
2049 /// ```text
2050 /// +---+----------+
2051 /// | # | Operands |
2052 /// +---+----------+
2053 /// | 1 | St, St |
2054 /// +---+----------+
2055 /// ```
2056 #[inline]
2057 pub fn fadd_2<A, B>(&mut self, op0: A, op1: B)
2058 where Assembler<'a>: FaddEmitter_2<A, B> {
2059 <Self as FaddEmitter_2<A, B>>::fadd_2(self, op0, op1);
2060 }
2061 /// `FADDP` (FADDP).
2062 /// Adds the destination and source operands and stores the sum in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
2063 ///
2064 ///
2065 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FADD%3AFADDP%3AFIADD.html).
2066 ///
2067 /// Supported operand variants:
2068 ///
2069 /// ```text
2070 /// +---+----------+
2071 /// | # | Operands |
2072 /// +---+----------+
2073 /// | 1 | St, St |
2074 /// +---+----------+
2075 /// ```
2076 #[inline]
2077 pub fn faddp<A, B>(&mut self, op0: A, op1: B)
2078 where Assembler<'a>: FaddpEmitter<A, B> {
2079 <Self as FaddpEmitter<A, B>>::faddp(self, op0, op1);
2080 }
2081 /// `FBLD` (FBLD).
2082 /// Converts the BCD source operand into double extended-precision floating-point format and pushes the value onto the FPU stack. The source operand is loaded without rounding errors. The sign of the source operand is preserved, including that of −0.
2083 ///
2084 ///
2085 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FBLD.html).
2086 ///
2087 /// Supported operand variants:
2088 ///
2089 /// ```text
2090 /// +---+----------+
2091 /// | # | Operands |
2092 /// +---+----------+
2093 /// | 1 | Mem |
2094 /// +---+----------+
2095 /// ```
2096 #[inline]
2097 pub fn fbld<A>(&mut self, op0: A)
2098 where Assembler<'a>: FbldEmitter<A> {
2099 <Self as FbldEmitter<A>>::fbld(self, op0);
2100 }
2101 /// `FBSTP`.
2102 ///
2103 /// Supported operand variants:
2104 ///
2105 /// ```text
2106 /// +---+----------+
2107 /// | # | Operands |
2108 /// +---+----------+
2109 /// | 1 | Mem |
2110 /// +---+----------+
2111 /// ```
2112 #[inline]
2113 pub fn fbstp<A>(&mut self, op0: A)
2114 where Assembler<'a>: FbstpEmitter<A> {
2115 <Self as FbstpEmitter<A>>::fbstp(self, op0);
2116 }
2117 /// `FCHS`.
2118 ///
2119 /// Supported operand variants:
2120 ///
2121 /// ```text
2122 /// +---+----------+
2123 /// | # | Operands |
2124 /// +---+----------+
2125 /// | 1 | (none) |
2126 /// +---+----------+
2127 /// ```
2128 #[inline]
2129 pub fn fchs(&mut self)
2130 where Assembler<'a>: FchsEmitter {
2131 <Self as FchsEmitter>::fchs(self);
2132 }
2133 /// `FCLEX` (FCLEX).
2134 /// Clears the floating-point exception flags (PE, UE, OE, ZE, DE, and IE), the exception summary status flag (ES), the stack fault flag (SF), and the busy flag (B) in the FPU status word. The FCLEX instruction checks for and handles any pending unmasked floating-point exceptions before clearing the exception flags; the FNCLEX instruction does not.
2135 ///
2136 ///
2137 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FCLEX%3AFNCLEX.html).
2138 ///
2139 /// Supported operand variants:
2140 ///
2141 /// ```text
2142 /// +---+----------+
2143 /// | # | Operands |
2144 /// +---+----------+
2145 /// | 1 | (none) |
2146 /// +---+----------+
2147 /// ```
2148 #[inline]
2149 pub fn fclex(&mut self)
2150 where Assembler<'a>: FclexEmitter {
2151 <Self as FclexEmitter>::fclex(self);
2152 }
2153 /// `FCOM` (FCOM).
2154 /// Compares the contents of register ST(0) and source value and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). The source operand can be a data register or a memory location. If no source operand is given, the value in ST(0) is compared with the value in ST(1). The sign of zero is ignored, so that –0.0 is equal to +0.0.
2155 ///
2156 ///
2157 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FCOM%3AFCOMP%3AFCOMPP.html).
2158 ///
2159 /// Supported operand variants:
2160 ///
2161 /// ```text
2162 /// +---+----------+
2163 /// | # | Operands |
2164 /// +---+----------+
2165 /// | 1 | Mem |
2166 /// +---+----------+
2167 /// ```
2168 #[inline]
2169 pub fn fcom_1<A>(&mut self, op0: A)
2170 where Assembler<'a>: FcomEmitter_1<A> {
2171 <Self as FcomEmitter_1<A>>::fcom_1(self, op0);
2172 }
2173 /// `FCOM` (FCOM).
2174 /// Compares the contents of register ST(0) and source value and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). The source operand can be a data register or a memory location. If no source operand is given, the value in ST(0) is compared with the value in ST(1). The sign of zero is ignored, so that –0.0 is equal to +0.0.
2175 ///
2176 ///
2177 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FCOM%3AFCOMP%3AFCOMPP.html).
2178 ///
2179 /// Supported operand variants:
2180 ///
2181 /// ```text
2182 /// +---+----------+
2183 /// | # | Operands |
2184 /// +---+----------+
2185 /// | 1 | St, St |
2186 /// +---+----------+
2187 /// ```
2188 #[inline]
2189 pub fn fcom_2<A, B>(&mut self, op0: A, op1: B)
2190 where Assembler<'a>: FcomEmitter_2<A, B> {
2191 <Self as FcomEmitter_2<A, B>>::fcom_2(self, op0, op1);
2192 }
2193 /// `FCOMP` (FCOMP).
2194 /// Compares the contents of register ST(0) and source value and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). The source operand can be a data register or a memory location. If no source operand is given, the value in ST(0) is compared with the value in ST(1). The sign of zero is ignored, so that –0.0 is equal to +0.0.
2195 ///
2196 ///
2197 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FCOM%3AFCOMP%3AFCOMPP.html).
2198 ///
2199 /// Supported operand variants:
2200 ///
2201 /// ```text
2202 /// +---+----------+
2203 /// | # | Operands |
2204 /// +---+----------+
2205 /// | 1 | Mem |
2206 /// +---+----------+
2207 /// ```
2208 #[inline]
2209 pub fn fcomp_1<A>(&mut self, op0: A)
2210 where Assembler<'a>: FcompEmitter_1<A> {
2211 <Self as FcompEmitter_1<A>>::fcomp_1(self, op0);
2212 }
2213 /// `FCOMP` (FCOMP).
2214 /// Compares the contents of register ST(0) and source value and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). The source operand can be a data register or a memory location. If no source operand is given, the value in ST(0) is compared with the value in ST(1). The sign of zero is ignored, so that –0.0 is equal to +0.0.
2215 ///
2216 ///
2217 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FCOM%3AFCOMP%3AFCOMPP.html).
2218 ///
2219 /// Supported operand variants:
2220 ///
2221 /// ```text
2222 /// +---+----------+
2223 /// | # | Operands |
2224 /// +---+----------+
2225 /// | 1 | St, St |
2226 /// +---+----------+
2227 /// ```
2228 #[inline]
2229 pub fn fcomp_2<A, B>(&mut self, op0: A, op1: B)
2230 where Assembler<'a>: FcompEmitter_2<A, B> {
2231 <Self as FcompEmitter_2<A, B>>::fcomp_2(self, op0, op1);
2232 }
2233 /// `FCOMPP` (FCOMPP).
2234 /// Compares the contents of register ST(0) and source value and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). The source operand can be a data register or a memory location. If no source operand is given, the value in ST(0) is compared with the value in ST(1). The sign of zero is ignored, so that –0.0 is equal to +0.0.
2235 ///
2236 ///
2237 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FCOM%3AFCOMP%3AFCOMPP.html).
2238 ///
2239 /// Supported operand variants:
2240 ///
2241 /// ```text
2242 /// +---+----------+
2243 /// | # | Operands |
2244 /// +---+----------+
2245 /// | 1 | (none) |
2246 /// +---+----------+
2247 /// ```
2248 #[inline]
2249 pub fn fcompp(&mut self)
2250 where Assembler<'a>: FcomppEmitter {
2251 <Self as FcomppEmitter>::fcompp(self);
2252 }
2253 /// `FCOS`.
2254 ///
2255 /// Supported operand variants:
2256 ///
2257 /// ```text
2258 /// +---+----------+
2259 /// | # | Operands |
2260 /// +---+----------+
2261 /// | 1 | (none) |
2262 /// +---+----------+
2263 /// ```
2264 #[inline]
2265 pub fn fcos(&mut self)
2266 where Assembler<'a>: FcosEmitter {
2267 <Self as FcosEmitter>::fcos(self);
2268 }
2269 /// `FDECSTP`.
2270 ///
2271 /// Supported operand variants:
2272 ///
2273 /// ```text
2274 /// +---+----------+
2275 /// | # | Operands |
2276 /// +---+----------+
2277 /// | 1 | (none) |
2278 /// +---+----------+
2279 /// ```
2280 #[inline]
2281 pub fn fdecstp(&mut self)
2282 where Assembler<'a>: FdecstpEmitter {
2283 <Self as FdecstpEmitter>::fdecstp(self);
2284 }
2285 /// `FDIV` (FDIV).
2286 /// Divides the destination operand by the source operand and stores the result in the destination location. The destination operand (dividend) is always in an FPU register; the source operand (divisor) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
2287 ///
2288 ///
2289 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIV%3AFDIVP%3AFIDIV.html).
2290 ///
2291 /// Supported operand variants:
2292 ///
2293 /// ```text
2294 /// +---+----------+
2295 /// | # | Operands |
2296 /// +---+----------+
2297 /// | 1 | Mem |
2298 /// +---+----------+
2299 /// ```
2300 #[inline]
2301 pub fn fdiv_1<A>(&mut self, op0: A)
2302 where Assembler<'a>: FdivEmitter_1<A> {
2303 <Self as FdivEmitter_1<A>>::fdiv_1(self, op0);
2304 }
2305 /// `FDIV` (FDIV).
2306 /// Divides the destination operand by the source operand and stores the result in the destination location. The destination operand (dividend) is always in an FPU register; the source operand (divisor) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
2307 ///
2308 ///
2309 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIV%3AFDIVP%3AFIDIV.html).
2310 ///
2311 /// Supported operand variants:
2312 ///
2313 /// ```text
2314 /// +---+----------+
2315 /// | # | Operands |
2316 /// +---+----------+
2317 /// | 1 | St, St |
2318 /// +---+----------+
2319 /// ```
2320 #[inline]
2321 pub fn fdiv_2<A, B>(&mut self, op0: A, op1: B)
2322 where Assembler<'a>: FdivEmitter_2<A, B> {
2323 <Self as FdivEmitter_2<A, B>>::fdiv_2(self, op0, op1);
2324 }
2325 /// `FDIVP` (FDIVP).
2326 /// Divides the destination operand by the source operand and stores the result in the destination location. The destination operand (dividend) is always in an FPU register; the source operand (divisor) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
2327 ///
2328 ///
2329 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIV%3AFDIVP%3AFIDIV.html).
2330 ///
2331 /// Supported operand variants:
2332 ///
2333 /// ```text
2334 /// +---+----------+
2335 /// | # | Operands |
2336 /// +---+----------+
2337 /// | 1 | St, St |
2338 /// +---+----------+
2339 /// ```
2340 #[inline]
2341 pub fn fdivp<A, B>(&mut self, op0: A, op1: B)
2342 where Assembler<'a>: FdivpEmitter<A, B> {
2343 <Self as FdivpEmitter<A, B>>::fdivp(self, op0, op1);
2344 }
2345 /// `FDIVR` (FDIVR).
2346 /// Divides the source operand by the destination operand and stores the result in the destination location. The destination operand (divisor) is always in an FPU register; the source operand (dividend) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
2347 ///
2348 ///
2349 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIVR%3AFDIVRP%3AFIDIVR.html).
2350 ///
2351 /// Supported operand variants:
2352 ///
2353 /// ```text
2354 /// +---+----------+
2355 /// | # | Operands |
2356 /// +---+----------+
2357 /// | 1 | Mem |
2358 /// +---+----------+
2359 /// ```
2360 #[inline]
2361 pub fn fdivr_1<A>(&mut self, op0: A)
2362 where Assembler<'a>: FdivrEmitter_1<A> {
2363 <Self as FdivrEmitter_1<A>>::fdivr_1(self, op0);
2364 }
2365 /// `FDIVR` (FDIVR).
2366 /// Divides the source operand by the destination operand and stores the result in the destination location. The destination operand (divisor) is always in an FPU register; the source operand (dividend) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
2367 ///
2368 ///
2369 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIVR%3AFDIVRP%3AFIDIVR.html).
2370 ///
2371 /// Supported operand variants:
2372 ///
2373 /// ```text
2374 /// +---+----------+
2375 /// | # | Operands |
2376 /// +---+----------+
2377 /// | 1 | St, St |
2378 /// +---+----------+
2379 /// ```
2380 #[inline]
2381 pub fn fdivr_2<A, B>(&mut self, op0: A, op1: B)
2382 where Assembler<'a>: FdivrEmitter_2<A, B> {
2383 <Self as FdivrEmitter_2<A, B>>::fdivr_2(self, op0, op1);
2384 }
2385 /// `FDIVRP` (FDIVRP).
2386 /// Divides the source operand by the destination operand and stores the result in the destination location. The destination operand (divisor) is always in an FPU register; the source operand (dividend) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
2387 ///
2388 ///
2389 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIVR%3AFDIVRP%3AFIDIVR.html).
2390 ///
2391 /// Supported operand variants:
2392 ///
2393 /// ```text
2394 /// +---+----------+
2395 /// | # | Operands |
2396 /// +---+----------+
2397 /// | 1 | St, St |
2398 /// +---+----------+
2399 /// ```
2400 #[inline]
2401 pub fn fdivrp<A, B>(&mut self, op0: A, op1: B)
2402 where Assembler<'a>: FdivrpEmitter<A, B> {
2403 <Self as FdivrpEmitter<A, B>>::fdivrp(self, op0, op1);
2404 }
2405 /// `FFREE`.
2406 ///
2407 /// Supported operand variants:
2408 ///
2409 /// ```text
2410 /// +---+----------+
2411 /// | # | Operands |
2412 /// +---+----------+
2413 /// | 1 | St |
2414 /// +---+----------+
2415 /// ```
2416 #[inline]
2417 pub fn ffree<A>(&mut self, op0: A)
2418 where Assembler<'a>: FfreeEmitter<A> {
2419 <Self as FfreeEmitter<A>>::ffree(self, op0);
2420 }
2421 /// `FIADD` (FIADD).
2422 /// Adds the destination and source operands and stores the sum in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
2423 ///
2424 ///
2425 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FADD%3AFADDP%3AFIADD.html).
2426 ///
2427 /// Supported operand variants:
2428 ///
2429 /// ```text
2430 /// +---+----------+
2431 /// | # | Operands |
2432 /// +---+----------+
2433 /// | 1 | Mem |
2434 /// +---+----------+
2435 /// ```
2436 #[inline]
2437 pub fn fiadd<A>(&mut self, op0: A)
2438 where Assembler<'a>: FiaddEmitter<A> {
2439 <Self as FiaddEmitter<A>>::fiadd(self, op0);
2440 }
2441 /// `FICOM` (FICOM).
2442 /// Compares the value in ST(0) with an integer source operand and sets the condition code flags C0, C2, and C3 in the FPU status word according to the results (see table below). The integer value is converted to double extended-precision floating-point format before the comparison is made.
2443 ///
2444 ///
2445 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FICOM%3AFICOMP.html).
2446 ///
2447 /// Supported operand variants:
2448 ///
2449 /// ```text
2450 /// +---+----------+
2451 /// | # | Operands |
2452 /// +---+----------+
2453 /// | 1 | Mem |
2454 /// +---+----------+
2455 /// ```
2456 #[inline]
2457 pub fn ficom<A>(&mut self, op0: A)
2458 where Assembler<'a>: FicomEmitter<A> {
2459 <Self as FicomEmitter<A>>::ficom(self, op0);
2460 }
2461 /// `FICOMP` (FICOMP).
2462 /// Compares the value in ST(0) with an integer source operand and sets the condition code flags C0, C2, and C3 in the FPU status word according to the results (see table below). The integer value is converted to double extended-precision floating-point format before the comparison is made.
2463 ///
2464 ///
2465 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FICOM%3AFICOMP.html).
2466 ///
2467 /// Supported operand variants:
2468 ///
2469 /// ```text
2470 /// +---+----------+
2471 /// | # | Operands |
2472 /// +---+----------+
2473 /// | 1 | Mem |
2474 /// +---+----------+
2475 /// ```
2476 #[inline]
2477 pub fn ficomp<A>(&mut self, op0: A)
2478 where Assembler<'a>: FicompEmitter<A> {
2479 <Self as FicompEmitter<A>>::ficomp(self, op0);
2480 }
2481 /// `FIDIV` (FIDIV).
2482 /// Divides the destination operand by the source operand and stores the result in the destination location. The destination operand (dividend) is always in an FPU register; the source operand (divisor) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
2483 ///
2484 ///
2485 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIV%3AFDIVP%3AFIDIV.html).
2486 ///
2487 /// Supported operand variants:
2488 ///
2489 /// ```text
2490 /// +---+----------+
2491 /// | # | Operands |
2492 /// +---+----------+
2493 /// | 1 | Mem |
2494 /// +---+----------+
2495 /// ```
2496 #[inline]
2497 pub fn fidiv<A>(&mut self, op0: A)
2498 where Assembler<'a>: FidivEmitter<A> {
2499 <Self as FidivEmitter<A>>::fidiv(self, op0);
2500 }
2501 /// `FIDIVR` (FIDIVR).
2502 /// Divides the source operand by the destination operand and stores the result in the destination location. The destination operand (divisor) is always in an FPU register; the source operand (dividend) can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format, word or doubleword integer format.
2503 ///
2504 ///
2505 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FDIVR%3AFDIVRP%3AFIDIVR.html).
2506 ///
2507 /// Supported operand variants:
2508 ///
2509 /// ```text
2510 /// +---+----------+
2511 /// | # | Operands |
2512 /// +---+----------+
2513 /// | 1 | Mem |
2514 /// +---+----------+
2515 /// ```
2516 #[inline]
2517 pub fn fidivr<A>(&mut self, op0: A)
2518 where Assembler<'a>: FidivrEmitter<A> {
2519 <Self as FidivrEmitter<A>>::fidivr(self, op0);
2520 }
2521 /// `FILD` (FILD).
2522 /// Converts the signed-integer source operand into double extended-precision floating-point format and pushes the value onto the FPU register stack. The source operand can be a word, doubleword, or quadword integer. It is loaded without rounding errors. The sign of the source operand is preserved.
2523 ///
2524 ///
2525 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FILD.html).
2526 ///
2527 /// Supported operand variants:
2528 ///
2529 /// ```text
2530 /// +---+----------+
2531 /// | # | Operands |
2532 /// +---+----------+
2533 /// | 1 | Mem |
2534 /// +---+----------+
2535 /// ```
2536 #[inline]
2537 pub fn fild<A>(&mut self, op0: A)
2538 where Assembler<'a>: FildEmitter<A> {
2539 <Self as FildEmitter<A>>::fild(self, op0);
2540 }
2541 /// `FIMUL` (FIMUL).
2542 /// Multiplies the destination and source operands and stores the product in the destination location. The destination operand is always an FPU data register; the source operand can be an FPU data register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
2543 ///
2544 ///
2545 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FMUL%3AFMULP%3AFIMUL.html).
2546 ///
2547 /// Supported operand variants:
2548 ///
2549 /// ```text
2550 /// +---+----------+
2551 /// | # | Operands |
2552 /// +---+----------+
2553 /// | 1 | Mem |
2554 /// +---+----------+
2555 /// ```
2556 #[inline]
2557 pub fn fimul<A>(&mut self, op0: A)
2558 where Assembler<'a>: FimulEmitter<A> {
2559 <Self as FimulEmitter<A>>::fimul(self, op0);
2560 }
2561 /// `FINCSTP`.
2562 ///
2563 /// Supported operand variants:
2564 ///
2565 /// ```text
2566 /// +---+----------+
2567 /// | # | Operands |
2568 /// +---+----------+
2569 /// | 1 | (none) |
2570 /// +---+----------+
2571 /// ```
2572 #[inline]
2573 pub fn fincstp(&mut self)
2574 where Assembler<'a>: FincstpEmitter {
2575 <Self as FincstpEmitter>::fincstp(self);
2576 }
2577 /// `FINIT` (FINIT).
2578 /// Sets the FPU control, status, tag, instruction pointer, and data pointer registers to their default states. The FPU control word is set to 037FH (round to nearest, all exceptions masked, 64-bit precision). The status word is cleared (no exception flags set, TOP is set to 0). The data registers in the register stack are left unchanged, but they are all tagged as empty (11B). Both the instruction and data pointers are cleared.
2579 ///
2580 ///
2581 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FINIT%3AFNINIT.html).
2582 ///
2583 /// Supported operand variants:
2584 ///
2585 /// ```text
2586 /// +---+----------+
2587 /// | # | Operands |
2588 /// +---+----------+
2589 /// | 1 | (none) |
2590 /// +---+----------+
2591 /// ```
2592 #[inline]
2593 pub fn finit(&mut self)
2594 where Assembler<'a>: FinitEmitter {
2595 <Self as FinitEmitter>::finit(self);
2596 }
2597 /// `FIST` (FIST).
2598 /// The FIST instruction converts the value in the ST(0) register to a signed integer and stores the result in the destination operand. Values can be stored in word or doubleword integer format. The destination operand specifies the address where the first byte of the destination value is to be stored.
2599 ///
2600 ///
2601 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FIST%3AFISTP.html).
2602 ///
2603 /// Supported operand variants:
2604 ///
2605 /// ```text
2606 /// +---+----------+
2607 /// | # | Operands |
2608 /// +---+----------+
2609 /// | 1 | Mem |
2610 /// +---+----------+
2611 /// ```
2612 #[inline]
2613 pub fn fist<A>(&mut self, op0: A)
2614 where Assembler<'a>: FistEmitter<A> {
2615 <Self as FistEmitter<A>>::fist(self, op0);
2616 }
2617 /// `FISTP` (FISTP).
2618 /// The FIST instruction converts the value in the ST(0) register to a signed integer and stores the result in the destination operand. Values can be stored in word or doubleword integer format. The destination operand specifies the address where the first byte of the destination value is to be stored.
2619 ///
2620 ///
2621 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FIST%3AFISTP.html).
2622 ///
2623 /// Supported operand variants:
2624 ///
2625 /// ```text
2626 /// +---+----------+
2627 /// | # | Operands |
2628 /// +---+----------+
2629 /// | 1 | Mem |
2630 /// +---+----------+
2631 /// ```
2632 #[inline]
2633 pub fn fistp<A>(&mut self, op0: A)
2634 where Assembler<'a>: FistpEmitter<A> {
2635 <Self as FistpEmitter<A>>::fistp(self, op0);
2636 }
2637 /// `FISUB` (FISUB).
2638 /// Subtracts the source operand from the destination operand and stores the difference in the destination location. The destination operand is always an FPU data register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
2639 ///
2640 ///
2641 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUB%3AFSUBP%3AFISUB.html).
2642 ///
2643 /// Supported operand variants:
2644 ///
2645 /// ```text
2646 /// +---+----------+
2647 /// | # | Operands |
2648 /// +---+----------+
2649 /// | 1 | Mem |
2650 /// +---+----------+
2651 /// ```
2652 #[inline]
2653 pub fn fisub<A>(&mut self, op0: A)
2654 where Assembler<'a>: FisubEmitter<A> {
2655 <Self as FisubEmitter<A>>::fisub(self, op0);
2656 }
2657 /// `FISUBR` (FISUBR).
2658 /// Subtracts the destination operand from the source operand and stores the difference in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
2659 ///
2660 ///
2661 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUBR%3AFSUBRP%3AFISUBR.html).
2662 ///
2663 /// Supported operand variants:
2664 ///
2665 /// ```text
2666 /// +---+----------+
2667 /// | # | Operands |
2668 /// +---+----------+
2669 /// | 1 | Mem |
2670 /// +---+----------+
2671 /// ```
2672 #[inline]
2673 pub fn fisubr<A>(&mut self, op0: A)
2674 where Assembler<'a>: FisubrEmitter<A> {
2675 <Self as FisubrEmitter<A>>::fisubr(self, op0);
2676 }
2677 /// `FLD` (FLD).
2678 /// Pushes the source operand onto the FPU register stack. The source operand can be in single precision, double precision, or double extended-precision floating-point format. If the source operand is in single precision or double precision floating-point format, it is automatically converted to the double extended-precision floating-point format before being pushed on the stack.
2679 ///
2680 ///
2681 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD.html).
2682 ///
2683 /// Supported operand variants:
2684 ///
2685 /// ```text
2686 /// +---+----------+
2687 /// | # | Operands |
2688 /// +---+----------+
2689 /// | 1 | Mem |
2690 /// | 2 | St |
2691 /// +---+----------+
2692 /// ```
2693 #[inline]
2694 pub fn fld<A>(&mut self, op0: A)
2695 where Assembler<'a>: FldEmitter<A> {
2696 <Self as FldEmitter<A>>::fld(self, op0);
2697 }
2698 /// `FLD1` (FLD1).
2699 /// Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log210, log2e, π, log102, and loge2. For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.
2700 ///
2701 ///
2702 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD1%3AFLDL2T%3AFLDL2E%3AFLDPI%3AFLDLG2%3AFLDLN2%3AFLDZ.html).
2703 ///
2704 /// Supported operand variants:
2705 ///
2706 /// ```text
2707 /// +---+----------+
2708 /// | # | Operands |
2709 /// +---+----------+
2710 /// | 1 | (none) |
2711 /// +---+----------+
2712 /// ```
2713 #[inline]
2714 pub fn fld1(&mut self)
2715 where Assembler<'a>: Fld1Emitter {
2716 <Self as Fld1Emitter>::fld1(self);
2717 }
2718 /// `FLDCW`.
2719 ///
2720 /// Supported operand variants:
2721 ///
2722 /// ```text
2723 /// +---+----------+
2724 /// | # | Operands |
2725 /// +---+----------+
2726 /// | 1 | Mem |
2727 /// +---+----------+
2728 /// ```
2729 #[inline]
2730 pub fn fldcw<A>(&mut self, op0: A)
2731 where Assembler<'a>: FldcwEmitter<A> {
2732 <Self as FldcwEmitter<A>>::fldcw(self, op0);
2733 }
2734 /// `FLDENV`.
2735 ///
2736 /// Supported operand variants:
2737 ///
2738 /// ```text
2739 /// +---+----------+
2740 /// | # | Operands |
2741 /// +---+----------+
2742 /// | 1 | Mem |
2743 /// +---+----------+
2744 /// ```
2745 #[inline]
2746 pub fn fldenv<A>(&mut self, op0: A)
2747 where Assembler<'a>: FldenvEmitter<A> {
2748 <Self as FldenvEmitter<A>>::fldenv(self, op0);
2749 }
2750 /// `FLDL2E` (FLDL2E).
2751 /// Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log210, log2e, π, log102, and loge2. For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.
2752 ///
2753 ///
2754 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD1%3AFLDL2T%3AFLDL2E%3AFLDPI%3AFLDLG2%3AFLDLN2%3AFLDZ.html).
2755 ///
2756 /// Supported operand variants:
2757 ///
2758 /// ```text
2759 /// +---+----------+
2760 /// | # | Operands |
2761 /// +---+----------+
2762 /// | 1 | (none) |
2763 /// +---+----------+
2764 /// ```
2765 #[inline]
2766 pub fn fldl2e(&mut self)
2767 where Assembler<'a>: Fldl2eEmitter {
2768 <Self as Fldl2eEmitter>::fldl2e(self);
2769 }
2770 /// `FLDL2T` (FLDL2T).
2771 /// Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log210, log2e, π, log102, and loge2. For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.
2772 ///
2773 ///
2774 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD1%3AFLDL2T%3AFLDL2E%3AFLDPI%3AFLDLG2%3AFLDLN2%3AFLDZ.html).
2775 ///
2776 /// Supported operand variants:
2777 ///
2778 /// ```text
2779 /// +---+----------+
2780 /// | # | Operands |
2781 /// +---+----------+
2782 /// | 1 | (none) |
2783 /// +---+----------+
2784 /// ```
2785 #[inline]
2786 pub fn fldl2t(&mut self)
2787 where Assembler<'a>: Fldl2tEmitter {
2788 <Self as Fldl2tEmitter>::fldl2t(self);
2789 }
2790 /// `FLDLG2` (FLDLG2).
2791 /// Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log210, log2e, π, log102, and loge2. For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.
2792 ///
2793 ///
2794 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD1%3AFLDL2T%3AFLDL2E%3AFLDPI%3AFLDLG2%3AFLDLN2%3AFLDZ.html).
2795 ///
2796 /// Supported operand variants:
2797 ///
2798 /// ```text
2799 /// +---+----------+
2800 /// | # | Operands |
2801 /// +---+----------+
2802 /// | 1 | (none) |
2803 /// +---+----------+
2804 /// ```
2805 #[inline]
2806 pub fn fldlg2(&mut self)
2807 where Assembler<'a>: Fldlg2Emitter {
2808 <Self as Fldlg2Emitter>::fldlg2(self);
2809 }
2810 /// `FLDLN2` (FLDLN2).
2811 /// Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log210, log2e, π, log102, and loge2. For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.
2812 ///
2813 ///
2814 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD1%3AFLDL2T%3AFLDL2E%3AFLDPI%3AFLDLG2%3AFLDLN2%3AFLDZ.html).
2815 ///
2816 /// Supported operand variants:
2817 ///
2818 /// ```text
2819 /// +---+----------+
2820 /// | # | Operands |
2821 /// +---+----------+
2822 /// | 1 | (none) |
2823 /// +---+----------+
2824 /// ```
2825 #[inline]
2826 pub fn fldln2(&mut self)
2827 where Assembler<'a>: Fldln2Emitter {
2828 <Self as Fldln2Emitter>::fldln2(self);
2829 }
2830 /// `FLDPI` (FLDPI).
2831 /// Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log210, log2e, π, log102, and loge2. For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.
2832 ///
2833 ///
2834 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD1%3AFLDL2T%3AFLDL2E%3AFLDPI%3AFLDLG2%3AFLDLN2%3AFLDZ.html).
2835 ///
2836 /// Supported operand variants:
2837 ///
2838 /// ```text
2839 /// +---+----------+
2840 /// | # | Operands |
2841 /// +---+----------+
2842 /// | 1 | (none) |
2843 /// +---+----------+
2844 /// ```
2845 #[inline]
2846 pub fn fldpi(&mut self)
2847 where Assembler<'a>: FldpiEmitter {
2848 <Self as FldpiEmitter>::fldpi(self);
2849 }
2850 /// `FLDZ` (FLDZ).
2851 /// Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log210, log2e, π, log102, and loge2. For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.
2852 ///
2853 ///
2854 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FLD1%3AFLDL2T%3AFLDL2E%3AFLDPI%3AFLDLG2%3AFLDLN2%3AFLDZ.html).
2855 ///
2856 /// Supported operand variants:
2857 ///
2858 /// ```text
2859 /// +---+----------+
2860 /// | # | Operands |
2861 /// +---+----------+
2862 /// | 1 | (none) |
2863 /// +---+----------+
2864 /// ```
2865 #[inline]
2866 pub fn fldz(&mut self)
2867 where Assembler<'a>: FldzEmitter {
2868 <Self as FldzEmitter>::fldz(self);
2869 }
2870 /// `FMUL` (FMUL).
2871 /// Multiplies the destination and source operands and stores the product in the destination location. The destination operand is always an FPU data register; the source operand can be an FPU data register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
2872 ///
2873 ///
2874 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FMUL%3AFMULP%3AFIMUL.html).
2875 ///
2876 /// Supported operand variants:
2877 ///
2878 /// ```text
2879 /// +---+----------+
2880 /// | # | Operands |
2881 /// +---+----------+
2882 /// | 1 | Mem |
2883 /// +---+----------+
2884 /// ```
2885 #[inline]
2886 pub fn fmul_1<A>(&mut self, op0: A)
2887 where Assembler<'a>: FmulEmitter_1<A> {
2888 <Self as FmulEmitter_1<A>>::fmul_1(self, op0);
2889 }
2890 /// `FMUL` (FMUL).
2891 /// Multiplies the destination and source operands and stores the product in the destination location. The destination operand is always an FPU data register; the source operand can be an FPU data register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
2892 ///
2893 ///
2894 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FMUL%3AFMULP%3AFIMUL.html).
2895 ///
2896 /// Supported operand variants:
2897 ///
2898 /// ```text
2899 /// +---+----------+
2900 /// | # | Operands |
2901 /// +---+----------+
2902 /// | 1 | St, St |
2903 /// +---+----------+
2904 /// ```
2905 #[inline]
2906 pub fn fmul_2<A, B>(&mut self, op0: A, op1: B)
2907 where Assembler<'a>: FmulEmitter_2<A, B> {
2908 <Self as FmulEmitter_2<A, B>>::fmul_2(self, op0, op1);
2909 }
2910 /// `FMULP` (FMULP).
2911 /// Multiplies the destination and source operands and stores the product in the destination location. The destination operand is always an FPU data register; the source operand can be an FPU data register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
2912 ///
2913 ///
2914 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FMUL%3AFMULP%3AFIMUL.html).
2915 ///
2916 /// Supported operand variants:
2917 ///
2918 /// ```text
2919 /// +---+----------+
2920 /// | # | Operands |
2921 /// +---+----------+
2922 /// | 1 | St, St |
2923 /// +---+----------+
2924 /// ```
2925 #[inline]
2926 pub fn fmulp<A, B>(&mut self, op0: A, op1: B)
2927 where Assembler<'a>: FmulpEmitter<A, B> {
2928 <Self as FmulpEmitter<A, B>>::fmulp(self, op0, op1);
2929 }
2930 /// `FNOP`.
2931 ///
2932 /// Supported operand variants:
2933 ///
2934 /// ```text
2935 /// +---+----------+
2936 /// | # | Operands |
2937 /// +---+----------+
2938 /// | 1 | (none) |
2939 /// +---+----------+
2940 /// ```
2941 #[inline]
2942 pub fn fnop(&mut self)
2943 where Assembler<'a>: FnopEmitter {
2944 <Self as FnopEmitter>::fnop(self);
2945 }
2946 /// `FPATAN`.
2947 ///
2948 /// Supported operand variants:
2949 ///
2950 /// ```text
2951 /// +---+----------+
2952 /// | # | Operands |
2953 /// +---+----------+
2954 /// | 1 | (none) |
2955 /// +---+----------+
2956 /// ```
2957 #[inline]
2958 pub fn fpatan(&mut self)
2959 where Assembler<'a>: FpatanEmitter {
2960 <Self as FpatanEmitter>::fpatan(self);
2961 }
2962 /// `FPREM` (FPREM).
2963 /// Computes the remainder obtained from dividing the value in the ST(0) register (the dividend) by the value in the ST(1) register (the divisor or modulus), and stores the result in ST(0). The remainder represents the following value
2964 ///
2965 ///
2966 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FPREM.html).
2967 ///
2968 /// Supported operand variants:
2969 ///
2970 /// ```text
2971 /// +---+----------+
2972 /// | # | Operands |
2973 /// +---+----------+
2974 /// | 1 | (none) |
2975 /// +---+----------+
2976 /// ```
2977 #[inline]
2978 pub fn fprem(&mut self)
2979 where Assembler<'a>: FpremEmitter {
2980 <Self as FpremEmitter>::fprem(self);
2981 }
2982 /// `FPREM1` (FPREM1).
2983 /// Computes the IEEE remainder obtained from dividing the value in the ST(0) register (the dividend) by the value in the ST(1) register (the divisor or modulus), and stores the result in ST(0). The remainder represents the following value
2984 ///
2985 ///
2986 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FPREM1.html).
2987 ///
2988 /// Supported operand variants:
2989 ///
2990 /// ```text
2991 /// +---+----------+
2992 /// | # | Operands |
2993 /// +---+----------+
2994 /// | 1 | (none) |
2995 /// +---+----------+
2996 /// ```
2997 #[inline]
2998 pub fn fprem1(&mut self)
2999 where Assembler<'a>: Fprem1Emitter {
3000 <Self as Fprem1Emitter>::fprem1(self);
3001 }
3002 /// `FPTAN` (FPTAN).
3003 /// Computes the approximate tangent of the source operand in register ST(0), stores the result in ST(0), and pushes a 1.0 onto the FPU register stack. The source operand must be given in radians and must be less than ±263. The following table shows the unmasked results obtained when computing the partial tangent of various classes of numbers, assuming that underflow does not occur.
3004 ///
3005 ///
3006 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FPTAN.html).
3007 ///
3008 /// Supported operand variants:
3009 ///
3010 /// ```text
3011 /// +---+----------+
3012 /// | # | Operands |
3013 /// +---+----------+
3014 /// | 1 | (none) |
3015 /// +---+----------+
3016 /// ```
3017 #[inline]
3018 pub fn fptan(&mut self)
3019 where Assembler<'a>: FptanEmitter {
3020 <Self as FptanEmitter>::fptan(self);
3021 }
3022 /// `FRNDINT`.
3023 ///
3024 /// Supported operand variants:
3025 ///
3026 /// ```text
3027 /// +---+----------+
3028 /// | # | Operands |
3029 /// +---+----------+
3030 /// | 1 | (none) |
3031 /// +---+----------+
3032 /// ```
3033 #[inline]
3034 pub fn frndint(&mut self)
3035 where Assembler<'a>: FrndintEmitter {
3036 <Self as FrndintEmitter>::frndint(self);
3037 }
3038 /// `FRSTOR`.
3039 ///
3040 /// Supported operand variants:
3041 ///
3042 /// ```text
3043 /// +---+----------+
3044 /// | # | Operands |
3045 /// +---+----------+
3046 /// | 1 | Mem |
3047 /// +---+----------+
3048 /// ```
3049 #[inline]
3050 pub fn frstor<A>(&mut self, op0: A)
3051 where Assembler<'a>: FrstorEmitter<A> {
3052 <Self as FrstorEmitter<A>>::frstor(self, op0);
3053 }
3054 /// `FSAVE` (FSAVE).
3055 /// Stores the current FPU state (operating environment and register stack) at the specified destination in memory, and then re-initializes the FPU. The FSAVE instruction checks for and handles pending unmasked floating-point exceptions before storing the FPU state; the FNSAVE instruction does not.
3056 ///
3057 ///
3058 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSAVE%3AFNSAVE.html).
3059 ///
3060 /// Supported operand variants:
3061 ///
3062 /// ```text
3063 /// +---+----------+
3064 /// | # | Operands |
3065 /// +---+----------+
3066 /// | 1 | Mem |
3067 /// +---+----------+
3068 /// ```
3069 #[inline]
3070 pub fn fsave<A>(&mut self, op0: A)
3071 where Assembler<'a>: FsaveEmitter<A> {
3072 <Self as FsaveEmitter<A>>::fsave(self, op0);
3073 }
3074 /// `FSCALE`.
3075 ///
3076 /// Supported operand variants:
3077 ///
3078 /// ```text
3079 /// +---+----------+
3080 /// | # | Operands |
3081 /// +---+----------+
3082 /// | 1 | (none) |
3083 /// +---+----------+
3084 /// ```
3085 #[inline]
3086 pub fn fscale(&mut self)
3087 where Assembler<'a>: FscaleEmitter {
3088 <Self as FscaleEmitter>::fscale(self);
3089 }
3090 /// `FSIN`.
3091 ///
3092 /// Supported operand variants:
3093 ///
3094 /// ```text
3095 /// +---+----------+
3096 /// | # | Operands |
3097 /// +---+----------+
3098 /// | 1 | (none) |
3099 /// +---+----------+
3100 /// ```
3101 #[inline]
3102 pub fn fsin(&mut self)
3103 where Assembler<'a>: FsinEmitter {
3104 <Self as FsinEmitter>::fsin(self);
3105 }
3106 /// `FSINCOS` (FSINCOS).
3107 /// Computes both the approximate sine and the cosine of the source operand in register ST(0), stores the sine in ST(0), and pushes the cosine onto the top of the FPU register stack. (This instruction is faster than executing the FSIN and FCOS instructions in succession.)
3108 ///
3109 ///
3110 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSINCOS.html).
3111 ///
3112 /// Supported operand variants:
3113 ///
3114 /// ```text
3115 /// +---+----------+
3116 /// | # | Operands |
3117 /// +---+----------+
3118 /// | 1 | (none) |
3119 /// +---+----------+
3120 /// ```
3121 #[inline]
3122 pub fn fsincos(&mut self)
3123 where Assembler<'a>: FsincosEmitter {
3124 <Self as FsincosEmitter>::fsincos(self);
3125 }
3126 /// `FSQRT`.
3127 ///
3128 /// Supported operand variants:
3129 ///
3130 /// ```text
3131 /// +---+----------+
3132 /// | # | Operands |
3133 /// +---+----------+
3134 /// | 1 | (none) |
3135 /// +---+----------+
3136 /// ```
3137 #[inline]
3138 pub fn fsqrt(&mut self)
3139 where Assembler<'a>: FsqrtEmitter {
3140 <Self as FsqrtEmitter>::fsqrt(self);
3141 }
3142 /// `FST` (FST).
3143 /// The FST instruction copies the value in the ST(0) register to the destination operand, which can be a memory location or another register in the FPU register stack. When storing the value in memory, the value is converted to single precision or double precision floating-point format.
3144 ///
3145 ///
3146 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FST%3AFSTP.html).
3147 ///
3148 /// Supported operand variants:
3149 ///
3150 /// ```text
3151 /// +---+----------+
3152 /// | # | Operands |
3153 /// +---+----------+
3154 /// | 1 | Mem |
3155 /// | 2 | St |
3156 /// +---+----------+
3157 /// ```
3158 #[inline]
3159 pub fn fst<A>(&mut self, op0: A)
3160 where Assembler<'a>: FstEmitter<A> {
3161 <Self as FstEmitter<A>>::fst(self, op0);
3162 }
3163 /// `FSTCW` (FSTCW).
3164 /// Stores the current value of the FPU control word at the specified destination in memory. The FSTCW instruction checks for and handles pending unmasked floating-point exceptions before storing the control word; the FNSTCW instruction does not.
3165 ///
3166 ///
3167 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSTCW%3AFNSTCW.html).
3168 ///
3169 /// Supported operand variants:
3170 ///
3171 /// ```text
3172 /// +---+----------+
3173 /// | # | Operands |
3174 /// +---+----------+
3175 /// | 1 | Mem |
3176 /// +---+----------+
3177 /// ```
3178 #[inline]
3179 pub fn fstcw<A>(&mut self, op0: A)
3180 where Assembler<'a>: FstcwEmitter<A> {
3181 <Self as FstcwEmitter<A>>::fstcw(self, op0);
3182 }
3183 /// `FSTENV` (FSTENV).
3184 /// Saves the current FPU operating environment at the memory location specified with the destination operand, and then masks all floating-point exceptions. The FPU operating environment consists of the FPU control word, status word, tag word, instruction pointer, data pointer, and last opcode. Figures 8-9 through 8-12 in the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1, show the layout in memory of the stored environment, depending on the operating mode of the processor (protected or real) and the current operand-size attribute (16-bit or 32-bit). In virtual-8086 mode, the real mode layouts are used.
3185 ///
3186 ///
3187 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSTENV%3AFNSTENV.html).
3188 ///
3189 /// Supported operand variants:
3190 ///
3191 /// ```text
3192 /// +---+----------+
3193 /// | # | Operands |
3194 /// +---+----------+
3195 /// | 1 | Mem |
3196 /// +---+----------+
3197 /// ```
3198 #[inline]
3199 pub fn fstenv<A>(&mut self, op0: A)
3200 where Assembler<'a>: FstenvEmitter<A> {
3201 <Self as FstenvEmitter<A>>::fstenv(self, op0);
3202 }
3203 /// `FSTP` (FSTP).
3204 /// The FST instruction copies the value in the ST(0) register to the destination operand, which can be a memory location or another register in the FPU register stack. When storing the value in memory, the value is converted to single precision or double precision floating-point format.
3205 ///
3206 ///
3207 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FST%3AFSTP.html).
3208 ///
3209 /// Supported operand variants:
3210 ///
3211 /// ```text
3212 /// +---+----------+
3213 /// | # | Operands |
3214 /// +---+----------+
3215 /// | 1 | Mem |
3216 /// | 2 | St |
3217 /// +---+----------+
3218 /// ```
3219 #[inline]
3220 pub fn fstp<A>(&mut self, op0: A)
3221 where Assembler<'a>: FstpEmitter<A> {
3222 <Self as FstpEmitter<A>>::fstp(self, op0);
3223 }
3224 /// `FSTSW` (FSTSW).
3225 /// Stores the current value of the x87 FPU status word in the destination location. The destination operand can be either a two-byte memory location or the AX register. The FSTSW instruction checks for and handles pending unmasked floating-point exceptions before storing the status word; the FNSTSW instruction does not.
3226 ///
3227 ///
3228 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSTSW%3AFNSTSW.html).
3229 ///
3230 /// Supported operand variants:
3231 ///
3232 /// ```text
3233 /// +---+----------+
3234 /// | # | Operands |
3235 /// +---+----------+
3236 /// | 1 | Gpd |
3237 /// | 2 | Mem |
3238 /// +---+----------+
3239 /// ```
3240 #[inline]
3241 pub fn fstsw<A>(&mut self, op0: A)
3242 where Assembler<'a>: FstswEmitter<A> {
3243 <Self as FstswEmitter<A>>::fstsw(self, op0);
3244 }
3245 /// `FSUB` (FSUB).
3246 /// Subtracts the source operand from the destination operand and stores the difference in the destination location. The destination operand is always an FPU data register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
3247 ///
3248 ///
3249 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUB%3AFSUBP%3AFISUB.html).
3250 ///
3251 /// Supported operand variants:
3252 ///
3253 /// ```text
3254 /// +---+----------+
3255 /// | # | Operands |
3256 /// +---+----------+
3257 /// | 1 | Mem |
3258 /// +---+----------+
3259 /// ```
3260 #[inline]
3261 pub fn fsub_1<A>(&mut self, op0: A)
3262 where Assembler<'a>: FsubEmitter_1<A> {
3263 <Self as FsubEmitter_1<A>>::fsub_1(self, op0);
3264 }
3265 /// `FSUB` (FSUB).
3266 /// Subtracts the source operand from the destination operand and stores the difference in the destination location. The destination operand is always an FPU data register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
3267 ///
3268 ///
3269 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUB%3AFSUBP%3AFISUB.html).
3270 ///
3271 /// Supported operand variants:
3272 ///
3273 /// ```text
3274 /// +---+----------+
3275 /// | # | Operands |
3276 /// +---+----------+
3277 /// | 1 | St, St |
3278 /// +---+----------+
3279 /// ```
3280 #[inline]
3281 pub fn fsub_2<A, B>(&mut self, op0: A, op1: B)
3282 where Assembler<'a>: FsubEmitter_2<A, B> {
3283 <Self as FsubEmitter_2<A, B>>::fsub_2(self, op0, op1);
3284 }
3285 /// `FSUBP` (FSUBP).
3286 /// Subtracts the source operand from the destination operand and stores the difference in the destination location. The destination operand is always an FPU data register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
3287 ///
3288 ///
3289 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUB%3AFSUBP%3AFISUB.html).
3290 ///
3291 /// Supported operand variants:
3292 ///
3293 /// ```text
3294 /// +---+----------+
3295 /// | # | Operands |
3296 /// +---+----------+
3297 /// | 1 | St, St |
3298 /// +---+----------+
3299 /// ```
3300 #[inline]
3301 pub fn fsubp<A, B>(&mut self, op0: A, op1: B)
3302 where Assembler<'a>: FsubpEmitter<A, B> {
3303 <Self as FsubpEmitter<A, B>>::fsubp(self, op0, op1);
3304 }
3305 /// `FSUBR` (FSUBR).
3306 /// Subtracts the destination operand from the source operand and stores the difference in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
3307 ///
3308 ///
3309 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUBR%3AFSUBRP%3AFISUBR.html).
3310 ///
3311 /// Supported operand variants:
3312 ///
3313 /// ```text
3314 /// +---+----------+
3315 /// | # | Operands |
3316 /// +---+----------+
3317 /// | 1 | Mem |
3318 /// +---+----------+
3319 /// ```
3320 #[inline]
3321 pub fn fsubr_1<A>(&mut self, op0: A)
3322 where Assembler<'a>: FsubrEmitter_1<A> {
3323 <Self as FsubrEmitter_1<A>>::fsubr_1(self, op0);
3324 }
3325 /// `FSUBR` (FSUBR).
3326 /// Subtracts the destination operand from the source operand and stores the difference in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
3327 ///
3328 ///
3329 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUBR%3AFSUBRP%3AFISUBR.html).
3330 ///
3331 /// Supported operand variants:
3332 ///
3333 /// ```text
3334 /// +---+----------+
3335 /// | # | Operands |
3336 /// +---+----------+
3337 /// | 1 | St, St |
3338 /// +---+----------+
3339 /// ```
3340 #[inline]
3341 pub fn fsubr_2<A, B>(&mut self, op0: A, op1: B)
3342 where Assembler<'a>: FsubrEmitter_2<A, B> {
3343 <Self as FsubrEmitter_2<A, B>>::fsubr_2(self, op0, op1);
3344 }
3345 /// `FSUBRP` (FSUBRP).
3346 /// Subtracts the destination operand from the source operand and stores the difference in the destination location. The destination operand is always an FPU register; the source operand can be a register or a memory location. Source operands in memory can be in single precision or double precision floating-point format or in word or doubleword integer format.
3347 ///
3348 ///
3349 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FSUBR%3AFSUBRP%3AFISUBR.html).
3350 ///
3351 /// Supported operand variants:
3352 ///
3353 /// ```text
3354 /// +---+----------+
3355 /// | # | Operands |
3356 /// +---+----------+
3357 /// | 1 | St, St |
3358 /// +---+----------+
3359 /// ```
3360 #[inline]
3361 pub fn fsubrp<A, B>(&mut self, op0: A, op1: B)
3362 where Assembler<'a>: FsubrpEmitter<A, B> {
3363 <Self as FsubrpEmitter<A, B>>::fsubrp(self, op0, op1);
3364 }
3365 /// `FTST`.
3366 ///
3367 /// Supported operand variants:
3368 ///
3369 /// ```text
3370 /// +---+----------+
3371 /// | # | Operands |
3372 /// +---+----------+
3373 /// | 1 | (none) |
3374 /// +---+----------+
3375 /// ```
3376 #[inline]
3377 pub fn ftst(&mut self)
3378 where Assembler<'a>: FtstEmitter {
3379 <Self as FtstEmitter>::ftst(self);
3380 }
3381 /// `FUCOM` (FUCOM).
3382 /// Performs an unordered comparison of the contents of register ST(0) and ST(i) and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). If no operand is specified, the contents of registers ST(0) and ST(1) are compared. The sign of zero is ignored, so that –0.0 is equal to +0.0.
3383 ///
3384 ///
3385 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FUCOM%3AFUCOMP%3AFUCOMPP.html).
3386 ///
3387 /// Supported operand variants:
3388 ///
3389 /// ```text
3390 /// +---+----------+
3391 /// | # | Operands |
3392 /// +---+----------+
3393 /// | 1 | St |
3394 /// +---+----------+
3395 /// ```
3396 #[inline]
3397 pub fn fucom<A>(&mut self, op0: A)
3398 where Assembler<'a>: FucomEmitter<A> {
3399 <Self as FucomEmitter<A>>::fucom(self, op0);
3400 }
3401 /// `FUCOMP` (FUCOMP).
3402 /// Performs an unordered comparison of the contents of register ST(0) and ST(i) and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). If no operand is specified, the contents of registers ST(0) and ST(1) are compared. The sign of zero is ignored, so that –0.0 is equal to +0.0.
3403 ///
3404 ///
3405 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FUCOM%3AFUCOMP%3AFUCOMPP.html).
3406 ///
3407 /// Supported operand variants:
3408 ///
3409 /// ```text
3410 /// +---+----------+
3411 /// | # | Operands |
3412 /// +---+----------+
3413 /// | 1 | St |
3414 /// +---+----------+
3415 /// ```
3416 #[inline]
3417 pub fn fucomp<A>(&mut self, op0: A)
3418 where Assembler<'a>: FucompEmitter<A> {
3419 <Self as FucompEmitter<A>>::fucomp(self, op0);
3420 }
3421 /// `FUCOMPP` (FUCOMPP).
3422 /// Performs an unordered comparison of the contents of register ST(0) and ST(i) and sets condition code flags C0, C2, and C3 in the FPU status word according to the results (see the table below). If no operand is specified, the contents of registers ST(0) and ST(1) are compared. The sign of zero is ignored, so that –0.0 is equal to +0.0.
3423 ///
3424 ///
3425 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FUCOM%3AFUCOMP%3AFUCOMPP.html).
3426 ///
3427 /// Supported operand variants:
3428 ///
3429 /// ```text
3430 /// +---+----------+
3431 /// | # | Operands |
3432 /// +---+----------+
3433 /// | 1 | (none) |
3434 /// +---+----------+
3435 /// ```
3436 #[inline]
3437 pub fn fucompp(&mut self)
3438 where Assembler<'a>: FucomppEmitter {
3439 <Self as FucomppEmitter>::fucompp(self);
3440 }
3441 /// `FXAM`.
3442 ///
3443 /// Supported operand variants:
3444 ///
3445 /// ```text
3446 /// +---+----------+
3447 /// | # | Operands |
3448 /// +---+----------+
3449 /// | 1 | (none) |
3450 /// +---+----------+
3451 /// ```
3452 #[inline]
3453 pub fn fxam(&mut self)
3454 where Assembler<'a>: FxamEmitter {
3455 <Self as FxamEmitter>::fxam(self);
3456 }
3457 /// `FXCH` (FXCH).
3458 /// Exchanges the contents of registers ST(0) and ST(i). If no source operand is specified, the contents of ST(0) and ST(1) are exchanged.
3459 ///
3460 ///
3461 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FXCH.html).
3462 ///
3463 /// Supported operand variants:
3464 ///
3465 /// ```text
3466 /// +---+----------+
3467 /// | # | Operands |
3468 /// +---+----------+
3469 /// | 1 | St |
3470 /// +---+----------+
3471 /// ```
3472 #[inline]
3473 pub fn fxch<A>(&mut self, op0: A)
3474 where Assembler<'a>: FxchEmitter<A> {
3475 <Self as FxchEmitter<A>>::fxch(self, op0);
3476 }
3477 /// `FXTRACT` (FXTRACT).
3478 /// Separates the source value in the ST(0) register into its exponent and significand, stores the exponent in ST(0), and pushes the significand onto the register stack. Following this operation, the new top-of-stack register ST(0) contains the value of the original significand expressed as a floating-point value. The sign and significand of this value are the same as those found in the source operand, and the exponent is 3FFFH (biased value for a true exponent of zero). The ST(1) register contains the value of the original operand’s true (unbiased) exponent expressed as a floating-point value. (The operation performed by this instruction is a superset of the IEEE-recommended logb(x) function.)
3479 ///
3480 ///
3481 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FXTRACT.html).
3482 ///
3483 /// Supported operand variants:
3484 ///
3485 /// ```text
3486 /// +---+----------+
3487 /// | # | Operands |
3488 /// +---+----------+
3489 /// | 1 | (none) |
3490 /// +---+----------+
3491 /// ```
3492 #[inline]
3493 pub fn fxtract(&mut self)
3494 where Assembler<'a>: FxtractEmitter {
3495 <Self as FxtractEmitter>::fxtract(self);
3496 }
3497 /// `FYL2X` (FYL2X).
3498 /// Computes (ST(1) ∗ log2 (ST(0))), stores the result in register ST(1), and pops the FPU register stack. The source operand in ST(0) must be a non-zero positive number.
3499 ///
3500 ///
3501 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FYL2X.html).
3502 ///
3503 /// Supported operand variants:
3504 ///
3505 /// ```text
3506 /// +---+----------+
3507 /// | # | Operands |
3508 /// +---+----------+
3509 /// | 1 | (none) |
3510 /// +---+----------+
3511 /// ```
3512 #[inline]
3513 pub fn fyl2x(&mut self)
3514 where Assembler<'a>: Fyl2xEmitter {
3515 <Self as Fyl2xEmitter>::fyl2x(self);
3516 }
3517 /// `FYL2XP1` (FYL2XP1).
3518 /// Computes (ST(1) ∗ log2(ST(0) + 1.0)), stores the result in register ST(1), and pops the FPU register stack. The source operand in ST(0) must be in the range
3519 ///
3520 ///
3521 /// For more details, see the [Intel manual](https://www.felixcloutier.com/x86/FYL2XP1.html).
3522 ///
3523 /// Supported operand variants:
3524 ///
3525 /// ```text
3526 /// +---+----------+
3527 /// | # | Operands |
3528 /// +---+----------+
3529 /// | 1 | (none) |
3530 /// +---+----------+
3531 /// ```
3532 #[inline]
3533 pub fn fyl2xp1(&mut self)
3534 where Assembler<'a>: Fyl2xp1Emitter {
3535 <Self as Fyl2xp1Emitter>::fyl2xp1(self);
3536 }
3537}