asmkit/x86/features/
INVPCID.rs1use super::super::opcodes::*;
2use crate::core::emitter::*;
3use crate::core::operand::*;
4use crate::x86::assembler::*;
5use crate::x86::operands::*;
6
7const NOREG: Operand = Operand::new();
9
10pub trait InvpcidEmitter<A, B> {
22 fn invpcid(&mut self, op0: A, op1: B);
23}
24
25impl<'a> InvpcidEmitter<Gpq, Mem> for Assembler<'a> {
26 fn invpcid(&mut self, op0: Gpq, op1: Mem) {
27 self.emit(
28 INVPCIDRM,
29 op0.as_operand(),
30 op1.as_operand(),
31 &NOREG,
32 &NOREG,
33 );
34 }
35}
36
37impl<'a> Assembler<'a> {
38 #[inline]
50 pub fn invpcid<A, B>(&mut self, op0: A, op1: B)
51 where
52 Assembler<'a>: InvpcidEmitter<A, B>,
53 {
54 <Self as InvpcidEmitter<A, B>>::invpcid(self, op0, op1);
55 }
56}