diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/generated/imp.rs | 1512 | ||||
-rw-r--r-- | src/generated/opcode.rs | 48 | ||||
-rw-r--r-- | src/long_mode/display.rs | 1446 | ||||
-rw-r--r-- | src/protected_mode/display.rs | 1456 | ||||
-rw-r--r-- | src/real_mode/display.rs | 1456 |
5 files changed, 1557 insertions, 4361 deletions
diff --git a/src/generated/imp.rs b/src/generated/imp.rs index c028ff7..86ff91e 100644 --- a/src/generated/imp.rs +++ b/src/generated/imp.rs @@ -1,6 +1,1479 @@ +use yaxpeax_arch::{Colorize, YaxColors}; +use core::fmt; +use crate::generated::opcode::Opcode; + +impl fmt::Display for Opcode { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(self.name()) + } +} + +impl<T: fmt::Write, Y: YaxColors> Colorize<T, Y> for Opcode { + fn colorize(&self, colors: &Y, out: &mut T) -> fmt::Result { + match self { + Opcode::ARPL | + Opcode::BNDCL | + Opcode::BNDCN | + Opcode::BNDCU | + Opcode::BNDLDX | + Opcode::BNDMK | + Opcode::BNDSTX | + Opcode::BOUND | + Opcode::CLAC | + Opcode::CLFLUSH | + Opcode::CLFLUSHOPT | + Opcode::CLGI | + Opcode::CLTS | + Opcode::CLUI | + Opcode::CLWB | + Opcode::CLZERO | + Opcode::CPUID | + Opcode::EMMS | + Opcode::ENCLS | + Opcode::ENCLU | + Opcode::ENCLV | + Opcode::ENQCMD | + Opcode::ENQCMDS | + Opcode::FEMMS | + Opcode::FXRSTOR | + Opcode::FXSAVE | + Opcode::GETSEC | + Opcode::INVD | + Opcode::INVEPT | + Opcode::INVLPG | + Opcode::INVLPGA | + Opcode::INVLPGB | + Opcode::INVPCID | + Opcode::INVVPID | + Opcode::JMPE | + Opcode::LAR | + Opcode::LDMXCSR | + Opcode::LDS | + Opcode::LES | + Opcode::LFENCE | + Opcode::LFS | + Opcode::LGDT | + Opcode::LGS | + Opcode::LIDT | + Opcode::LLDT | + Opcode::LMSW | + Opcode::LSL | + Opcode::LSS | + Opcode::LTR | + Opcode::MFENCE | + Opcode::MONITOR | + Opcode::MONITORX | + Opcode::MWAIT | + Opcode::MWAITX | + Opcode::PCONFIG | + Opcode::PSMASH | + Opcode::PTWRITE | + Opcode::PVALIDATE | + Opcode::RDFSBASE | + Opcode::RDGSBASE | + Opcode::RDMSR | + Opcode::RDPID | + Opcode::RDPKRU | + Opcode::RDPMC | + Opcode::RDPRU | + Opcode::RDTSC | + Opcode::RDTSCP | + Opcode::RMPADJUST | + Opcode::RMPUPDATE | + Opcode::RSM | + Opcode::SEAMCALL | + Opcode::SEAMOPS | + Opcode::SEAMRET | + Opcode::SENDUIPI | + Opcode::SFENCE | + Opcode::SGDT | + Opcode::SIDT | + Opcode::SKINIT | + Opcode::SLDT | + Opcode::SMSW | + Opcode::STAC | + Opcode::STGI | + Opcode::STMXCSR | + Opcode::STR | + Opcode::STUI | + Opcode::SWAPGS | + Opcode::SYSCALL | + Opcode::SYSENTER | + Opcode::SYSEXIT | + Opcode::SYSRET | + Opcode::TDCALL | + Opcode::TESTUI | + Opcode::TLBSYNC | + Opcode::TPAUSE | + Opcode::UIRET | + Opcode::UMONITOR | + Opcode::UMWAIT | + Opcode::VERR | + Opcode::VERW | + Opcode::VLDMXCSR | + Opcode::VMCALL | + Opcode::VMCLEAR | + Opcode::VMFUNC | + Opcode::VMLAUNCH | + Opcode::VMLOAD | + Opcode::VMMCALL | + Opcode::VMPTRLD | + Opcode::VMPTRST | + Opcode::VMREAD | + Opcode::VMRESUME | + Opcode::VMRUN | + Opcode::VMSAVE | + Opcode::VMWRITE | + Opcode::VMXOFF | + Opcode::VMXON | + Opcode::VSTMXCSR | + Opcode::WBINVD | + Opcode::WRFSBASE | + Opcode::WRGSBASE | + Opcode::WRMSR | + Opcode::WRPKRU | + Opcode::XABORT | + Opcode::XBEGIN | + Opcode::XEND | + Opcode::XGETBV | + Opcode::XRESLDTRK | + Opcode::XRSTOR | + Opcode::XRSTORS | + Opcode::XRSTORS64 | + Opcode::XSAVE | + Opcode::XSAVEC | + Opcode::XSAVEC64 | + Opcode::XSAVEOPT | + Opcode::XSAVES | + Opcode::XSAVES64 | + Opcode::XSETBV | + Opcode::XSUSLDTRK | + Opcode::XTEST => { + write!(out, "{}", colors.platform_op(self)) + } + Opcode::FDISI8087_NOP | + Opcode::FENI8087_NOP | + Opcode::FNOP | + Opcode::FSETPM287_NOP | + Opcode::NOP | + Opcode::PREFETCH0 | + Opcode::PREFETCH1 | + Opcode::PREFETCH2 | + Opcode::PREFETCHNTA | + Opcode::PREFETCHW | + Opcode::WAIT => { + write!(out, "{}", colors.nop_op(self)) + } + Opcode::ENTER | + Opcode::LEAVE | + Opcode::POP | + Opcode::POPA | + Opcode::POPF | + Opcode::PUSH | + Opcode::PUSHA | + Opcode::PUSHF => { + write!(out, "{}", colors.stack_op(self)) + } + Opcode::BLENDPD | + Opcode::BLENDPS | + Opcode::BLENDVPD | + Opcode::BLENDVPS | + Opcode::BLENDW | + Opcode::BNDMOV | + Opcode::BSWAP | + Opcode::CBW | + Opcode::CDQ | + Opcode::CDQE | + Opcode::CLC | + Opcode::CLD | + Opcode::CLI | + Opcode::CMC | + Opcode::CMOVA | + Opcode::CMOVB | + Opcode::CMOVG | + Opcode::CMOVGE | + Opcode::CMOVL | + Opcode::CMOVLE | + Opcode::CMOVNA | + Opcode::CMOVNB | + Opcode::CMOVNO | + Opcode::CMOVNP | + Opcode::CMOVNS | + Opcode::CMOVNZ | + Opcode::CMOVO | + Opcode::CMOVP | + Opcode::CMOVS | + Opcode::CMOVZ | + Opcode::CQO | + Opcode::CVTDQ2PD | + Opcode::CVTDQ2PS | + Opcode::CVTPD2DQ | + Opcode::CVTPD2PI | + Opcode::CVTPD2PS | + Opcode::CVTPI2PD | + Opcode::CVTPI2PS | + Opcode::CVTPS2DQ | + Opcode::CVTPS2PD | + Opcode::CVTPS2PI | + Opcode::CVTSD2SI | + Opcode::CVTSD2SS | + Opcode::CVTSI2SD | + Opcode::CVTSI2SS | + Opcode::CVTSS2SD | + Opcode::CVTSS2SI | + Opcode::CVTTPD2DQ | + Opcode::CVTTPD2PI | + Opcode::CVTTPS2DQ | + Opcode::CVTTPS2PI | + Opcode::CVTTSD2SI | + Opcode::CVTTSS2SI | + Opcode::CWD | + Opcode::CWDE | + Opcode::EXTRACTPS | + Opcode::EXTRQ | + Opcode::FBLD | + Opcode::FBSTP | + Opcode::FCMOVB | + Opcode::FCMOVBE | + Opcode::FCMOVE | + Opcode::FCMOVNB | + Opcode::FCMOVNBE | + Opcode::FCMOVNE | + Opcode::FCMOVNU | + Opcode::FCMOVU | + Opcode::FILD | + Opcode::FIST | + Opcode::FISTP | + Opcode::FISTTP | + Opcode::FLD | + Opcode::FLD1 | + Opcode::FLDCW | + Opcode::FLDENV | + Opcode::FLDL2E | + Opcode::FLDL2T | + Opcode::FLDLG2 | + Opcode::FLDLN2 | + Opcode::FLDPI | + Opcode::FLDZ | + Opcode::FNSAVE | + Opcode::FNSTCW | + Opcode::FNSTENV | + Opcode::FNSTOR | + Opcode::FNSTSW | + Opcode::FRSTOR | + Opcode::FST | + Opcode::FSTP | + Opcode::FSTPNCE | + Opcode::FXCH | + Opcode::IN | + Opcode::INS | + Opcode::INSERTPS | + Opcode::INSERTQ | + Opcode::KMOVB | + Opcode::KMOVD | + Opcode::KMOVQ | + Opcode::KMOVW | + Opcode::KUNPCKBW | + Opcode::KUNPCKDQ | + Opcode::KUNPCKWD | + Opcode::LAHF | + Opcode::LDDQU | + Opcode::LODS | + Opcode::MASKMOVDQU | + Opcode::MASKMOVQ | + Opcode::MOV | + Opcode::MOVAPD | + Opcode::MOVAPS | + Opcode::MOVBE | + Opcode::MOVD | + Opcode::MOVDDUP | + Opcode::MOVDIR64B | + Opcode::MOVDIRI | + Opcode::MOVDQ2Q | + Opcode::MOVDQA | + Opcode::MOVDQU | + Opcode::MOVHLPS | + Opcode::MOVHPD | + Opcode::MOVHPS | + Opcode::MOVLHPS | + Opcode::MOVLPD | + Opcode::MOVLPS | + Opcode::MOVMSKPD | + Opcode::MOVMSKPS | + Opcode::MOVNTDQ | + Opcode::MOVNTDQA | + Opcode::MOVNTI | + Opcode::MOVNTPD | + Opcode::MOVNTPS | + Opcode::MOVNTQ | + Opcode::MOVNTSD | + Opcode::MOVNTSS | + Opcode::MOVQ | + Opcode::MOVQ2DQ | + Opcode::MOVS | + Opcode::MOVSD | + Opcode::MOVSHDUP | + Opcode::MOVSLDUP | + Opcode::MOVSS | + Opcode::MOVSX | + Opcode::MOVSXD | + Opcode::MOVUPD | + Opcode::MOVUPS | + Opcode::MOVZX | + Opcode::OUT | + Opcode::OUTS | + Opcode::PACKSSDW | + Opcode::PACKSSWB | + Opcode::PACKUSDW | + Opcode::PACKUSWB | + Opcode::PALIGNR | + Opcode::PBLENDVB | + Opcode::PBLENDW | + Opcode::PEXTRB | + Opcode::PEXTRD | + Opcode::PEXTRQ | + Opcode::PEXTRW | + Opcode::PF2ID | + Opcode::PF2IW | + Opcode::PHMINPOSUW | + Opcode::PI2FD | + Opcode::PI2FW | + Opcode::PINSRB | + Opcode::PINSRD | + Opcode::PINSRQ | + Opcode::PINSRW | + Opcode::PMOVMSKB | + Opcode::PMOVSXBD | + Opcode::PMOVSXBQ | + Opcode::PMOVSXBW | + Opcode::PMOVSXDQ | + Opcode::PMOVSXWD | + Opcode::PMOVSXWQ | + Opcode::PMOVZXBD | + Opcode::PMOVZXBQ | + Opcode::PMOVZXBW | + Opcode::PMOVZXDQ | + Opcode::PMOVZXWD | + Opcode::PMOVZXWQ | + Opcode::PSHUFHW | + Opcode::PSHUFLW | + Opcode::PUNPCKHBW | + Opcode::PUNPCKHDQ | + Opcode::PUNPCKHQDQ | + Opcode::PUNPCKHWD | + Opcode::PUNPCKLBW | + Opcode::PUNPCKLDQ | + Opcode::PUNPCKLQDQ | + Opcode::PUNPCKLWD | + Opcode::SAHF | + Opcode::SALC | + Opcode::SETA | + Opcode::SETAE | + Opcode::SETB | + Opcode::SETBE | + Opcode::SETG | + Opcode::SETGE | + Opcode::SETL | + Opcode::SETLE | + Opcode::SETNO | + Opcode::SETNP | + Opcode::SETNS | + Opcode::SETNZ | + Opcode::SETO | + Opcode::SETP | + Opcode::SETS | + Opcode::SETZ | + Opcode::SHUFPD | + Opcode::SHUFPS | + Opcode::STC | + Opcode::STD | + Opcode::STI | + Opcode::STOS | + Opcode::UNPCKHPD | + Opcode::UNPCKHPS | + Opcode::UNPCKLPD | + Opcode::UNPCKLPS | + Opcode::VALIGND | + Opcode::VALIGNQ | + Opcode::VBLENDMPD | + Opcode::VBLENDMPS | + Opcode::VBLENDPD | + Opcode::VBLENDPS | + Opcode::VBLENDVPD | + Opcode::VBLENDVPS | + Opcode::VBROADCASTF128 | + Opcode::VBROADCASTI128 | + Opcode::VBROADCASTSD | + Opcode::VBROADCASTSS | + Opcode::VCOMPRESSD | + Opcode::VCOMPRESSPD | + Opcode::VCOMPRESSPS | + Opcode::VCOMPRESSQ | + Opcode::VCVTDQ2PD | + Opcode::VCVTDQ2PS | + Opcode::VCVTPD2DQ | + Opcode::VCVTPD2PS | + Opcode::VCVTPD2QQ | + Opcode::VCVTPD2UDQ | + Opcode::VCVTPD2UQQ | + Opcode::VCVTPH2PS | + Opcode::VCVTPS2DQ | + Opcode::VCVTPS2PD | + Opcode::VCVTPS2PH | + Opcode::VCVTPS2QQ | + Opcode::VCVTPS2UDQ | + Opcode::VCVTPS2UQQ | + Opcode::VCVTQQ2PD | + Opcode::VCVTQQ2PS | + Opcode::VCVTSD2SI | + Opcode::VCVTSD2SS | + Opcode::VCVTSD2USI | + Opcode::VCVTSI2SD | + Opcode::VCVTSI2SS | + Opcode::VCVTSS2SD | + Opcode::VCVTSS2SI | + Opcode::VCVTSS2USI | + Opcode::VCVTTPD2DQ | + Opcode::VCVTTPD2QQ | + Opcode::VCVTTPD2UDQ | + Opcode::VCVTTPD2UQQ | + Opcode::VCVTTPS2DQ | + Opcode::VCVTTPS2QQ | + Opcode::VCVTTPS2UDQ | + Opcode::VCVTTPS2UQQ | + Opcode::VCVTTSD2SI | + Opcode::VCVTTSD2USI | + Opcode::VCVTTSS2SI | + Opcode::VCVTTSS2USI | + Opcode::VCVTUDQ2PD | + Opcode::VCVTUDQ2PS | + Opcode::VCVTUQQ2PD | + Opcode::VCVTUQQ2PS | + Opcode::VCVTUSI2USD | + Opcode::VCVTUSI2USS | + Opcode::VEXPANDPD | + Opcode::VEXPANDPS | + Opcode::VEXTRACTF128 | + Opcode::VEXTRACTF32X4 | + Opcode::VEXTRACTF64X2 | + Opcode::VEXTRACTF64X4 | + Opcode::VEXTRACTI128 | + Opcode::VEXTRACTI32X4 | + Opcode::VEXTRACTI64X2 | + Opcode::VEXTRACTI64X4 | + Opcode::VEXTRACTPS | + Opcode::VFIXUPIMMPD | + Opcode::VFIXUPIMMPS | + Opcode::VFIXUPIMMSD | + Opcode::VFIXUPIMMSS | + Opcode::VGATHERDPD | + Opcode::VGATHERDPS | + Opcode::VGATHERPF0DPD | + Opcode::VGATHERPF0DPS | + Opcode::VGATHERPF0QPD | + Opcode::VGATHERPF0QPS | + Opcode::VGATHERPF1DPD | + Opcode::VGATHERPF1DPS | + Opcode::VGATHERPF1QPD | + Opcode::VGATHERPF1QPS | + Opcode::VGATHERQPD | + Opcode::VGATHERQPS | + Opcode::VGETEXPPD | + Opcode::VGETEXPPS | + Opcode::VGETEXPSD | + Opcode::VGETEXPSS | + Opcode::VGETMANTPD | + Opcode::VGETMANTPS | + Opcode::VGETMANTSD | + Opcode::VGETMANTSS | + Opcode::VINSERTF128 | + Opcode::VINSERTF32X4 | + Opcode::VINSERTF64X2 | + Opcode::VINSERTF64X4 | + Opcode::VINSERTI128 | + Opcode::VINSERTI64X2 | + Opcode::VINSERTI64X4 | + Opcode::VINSERTPS | + Opcode::VLDDQU | + Opcode::VMASKMOVDQU | + Opcode::VMASKMOVPD | + Opcode::VMASKMOVPS | + Opcode::VMOVAPD | + Opcode::VMOVAPS | + Opcode::VMOVD | + Opcode::VMOVDDUP | + Opcode::VMOVDQA | + Opcode::VMOVDQA32 | + Opcode::VMOVDQA64 | + Opcode::VMOVDQU | + Opcode::VMOVDQU16 | + Opcode::VMOVDQU32 | + Opcode::VMOVDQU64 | + Opcode::VMOVDQU8 | + Opcode::VMOVHLPS | + Opcode::VMOVHPD | + Opcode::VMOVHPS | + Opcode::VMOVLHPS | + Opcode::VMOVLPD | + Opcode::VMOVLPS | + Opcode::VMOVMSKPD | + Opcode::VMOVMSKPS | + Opcode::VMOVNTDQ | + Opcode::VMOVNTDQA | + Opcode::VMOVNTPD | + Opcode::VMOVNTPS | + Opcode::VMOVQ | + Opcode::VMOVSD | + Opcode::VMOVSHDUP | + Opcode::VMOVSLDUP | + Opcode::VMOVSS | + Opcode::VMOVUPD | + Opcode::VMOVUPS | + Opcode::VPACKSSDW | + Opcode::VPACKSSWB | + Opcode::VPACKUSDW | + Opcode::VPACKUSWB | + Opcode::VPALIGNR | + Opcode::VPBLENDD | + Opcode::VPBLENDMB | + Opcode::VPBLENDMD | + Opcode::VPBLENDMQ | + Opcode::VPBLENDMW | + Opcode::VPBLENDVB | + Opcode::VPBLENDW | + Opcode::VPBROADCASTB | + Opcode::VPBROADCASTD | + Opcode::VPBROADCASTM | + Opcode::VPBROADCASTQ | + Opcode::VPBROADCASTW | + Opcode::VPCLMULQDQ | + Opcode::VPCOMPRESSD | + Opcode::VPCOMPRESSQ | + Opcode::VPERM2F128 | + Opcode::VPERM2I128 | + Opcode::VPERMD | + Opcode::VPERMI2B | + Opcode::VPERMI2D | + Opcode::VPERMI2PD | + Opcode::VPERMI2PS | + Opcode::VPERMI2Q | + Opcode::VPERMI2W | + Opcode::VPERMILPD | + Opcode::VPERMILPS | + Opcode::VPERMPD | + Opcode::VPERMPS | + Opcode::VPERMQ | + Opcode::VPERMT2D | + Opcode::VPERMT2PD | + Opcode::VPERMT2PS | + Opcode::VPERMT2Q | + Opcode::VPERMW | + Opcode::VPEXTRB | + Opcode::VPEXTRD | + Opcode::VPEXTRQ | + Opcode::VPEXTRW | + Opcode::VPGATHERDD | + Opcode::VPGATHERDQ | + Opcode::VPGATHERQD | + Opcode::VPGATHERQQ | + Opcode::VPHMINPOSUW | + Opcode::VPINSRB | + Opcode::VPINSRD | + Opcode::VPINSRQ | + Opcode::VPINSRW | + Opcode::VPMASKMOVD | + Opcode::VPMASKMOVQ | + Opcode::VPMOVB2D | + Opcode::VPMOVB2M | + Opcode::VPMOVM2B | + Opcode::VPMOVM2D | + Opcode::VPMOVM2Q | + Opcode::VPMOVM2W | + Opcode::VPMOVMSKB | + Opcode::VPMOVQ2M | + Opcode::VPMOVSDB | + Opcode::VPMOVSDW | + Opcode::VPMOVSQB | + Opcode::VPMOVSQD | + Opcode::VPMOVSQW | + Opcode::VPMOVSWB | + Opcode::VPMOVSXBD | + Opcode::VPMOVSXBQ | + Opcode::VPMOVSXBW | + Opcode::VPMOVSXDQ | + Opcode::VPMOVSXWD | + Opcode::VPMOVSXWQ | + Opcode::VPMOVUSDB | + Opcode::VPMOVUSDW | + Opcode::VPMOVUSQB | + Opcode::VPMOVUSQD | + Opcode::VPMOVUSQW | + Opcode::VPMOVUSWB | + Opcode::VPMOVW2M | + Opcode::VPMOVZXBD | + Opcode::VPMOVZXBQ | + Opcode::VPMOVZXBW | + Opcode::VPMOVZXDQ | + Opcode::VPMOVZXWD | + Opcode::VPMOVZXWQ | + Opcode::VPSCATTERDD | + Opcode::VPSCATTERDQ | + Opcode::VPSCATTERQD | + Opcode::VPSCATTERQQ | + Opcode::VPSHUFB | + Opcode::VPSHUFD | + Opcode::VPSHUFHW | + Opcode::VPSHUFLW | + Opcode::VPUNPCKHBW | + Opcode::VPUNPCKHDQ | + Opcode::VPUNPCKHQDQ | + Opcode::VPUNPCKHWD | + Opcode::VPUNPCKLBW | + Opcode::VPUNPCKLDQ | + Opcode::VPUNPCKLQDQ | + Opcode::VPUNPCKLWD | + Opcode::VREDUCEPD | + Opcode::VREDUCEPS | + Opcode::VREDUCESD | + Opcode::VREDUCESS | + Opcode::VSCATTERDD | + Opcode::VSCATTERDPD | + Opcode::VSCATTERDPS | + Opcode::VSCATTERDQ | + Opcode::VSCATTERPF0DPD | + Opcode::VSCATTERPF0DPS | + Opcode::VSCATTERPF0QPD | + Opcode::VSCATTERPF0QPS | + Opcode::VSCATTERPF1DPD | + Opcode::VSCATTERPF1DPS | + Opcode::VSCATTERPF1QPD | + Opcode::VSCATTERPF1QPS | + Opcode::VSCATTERQD | + Opcode::VSCATTERQPD | + Opcode::VSCATTERQPS | + Opcode::VSCATTERQQ | + Opcode::VSHUFF32X4 | + Opcode::VSHUFF64X2 | + Opcode::VSHUFI32X4 | + Opcode::VSHUFI64X2 | + Opcode::VSHUFPD | + Opcode::VSHUFPS | + Opcode::VUNPCKHPD | + Opcode::VUNPCKHPS | + Opcode::VUNPCKLPD | + Opcode::VUNPCKLPS | + Opcode::VZEROALL | + Opcode::VZEROUPPER | + Opcode::XCHG | + Opcode::XLAT => { + write!(out, "{}", colors.data_op(self)) + } + Opcode::CMP | + Opcode::CMPPD | + Opcode::CMPPS | + Opcode::CMPS | + Opcode::CMPSD | + Opcode::CMPSS | + Opcode::CMPXCHG | + Opcode::CMPXCHG16B | + Opcode::CMPXCHG8B | + Opcode::FCOM | + Opcode::FCOMI | + Opcode::FCOMIP | + Opcode::FCOMP | + Opcode::FCOMPP | + Opcode::FICOM | + Opcode::FICOMP | + Opcode::FTST | + Opcode::FUCOM | + Opcode::FUCOMI | + Opcode::FUCOMIP | + Opcode::FUCOMP | + Opcode::FUCOMPP | + Opcode::FXAM | + Opcode::KORTESTB | + Opcode::KORTESTD | + Opcode::KORTESTQ | + Opcode::KORTESTW | + Opcode::KTESTB | + Opcode::KTESTD | + Opcode::KTESTQ | + Opcode::KTESTW | + Opcode::MAXPD | + Opcode::MAXPS | + Opcode::MAXSD | + Opcode::MAXSS | + Opcode::MINPD | + Opcode::MINPS | + Opcode::MINSD | + Opcode::MINSS | + Opcode::PCMPEQB | + Opcode::PCMPEQD | + Opcode::PCMPEQQ | + Opcode::PCMPEQW | + Opcode::PCMPESTRI | + Opcode::PCMPESTRM | + Opcode::PCMPGTB | + Opcode::PCMPGTD | + Opcode::PCMPGTQ | + Opcode::PCMPGTW | + Opcode::PCMPISTRI | + Opcode::PCMPISTRM | + Opcode::PFCMPEQ | + Opcode::PFCMPGE | + Opcode::PFCMPGT | + Opcode::PFMAX | + Opcode::PFMIN | + Opcode::PMAXSB | + Opcode::PMAXSD | + Opcode::PMAXSW | + Opcode::PMAXUB | + Opcode::PMAXUD | + Opcode::PMAXUW | + Opcode::PMINSB | + Opcode::PMINSD | + Opcode::PMINSW | + Opcode::PMINUB | + Opcode::PMINUD | + Opcode::PMINUW | + Opcode::PTEST | + Opcode::SCAS | + Opcode::TEST | + Opcode::VCMPPD | + Opcode::VCMPPS | + Opcode::VCMPSD | + Opcode::VCMPSS | + Opcode::VCOMISD | + Opcode::VCOMISS | + Opcode::VFPCLASSPD | + Opcode::VFPCLASSPS | + Opcode::VFPCLASSSD | + Opcode::VFPCLASSSS | + Opcode::VMAXPD | + Opcode::VMAXPS | + Opcode::VMAXSD | + Opcode::VMAXSS | + Opcode::VMINPD | + Opcode::VMINPS | + Opcode::VMINSD | + Opcode::VMINSS | + Opcode::VPCMPB | + Opcode::VPCMPD | + Opcode::VPCMPEQB | + Opcode::VPCMPEQD | + Opcode::VPCMPEQQ | + Opcode::VPCMPEQW | + Opcode::VPCMPESTRI | + Opcode::VPCMPESTRM | + Opcode::VPCMPGTB | + Opcode::VPCMPGTD | + Opcode::VPCMPGTQ | + Opcode::VPCMPGTW | + Opcode::VPCMPISTRI | + Opcode::VPCMPISTRM | + Opcode::VPCMPQ | + Opcode::VPCMPUB | + Opcode::VPCMPUD | + Opcode::VPCMPUQ | + Opcode::VPCMPUW | + Opcode::VPCMPW | + Opcode::VPCONFLICTD | + Opcode::VPCONFLICTQ | + Opcode::VPMAXSB | + Opcode::VPMAXSD | + Opcode::VPMAXSQ | + Opcode::VPMAXSW | + Opcode::VPMAXUB | + Opcode::VPMAXUD | + Opcode::VPMAXUQ | + Opcode::VPMAXUW | + Opcode::VPMINSB | + Opcode::VPMINSD | + Opcode::VPMINSQ | + Opcode::VPMINSW | + Opcode::VPMINUB | + Opcode::VPMINUD | + Opcode::VPMINUQ | + Opcode::VPMINUW | + Opcode::VPTERNLOGD | + Opcode::VPTERNLOGQ | + Opcode::VPTEST | + Opcode::VPTESTMB | + Opcode::VPTESTMD | + Opcode::VPTESTMQ | + Opcode::VPTESTMW | + Opcode::VPTESTNMB | + Opcode::VPTESTNMD | + Opcode::VPTESTNMQ | + Opcode::VPTESTNMW | + Opcode::VRANGEPD | + Opcode::VRANGEPS | + Opcode::VRANGESD | + Opcode::VRANGESS | + Opcode::VTESTPD | + Opcode::VTESTPS | + Opcode::VUCOMISD | + Opcode::VUCOMISS => { + write!(out, "{}", colors.comparison_op(self)) + } + Opcode::AAA | + Opcode::AAD | + Opcode::AAM | + Opcode::AAS | + Opcode::ADC | + Opcode::ADCX | + Opcode::ADD | + Opcode::ADDPD | + Opcode::ADDPS | + Opcode::ADDSD | + Opcode::ADDSS | + Opcode::ADDSUBPD | + Opcode::ADDSUBPS | + Opcode::ADOX | + Opcode::AND | + Opcode::ANDN | + Opcode::ANDNPD | + Opcode::ANDNPS | + Opcode::ANDPD | + Opcode::ANDPS | + Opcode::BEXTR | + Opcode::BLSI | + Opcode::BLSMSK | + Opcode::BLSR | + Opcode::BSF | + Opcode::BSR | + Opcode::BT | + Opcode::BTC | + Opcode::BTR | + Opcode::BTS | + Opcode::BZHI | + Opcode::COMISD | + Opcode::COMISS | + Opcode::DAA | + Opcode::DAS | + Opcode::DEC | + Opcode::DIV | + Opcode::DIVPD | + Opcode::DIVPS | + Opcode::DIVSD | + Opcode::DIVSS | + Opcode::DPPD | + Opcode::DPPS | + Opcode::F2XM1 | + Opcode::FABS | + Opcode::FADD | + Opcode::FADDP | + Opcode::FCHS | + Opcode::FCOS | + Opcode::FDIV | + Opcode::FDIVP | + Opcode::FDIVR | + Opcode::FDIVRP | + Opcode::FIADD | + Opcode::FIDIV | + Opcode::FIDIVR | + Opcode::FIMUL | + Opcode::FISUB | + Opcode::FISUBR | + Opcode::FMUL | + Opcode::FMULP | + Opcode::FNCLEX | + Opcode::FNINIT | + Opcode::FPATAN | + Opcode::FPREM | + Opcode::FPREM1 | + Opcode::FPTAN | + Opcode::FRNDINT | + Opcode::FSCALE | + Opcode::FSIN | + Opcode::FSINCOS | + Opcode::FSQRT | + Opcode::FSUB | + Opcode::FSUBP | + Opcode::FSUBR | + Opcode::FSUBRP | + Opcode::FXTRACT | + Opcode::FYL2X | + Opcode::FYL2XP1 | + Opcode::HADDPD | + Opcode::HADDPS | + Opcode::HSUBPD | + Opcode::HSUBPS | + Opcode::IDIV | + Opcode::IMUL | + Opcode::INC | + Opcode::KADDB | + Opcode::KADDD | + Opcode::KADDQ | + Opcode::KADDW | + Opcode::KANDB | + Opcode::KANDD | + Opcode::KANDNB | + Opcode::KANDND | + Opcode::KANDNQ | + Opcode::KANDNW | + Opcode::KANDQ | + Opcode::KANDW | + Opcode::KNOTB | + Opcode::KNOTD | + Opcode::KNOTQ | + Opcode::KNOTW | + Opcode::KORB | + Opcode::KORD | + Opcode::KORQ | + Opcode::KORW | + Opcode::KSHIFTLB | + Opcode::KSHIFTLD | + Opcode::KSHIFTLQ | + Opcode::KSHIFTLW | + Opcode::KSHIFTRB | + Opcode::KSHIFTRD | + Opcode::KSHIFTRQ | + Opcode::KSHIFTRW | + Opcode::KXNORB | + Opcode::KXNORD | + Opcode::KXNORQ | + Opcode::KXNORW | + Opcode::KXORB | + Opcode::KXORD | + Opcode::KXORQ | + Opcode::KXORW | + Opcode::LEA | + Opcode::LZCNT | + Opcode::MPSADBW | + Opcode::MUL | + Opcode::MULPD | + Opcode::MULPS | + Opcode::MULSD | + Opcode::MULSS | + Opcode::MULX | + Opcode::NEG | + Opcode::NOT | + Opcode::OR | + Opcode::ORPD | + Opcode::ORPS | + Opcode::PABSB | + Opcode::PABSD | + Opcode::PABSW | + Opcode::PADDB | + Opcode::PADDD | + Opcode::PADDQ | + Opcode::PADDSB | + Opcode::PADDSW | + Opcode::PADDUSB | + Opcode::PADDUSW | + Opcode::PADDW | + Opcode::PAND | + Opcode::PANDN | + Opcode::PAVGB | + Opcode::PAVGUSB | + Opcode::PAVGW | + Opcode::PCLMULQDQ | + Opcode::PDEP | + Opcode::PEXT | + Opcode::PFACC | + Opcode::PFADD | + Opcode::PFMUL | + Opcode::PFMULHRW | + Opcode::PFNACC | + Opcode::PFPNACC | + Opcode::PFRCP | + Opcode::PFRCPIT1 | + Opcode::PFRCPIT2 | + Opcode::PFRSQIT1 | + Opcode::PFRSQRT | + Opcode::PFSUB | + Opcode::PFSUBR | + Opcode::PHADDD | + Opcode::PHADDSW | + Opcode::PHADDW | + Opcode::PHSUBD | + Opcode::PHSUBSW | + Opcode::PHSUBW | + Opcode::PMADDUBSW | + Opcode::PMADDWD | + Opcode::PMULDQ | + Opcode::PMULHRSW | + Opcode::PMULHRW | + Opcode::PMULHUW | + Opcode::PMULHW | + Opcode::PMULLD | + Opcode::PMULLW | + Opcode::PMULUDQ | + Opcode::POPCNT | + Opcode::POR | + Opcode::PSADBW | + Opcode::PSHUFB | + Opcode::PSHUFD | + Opcode::PSHUFW | + Opcode::PSIGNB | + Opcode::PSIGND | + Opcode::PSIGNW | + Opcode::PSLLD | + Opcode::PSLLDQ | + Opcode::PSLLQ | + Opcode::PSLLW | + Opcode::PSRAD | + Opcode::PSRAW | + Opcode::PSRLD | + Opcode::PSRLDQ | + Opcode::PSRLQ | + Opcode::PSRLW | + Opcode::PSUBB | + Opcode::PSUBD | + Opcode::PSUBQ | + Opcode::PSUBSB | + Opcode::PSUBSW | + Opcode::PSUBUSB | + Opcode::PSUBUSW | + Opcode::PSUBW | + Opcode::PSWAPD | + Opcode::PXOR | + Opcode::RCL | + Opcode::RCPPS | + Opcode::RCPSS | + Opcode::RCR | + Opcode::ROL | + Opcode::ROR | + Opcode::RORX | + Opcode::ROUNDPD | + Opcode::ROUNDPS | + Opcode::ROUNDSD | + Opcode::ROUNDSS | + Opcode::RSQRTPS | + Opcode::RSQRTSS | + Opcode::SAL | + Opcode::SAR | + Opcode::SARX | + Opcode::SBB | + Opcode::SHL | + Opcode::SHLD | + Opcode::SHLX | + Opcode::SHR | + Opcode::SHRD | + Opcode::SHRX | + Opcode::SLHD | + Opcode::SQRTPD | + Opcode::SQRTPS | + Opcode::SQRTSD | + Opcode::SQRTSS | + Opcode::SUB | + Opcode::SUBPD | + Opcode::SUBPS | + Opcode::SUBSD | + Opcode::SUBSS | + Opcode::TZCNT | + Opcode::UCOMISD | + Opcode::UCOMISS | + Opcode::V4FMADDPS | + Opcode::V4FMADDSS | + Opcode::V4FNMADDPS | + Opcode::V4FNMADDSS | + Opcode::VADDPD | + Opcode::VADDPS | + Opcode::VADDSD | + Opcode::VADDSS | + Opcode::VADDSUBPD | + Opcode::VADDSUBPS | + Opcode::VANDNPD | + Opcode::VANDNPS | + Opcode::VANDPD | + Opcode::VANDPS | + Opcode::VBROADCASTF32X2 | + Opcode::VBROADCASTF32X4 | + Opcode::VBROADCASTF32X8 | + Opcode::VBROADCASTF64X2 | + Opcode::VBROADCASTF64X4 | + Opcode::VBROADCASTI32X2 | + Opcode::VBROADCASTI32X4 | + Opcode::VBROADCASTI32X8 | + Opcode::VBROADCASTI64X2 | + Opcode::VBROADCASTI64X4 | + Opcode::VCVTNE2PS2BF16 | + Opcode::VCVTNEPS2BF16 | + Opcode::VCVTUSI2SD | + Opcode::VCVTUSI2SS | + Opcode::VDBPSADBW | + Opcode::VDIVPD | + Opcode::VDIVPS | + Opcode::VDIVSD | + Opcode::VDIVSS | + Opcode::VDPBF16PS | + Opcode::VDPPD | + Opcode::VDPPS | + Opcode::VEXP2PD | + Opcode::VEXP2PS | + Opcode::VEXP2SD | + Opcode::VEXP2SS | + Opcode::VEXTRACTF32X8 | + Opcode::VEXTRACTI32X8 | + Opcode::VFMADD132PD | + Opcode::VFMADD132PS | + Opcode::VFMADD132SD | + Opcode::VFMADD132SS | + Opcode::VFMADD213PD | + Opcode::VFMADD213PS | + Opcode::VFMADD213SD | + Opcode::VFMADD213SS | + Opcode::VFMADD231PD | + Opcode::VFMADD231PS | + Opcode::VFMADD231SD | + Opcode::VFMADD231SS | + Opcode::VFMADDSUB132PD | + Opcode::VFMADDSUB132PS | + Opcode::VFMADDSUB213PD | + Opcode::VFMADDSUB213PS | + Opcode::VFMADDSUB231PD | + Opcode::VFMADDSUB231PS | + Opcode::VFMSUB132PD | + Opcode::VFMSUB132PS | + Opcode::VFMSUB132SD | + Opcode::VFMSUB132SS | + Opcode::VFMSUB213PD | + Opcode::VFMSUB213PS | + Opcode::VFMSUB213SD | + Opcode::VFMSUB213SS | + Opcode::VFMSUB231PD | + Opcode::VFMSUB231PS | + Opcode::VFMSUB231SD | + Opcode::VFMSUB231SS | + Opcode::VFMSUBADD132PD | + Opcode::VFMSUBADD132PS | + Opcode::VFMSUBADD213PD | + Opcode::VFMSUBADD213PS | + Opcode::VFMSUBADD231PD | + Opcode::VFMSUBADD231PS | + Opcode::VFNMADD132PD | + Opcode::VFNMADD132PS | + Opcode::VFNMADD132SD | + Opcode::VFNMADD132SS | + Opcode::VFNMADD213PD | + Opcode::VFNMADD213PS | + Opcode::VFNMADD213SD | + Opcode::VFNMADD213SS | + Opcode::VFNMADD231PD | + Opcode::VFNMADD231PS | + Opcode::VFNMADD231SD | + Opcode::VFNMADD231SS | + Opcode::VFNMSUB132PD | + Opcode::VFNMSUB132PS | + Opcode::VFNMSUB132SD | + Opcode::VFNMSUB132SS | + Opcode::VFNMSUB213PD | + Opcode::VFNMSUB213PS | + Opcode::VFNMSUB213SD | + Opcode::VFNMSUB213SS | + Opcode::VFNMSUB231PD | + Opcode::VFNMSUB231PS | + Opcode::VFNMSUB231SD | + Opcode::VFNMSUB231SS | + Opcode::VGF2P8AFFINEINVQB | + Opcode::VGF2P8AFFINEQB | + Opcode::VGF2P8MULB | + Opcode::VHADDPD | + Opcode::VHADDPS | + Opcode::VHSUBPD | + Opcode::VHSUBPS | + Opcode::VINSERTF32X8 | + Opcode::VINSERTI32X4 | + Opcode::VINSERTI32X8 | + Opcode::VMPSADBW | + Opcode::VMULPD | + Opcode::VMULPS | + Opcode::VMULSD | + Opcode::VMULSS | + Opcode::VORPD | + Opcode::VORPS | + Opcode::VP2INTERSECTD | + Opcode::VP2INTERSECTQ | + Opcode::VP4DPWSSD | + Opcode::VP4DPWSSDS | + Opcode::VPABSB | + Opcode::VPABSD | + Opcode::VPABSQ | + Opcode::VPABSW | + Opcode::VPADDB | + Opcode::VPADDD | + Opcode::VPADDQ | + Opcode::VPADDSB | + Opcode::VPADDSW | + Opcode::VPADDUSB | + Opcode::VPADDUSW | + Opcode::VPADDW | + Opcode::VPAND | + Opcode::VPANDD | + Opcode::VPANDN | + Opcode::VPANDND | + Opcode::VPANDNQ | + Opcode::VPANDQ | + Opcode::VPAVGB | + Opcode::VPAVGW | + Opcode::VPBROADCASTMB2Q | + Opcode::VPBROADCASTMW2D | + Opcode::VPCOMPRESSB | + Opcode::VPCOMPRESSW | + Opcode::VPDPBUSD | + Opcode::VPDPBUSDS | + Opcode::VPDPWSSD | + Opcode::VPDPWSSDS | + Opcode::VPERMB | + Opcode::VPERMT2B | + Opcode::VPERMT2W | + Opcode::VPEXPANDB | + Opcode::VPEXPANDD | + Opcode::VPEXPANDQ | + Opcode::VPEXPANDW | + Opcode::VPHADDD | + Opcode::VPHADDSW | + Opcode::VPHADDW | + Opcode::VPHSUBD | + Opcode::VPHSUBSW | + Opcode::VPHSUBW | + Opcode::VPLZCNTD | + Opcode::VPLZCNTQ | + Opcode::VPMADD52HUQ | + Opcode::VPMADD52LUQ | + Opcode::VPMADDUBSW | + Opcode::VPMADDWD | + Opcode::VPMOVD2M | + Opcode::VPMOVDB | + Opcode::VPMOVDW | + Opcode::VPMOVQB | + Opcode::VPMOVQD | + Opcode::VPMOVQW | + Opcode::VPMOVWB | + Opcode::VPMULDQ | + Opcode::VPMULHRSW | + Opcode::VPMULHUW | + Opcode::VPMULHW | + Opcode::VPMULLD | + Opcode::VPMULLQ | + Opcode::VPMULLW | + Opcode::VPMULTISHIFTQB | + Opcode::VPMULUDQ | + Opcode::VPOPCNTB | + Opcode::VPOPCNTD | + Opcode::VPOPCNTQ | + Opcode::VPOPCNTW | + Opcode::VPOR | + Opcode::VPORD | + Opcode::VPORQ | + Opcode::VPROLD | + Opcode::VPROLQ | + Opcode::VPROLVD | + Opcode::VPROLVQ | + Opcode::VPRORD | + Opcode::VPRORQ | + Opcode::VPRORRD | + Opcode::VPRORRQ | + Opcode::VPRORVD | + Opcode::VPRORVQ | + Opcode::VPSADBW | + Opcode::VPSHLDD | + Opcode::VPSHLDQ | + Opcode::VPSHLDVD | + Opcode::VPSHLDVQ | + Opcode::VPSHLDVW | + Opcode::VPSHLDW | + Opcode::VPSHRDD | + Opcode::VPSHRDQ | + Opcode::VPSHRDVD | + Opcode::VPSHRDVQ | + Opcode::VPSHRDVW | + Opcode::VPSHRDW | + Opcode::VPSHUFBITQMB | + Opcode::VPSIGNB | + Opcode::VPSIGND | + Opcode::VPSIGNW | + Opcode::VPSLLD | + Opcode::VPSLLDQ | + Opcode::VPSLLQ | + Opcode::VPSLLVD | + Opcode::VPSLLVQ | + Opcode::VPSLLVW | + Opcode::VPSLLW | + Opcode::VPSRAD | + Opcode::VPSRAQ | + Opcode::VPSRAVD | + Opcode::VPSRAVQ | + Opcode::VPSRAVW | + Opcode::VPSRAW | + Opcode::VPSRLD | + Opcode::VPSRLDQ | + Opcode::VPSRLQ | + Opcode::VPSRLVD | + Opcode::VPSRLVQ | + Opcode::VPSRLVW | + Opcode::VPSRLW | + Opcode::VPSUBB | + Opcode::VPSUBD | + Opcode::VPSUBQ | + Opcode::VPSUBSB | + Opcode::VPSUBSW | + Opcode::VPSUBUSB | + Opcode::VPSUBUSW | + Opcode::VPSUBW | + Opcode::VPXOR | + Opcode::VPXORD | + Opcode::VPXORQ | + Opcode::VRCP14PD | + Opcode::VRCP14PS | + Opcode::VRCP14SD | + Opcode::VRCP14SS | + Opcode::VRCP28PD | + Opcode::VRCP28PS | + Opcode::VRCP28SD | + Opcode::VRCP28SS | + Opcode::VRCPPS | + Opcode::VRCPSS | + Opcode::VRNDSCALEPD | + Opcode::VRNDSCALEPS | + Opcode::VRNDSCALESD | + Opcode::VRNDSCALESS | + Opcode::VROUNDPD | + Opcode::VROUNDPS | + Opcode::VROUNDSD | + Opcode::VROUNDSS | + Opcode::VRSQRT14PD | + Opcode::VRSQRT14PS | + Opcode::VRSQRT14SD | + Opcode::VRSQRT14SS | + Opcode::VRSQRT28PD | + Opcode::VRSQRT28PS | + Opcode::VRSQRT28SD | + Opcode::VRSQRT28SS | + Opcode::VRSQRTPS | + Opcode::VRSQRTSS | + Opcode::VSCALEDPD | + Opcode::VSCALEDPS | + Opcode::VSCALEDSD | + Opcode::VSCALEDSS | + Opcode::VSCALEFPD | + Opcode::VSCALEFPS | + Opcode::VSCALEFSD | + Opcode::VSCALEFSS | + Opcode::VSQRTPD | + Opcode::VSQRTPS | + Opcode::VSQRTSD | + Opcode::VSQRTSS | + Opcode::VSUBPD | + Opcode::VSUBPS | + Opcode::VSUBSD | + Opcode::VSUBSS | + Opcode::VXORPD | + Opcode::VXORPS | + Opcode::XADD | + Opcode::XOR | + Opcode::XORPD | + Opcode::XORPS => { + write!(out, "{}", colors.arithmetic_op(self)) + } + Opcode::Invalid | + Opcode::UD0 | + Opcode::UD1 | + Opcode::UD2 => { + write!(out, "{}", colors.invalid_op(self)) + } + Opcode::HLT | + Opcode::INT | + Opcode::INTO | + Opcode::IRET | + Opcode::IRETD | + Opcode::IRETQ | + Opcode::RETF | + Opcode::RETURN => { + write!(out, "{}", colors.stop_op(self)) + } + Opcode::AESDEC | + Opcode::AESDEC128KL | + Opcode::AESDEC256KL | + Opcode::AESDECLAST | + Opcode::AESDECWIDE128KL | + Opcode::AESDECWIDE256KL | + Opcode::AESENC | + Opcode::AESENC128KL | + Opcode::AESENC256KL | + Opcode::AESENCLAST | + Opcode::AESENCWIDE128KL | + Opcode::AESENCWIDE256KL | + Opcode::AESIMC | + Opcode::AESKEYGENASSIST | + Opcode::CLRSSBSY | + Opcode::CRC32 | + Opcode::ENCODEKEY128 | + Opcode::ENCODEKEY256 | + Opcode::ENDBR32 | + Opcode::ENDBR64 | + Opcode::FDECSTP | + Opcode::FFREE | + Opcode::FFREEP | + Opcode::FINCSTP | + Opcode::GF2P8AFFINEINVQB | + Opcode::GF2P8AFFINEQB | + Opcode::GF2P8MULB | + Opcode::HRESET | + Opcode::INCSSP | + Opcode::LOADIWKEY | + Opcode::RDRAND | + Opcode::RDSEED | + Opcode::RSTORSSP | + Opcode::SAVEPREVSSP | + Opcode::SETSSBSY | + Opcode::SHA1MSG1 | + Opcode::SHA1MSG2 | + Opcode::SHA1NEXTE | + Opcode::SHA1RNDS4 | + Opcode::SHA256MSG1 | + Opcode::SHA256MSG2 | + Opcode::SHA256RNDS2 | + Opcode::VAESDEC | + Opcode::VAESDECLAST | + Opcode::VAESENC | + Opcode::VAESENCLAST | + Opcode::VAESIMC | + Opcode::VAESKEYGENASSIST | + Opcode::WRSS | + Opcode::WRUSS => { + write!(out, "{}", colors.misc_op(self)) + } + Opcode::CALL | + Opcode::CALLF | + Opcode::JA | + Opcode::JB | + Opcode::JCXZ | + Opcode::JECXZ | + Opcode::JG | + Opcode::JGE | + Opcode::JL | + Opcode::JLE | + Opcode::JMP | + Opcode::JMPF | + Opcode::JNA | + Opcode::JNB | + Opcode::JNO | + Opcode::JNP | + Opcode::JNS | + Opcode::JNZ | + Opcode::JO | + Opcode::JP | + Opcode::JRCXZ | + Opcode::JS | + Opcode::JZ | + Opcode::LOOP | + Opcode::LOOPNZ | + Opcode::LOOPZ => { + write!(out, "{}", colors.control_flow_op(self)) + } + } + } +} + pub(crate) mod real_mode { use crate::generated::real_mode::Opcode; use crate::real_mode::{InstDecoder, Instruction, DecodeError}; + + use yaxpeax_arch::{Colorize, YaxColors}; + use core::fmt; impl InstDecoder { fn feature_sgx(&self) -> bool { true @@ -321,6 +1794,16 @@ pub(crate) mod real_mode { true } } + impl<T: fmt::Write, Y: YaxColors> Colorize<T, Y> for Opcode { + fn colorize(&self, colors: &Y, out: &mut T) -> fmt::Result { + self.to_generic().colorize(colors, out) + } + } + impl Opcode { + pub(crate) fn name(&self) -> &'static str { + self.to_generic().name() + } + } pub(crate) fn revise_instruction(decoder: &InstDecoder, inst: &mut Instruction) -> Result<(), DecodeError> { if inst.prefixes.evex().is_some() { if !decoder.avx512() { @@ -359,7 +1842,6 @@ pub(crate) mod real_mode { } } - Opcode::VPMAXUB | Opcode::VPMAXUB => { if !decoder.feature_avx_unimplemented() { return Err(DecodeError::InvalidOpcode); @@ -2416,6 +3898,9 @@ pub(crate) mod real_mode { pub(crate) mod protected_mode { use crate::generated::protected_mode::Opcode; use crate::protected_mode::{InstDecoder, Instruction, DecodeError}; + + use yaxpeax_arch::{Colorize, YaxColors}; + use core::fmt; impl InstDecoder { fn feature_sgx(&self) -> bool { true @@ -2736,6 +4221,16 @@ pub(crate) mod protected_mode { true } } + impl<T: fmt::Write, Y: YaxColors> Colorize<T, Y> for Opcode { + fn colorize(&self, colors: &Y, out: &mut T) -> fmt::Result { + self.to_generic().colorize(colors, out) + } + } + impl Opcode { + pub(crate) fn name(&self) -> &'static str { + self.to_generic().name() + } + } pub(crate) fn revise_instruction(decoder: &InstDecoder, inst: &mut Instruction) -> Result<(), DecodeError> { if inst.prefixes.evex().is_some() { if !decoder.avx512() { @@ -2774,7 +4269,6 @@ pub(crate) mod protected_mode { } } - Opcode::VPMAXUB | Opcode::VPMAXUB => { if !decoder.feature_avx_unimplemented() { return Err(DecodeError::InvalidOpcode); @@ -4831,6 +6325,9 @@ pub(crate) mod protected_mode { pub(crate) mod long_mode { use crate::generated::long_mode::Opcode; use crate::long_mode::{InstDecoder, Instruction, DecodeError}; + + use yaxpeax_arch::{Colorize, YaxColors}; + use core::fmt; impl InstDecoder { fn feature_sgx(&self) -> bool { true @@ -5157,6 +6654,16 @@ pub(crate) mod long_mode { true } } + impl<T: fmt::Write, Y: YaxColors> Colorize<T, Y> for Opcode { + fn colorize(&self, colors: &Y, out: &mut T) -> fmt::Result { + self.to_generic().colorize(colors, out) + } + } + impl Opcode { + pub(crate) fn name(&self) -> &'static str { + self.to_generic().name() + } + } pub(crate) fn revise_instruction(decoder: &InstDecoder, inst: &mut Instruction) -> Result<(), DecodeError> { if inst.prefixes.evex().is_some() { if !decoder.avx512() { @@ -5195,7 +6702,6 @@ pub(crate) mod long_mode { } } - Opcode::VPMAXUB | Opcode::VPMAXUB => { if !decoder.feature_avx_unimplemented() { return Err(DecodeError::InvalidOpcode); diff --git a/src/generated/opcode.rs b/src/generated/opcode.rs index cc573f1..5fa5892 100644 --- a/src/generated/opcode.rs +++ b/src/generated/opcode.rs @@ -1,3 +1,5 @@ +use crate::safer_unchecked::GetSaferUnchecked; + #[allow(non_camel_case_types)] #[derive(Copy, Clone, Debug, Eq, PartialEq)] #[non_exhaustive] @@ -2874,6 +2876,16 @@ pub(crate) const MNEMONICS: &'static [&'static str] = &[ "xtest", ]; +impl Opcode { + pub(crate) fn name(&self) -> &'static str { + // safety: `MNEMONICS` and `Opcode` are generated together, where every entry in `Opcode` guarantees + // a corresponding entry in `MNEMONICS`. + unsafe { + MNEMONICS.get_kinda_unchecked(*self as usize) + } + } +} + pub(crate) mod real_mode { #[allow(non_camel_case_types)] #[derive(Copy, Clone, Debug, Eq, PartialEq)] @@ -4312,6 +4324,18 @@ pub(crate) mod real_mode { XSUSLDTRK = super::Opcode::XSUSLDTRK as u16, XTEST = super::Opcode::XTEST as u16, } + + impl Opcode { + pub fn to_generic(&self) -> super::Opcode { + // safety: each item in `Self` is defined with the same value in `super::Opcode`. `Self` is + // a subset of `super::Opcode` so casting to the more generic form is well-defined. + unsafe { core::mem::transmute::<Self, super::Opcode>(*self) } + } + + fn nane(&self) -> &'static str { + self.to_generic().name() + } + } } pub(crate) mod protected_mode { @@ -5752,6 +5776,18 @@ pub(crate) mod protected_mode { XSUSLDTRK = super::Opcode::XSUSLDTRK as u16, XTEST = super::Opcode::XTEST as u16, } + + impl Opcode { + pub fn to_generic(&self) -> super::Opcode { + // safety: each item in `Self` is defined with the same value in `super::Opcode`. `Self` is + // a subset of `super::Opcode` so casting to the more generic form is well-defined. + unsafe { core::mem::transmute::<Self, super::Opcode>(*self) } + } + + fn nane(&self) -> &'static str { + self.to_generic().name() + } + } } pub(crate) mod long_mode { @@ -7182,5 +7218,17 @@ pub(crate) mod long_mode { XSUSLDTRK = super::Opcode::XSUSLDTRK as u16, XTEST = super::Opcode::XTEST as u16, } + + impl Opcode { + pub fn to_generic(&self) -> super::Opcode { + // safety: each item in `Self` is defined with the same value in `super::Opcode`. `Self` is + // a subset of `super::Opcode` so casting to the more generic form is well-defined. + unsafe { core::mem::transmute::<Self, super::Opcode>(*self) } + } + + fn nane(&self) -> &'static str { + self.to_generic().name() + } + } } diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index d772b7b..4022c7b 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -350,1452 +350,6 @@ impl fmt::Display for Opcode { } } -impl Opcode { - fn name(&self) -> &'static str { - unsafe { - crate::generated::opcode::MNEMONICS.get_kinda_unchecked(*self as usize) - } - } -} - -impl <T: fmt::Write, Y: YaxColors> Colorize<T, Y> for Opcode { - fn colorize(&self, colors: &Y, out: &mut T) -> fmt::Result { - match self { - Opcode::VGF2P8AFFINEQB | - Opcode::VGF2P8AFFINEINVQB | - Opcode::VPSHRDQ | - Opcode::VPSHRDD | - Opcode::VPSHRDW | - Opcode::VPSHLDQ | - Opcode::VPSHLDD | - Opcode::VPSHLDW | - Opcode::VBROADCASTF32X8 | - Opcode::VBROADCASTF64X4 | - Opcode::VBROADCASTF32X4 | - Opcode::VBROADCASTF64X2 | - Opcode::VBROADCASTF32X2 | - Opcode::VBROADCASTI32X8 | - Opcode::VBROADCASTI64X4 | - Opcode::VBROADCASTI32X4 | - Opcode::VBROADCASTI64X2 | - Opcode::VBROADCASTI32X2 | - Opcode::VEXTRACTI32X8 | - Opcode::VEXTRACTF32X8 | - Opcode::VINSERTI32X8 | - Opcode::VINSERTF32X8 | - Opcode::VINSERTI32X4 | - Opcode::V4FNMADDSS | - Opcode::V4FNMADDPS | - Opcode::VCVTNEPS2BF16 | - Opcode::V4FMADDSS | - Opcode::V4FMADDPS | - Opcode::VCVTNE2PS2BF16 | - Opcode::VP2INTERSECTD | - Opcode::VP2INTERSECTQ | - Opcode::VP4DPWSSDS | - Opcode::VP4DPWSSD | - Opcode::VPDPWSSDS | - Opcode::VPDPWSSD | - Opcode::VPDPBUSDS | - Opcode::VDPBF16PS | - Opcode::VPBROADCASTMW2D | - Opcode::VPBROADCASTMB2Q | - Opcode::VPMOVD2M | - Opcode::VPMOVQD | - Opcode::VPMOVWB | - Opcode::VPMOVDB | - Opcode::VPMOVDW | - Opcode::VPMOVQB | - Opcode::VPMOVQW | - Opcode::VGF2P8MULB | - Opcode::VPMADD52HUQ | - Opcode::VPMADD52LUQ | - Opcode::VPSHUFBITQMB | - Opcode::VPERMB | - Opcode::VPEXPANDD | - Opcode::VPEXPANDQ | - Opcode::VPABSQ | - Opcode::VPRORVD | - Opcode::VPRORVQ | - Opcode::VPMULTISHIFTQB | - Opcode::VPERMT2B | - Opcode::VPERMT2W | - Opcode::VPSHRDVQ | - Opcode::VPSHRDVD | - Opcode::VPSHRDVW | - Opcode::VPSHLDVQ | - Opcode::VPSHLDVD | - Opcode::VPSHLDVW | - Opcode::VPCOMPRESSB | - Opcode::VPCOMPRESSW | - Opcode::VPEXPANDB | - Opcode::VPEXPANDW | - Opcode::VPOPCNTD | - Opcode::VPOPCNTQ | - Opcode::VPOPCNTB | - Opcode::VPOPCNTW | - Opcode::VSCALEFSS | - Opcode::VSCALEFSD | - Opcode::VSCALEFPS | - Opcode::VSCALEFPD | - Opcode::VPDPBUSD | - Opcode::VCVTUSI2SD | - Opcode::VCVTUSI2SS | - Opcode::VPXORD | - Opcode::VPXORQ | - Opcode::VPORD | - Opcode::VPORQ | - Opcode::VPANDND | - Opcode::VPANDNQ | - Opcode::VPANDD | - Opcode::VPANDQ | - - Opcode::VHADDPS | - Opcode::VHSUBPS | - Opcode::VADDSUBPS | - Opcode::VADDPD | - Opcode::VADDPS | - Opcode::VADDSD | - Opcode::VADDSS | - Opcode::VADDSUBPD | - Opcode::VFMADD132PD | - Opcode::VFMADD132PS | - Opcode::VFMADD132SD | - Opcode::VFMADD132SS | - Opcode::VFMADD213PD | - Opcode::VFMADD213PS | - Opcode::VFMADD213SD | - Opcode::VFMADD213SS | - Opcode::VFMADD231PD | - Opcode::VFMADD231PS | - Opcode::VFMADD231SD | - Opcode::VFMADD231SS | - Opcode::VFMADDSUB132PD | - Opcode::VFMADDSUB132PS | - Opcode::VFMADDSUB213PD | - Opcode::VFMADDSUB213PS | - Opcode::VFMADDSUB231PD | - Opcode::VFMADDSUB231PS | - Opcode::VFMSUB132PD | - Opcode::VFMSUB132PS | - Opcode::VFMSUB132SD | - Opcode::VFMSUB132SS | - Opcode::VFMSUB213PD | - Opcode::VFMSUB213PS | - Opcode::VFMSUB213SD | - Opcode::VFMSUB213SS | - Opcode::VFMSUB231PD | - Opcode::VFMSUB231PS | - Opcode::VFMSUB231SD | - Opcode::VFMSUB231SS | - Opcode::VFMSUBADD132PD | - Opcode::VFMSUBADD132PS | - Opcode::VFMSUBADD213PD | - Opcode::VFMSUBADD213PS | - Opcode::VFMSUBADD231PD | - Opcode::VFMSUBADD231PS | - Opcode::VFNMADD132PD | - Opcode::VFNMADD132PS | - Opcode::VFNMADD132SD | - Opcode::VFNMADD132SS | - Opcode::VFNMADD213PD | - Opcode::VFNMADD213PS | - Opcode::VFNMADD213SD | - Opcode::VFNMADD213SS | - Opcode::VFNMADD231PD | - Opcode::VFNMADD231PS | - Opcode::VFNMADD231SD | - Opcode::VFNMADD231SS | - Opcode::VFNMSUB132PD | - Opcode::VFNMSUB132PS | - Opcode::VFNMSUB132SD | - Opcode::VFNMSUB132SS | - Opcode::VFNMSUB213PD | - Opcode::VFNMSUB213PS | - Opcode::VFNMSUB213SD | - Opcode::VFNMSUB213SS | - Opcode::VFNMSUB231PD | - Opcode::VFNMSUB231PS | - Opcode::VFNMSUB231SD | - Opcode::VFNMSUB231SS | - Opcode::VDIVPD | - Opcode::VDIVPS | - Opcode::VDIVSD | - Opcode::VDIVSS | - Opcode::VHADDPD | - Opcode::VHSUBPD | - Opcode::HADDPD | - Opcode::HSUBPD | - Opcode::VMULPD | - Opcode::VMULPS | - Opcode::VMULSD | - Opcode::VMULSS | - Opcode::VPABSB | - Opcode::VPABSD | - Opcode::VPABSW | - Opcode::PABSB | - Opcode::PABSD | - Opcode::PABSW | - Opcode::VPSIGNB | - Opcode::VPSIGND | - Opcode::VPSIGNW | - Opcode::PSIGNB | - Opcode::PSIGND | - Opcode::PSIGNW | - Opcode::VPADDB | - Opcode::VPADDD | - Opcode::VPADDQ | - Opcode::VPADDSB | - Opcode::VPADDSW | - Opcode::VPADDUSB | - Opcode::VPADDUSW | - Opcode::VPADDW | - Opcode::VPAVGB | - Opcode::VPAVGW | - Opcode::VPMULDQ | - Opcode::VPMULHRSW | - Opcode::VPMULHUW | - Opcode::VPMULHW | - Opcode::VPMULLQ | - Opcode::VPMULLD | - Opcode::VPMULLW | - Opcode::VPMULUDQ | - Opcode::PCLMULQDQ | - Opcode::PMULDQ | - Opcode::PMULHRSW | - Opcode::PMULLD | - Opcode::VPSUBB | - Opcode::VPSUBD | - Opcode::VPSUBQ | - Opcode::VPSUBSB | - Opcode::VPSUBSW | - Opcode::VPSUBUSB | - Opcode::VPSUBUSW | - Opcode::VPSUBW | - Opcode::VROUNDPD | - Opcode::VROUNDPS | - Opcode::VEXP2PD | - Opcode::VEXP2PS | - Opcode::VEXP2SD | - Opcode::VEXP2SS | - Opcode::VRCP28PD | - Opcode::VRCP28PS | - Opcode::VRCP28SD | - Opcode::VRCP28SS | - Opcode::VRCP14PD | - Opcode::VRCP14PS | - Opcode::VRCP14SD | - Opcode::VRCP14SS | - Opcode::VRNDSCALEPD | - Opcode::VRNDSCALEPS | - Opcode::VRNDSCALESD | - Opcode::VRNDSCALESS | - Opcode::VRSQRT14PD | - Opcode::VRSQRT14PS | - Opcode::VRSQRT14SD | - Opcode::VRSQRT14SS | - Opcode::VSCALEDPD | - Opcode::VSCALEDPS | - Opcode::VSCALEDSD | - Opcode::VSCALEDSS | - Opcode::VRSQRT28PD | - Opcode::VRSQRT28PS | - Opcode::VRSQRT28SD | - Opcode::VRSQRT28SS | - Opcode::VRSQRTPS | - Opcode::VSQRTPD | - Opcode::VSQRTPS | - Opcode::VSUBPD | - Opcode::VSUBPS | - Opcode::VSUBSD | - Opcode::VSUBSS | - Opcode::VRCPSS | - Opcode::VROUNDSD | - Opcode::VROUNDSS | - Opcode::ROUNDPD | - Opcode::ROUNDPS | - Opcode::ROUNDSD | - Opcode::ROUNDSS | - Opcode::VRSQRTSS | - Opcode::VSQRTSD | - Opcode::VSQRTSS | - Opcode::VPSADBW | - Opcode::VMPSADBW | - Opcode::VDBPSADBW | - Opcode::VPHADDD | - Opcode::VPHADDSW | - Opcode::VPHADDW | - Opcode::VPHSUBD | - Opcode::VPHSUBSW | - Opcode::VPHSUBW | - Opcode::VPMADDUBSW | - Opcode::VPMADDWD | - Opcode::VDPPD | - Opcode::VDPPS | - Opcode::VRCPPS | - Opcode::VORPD | - Opcode::VORPS | - Opcode::VANDPD | - Opcode::VANDPS | - Opcode::VANDNPD | - Opcode::VANDNPS | - Opcode::VPAND | - Opcode::VPANDN | - Opcode::VPOR | - Opcode::VPXOR | - Opcode::VXORPD | - Opcode::VXORPS | - Opcode::VPSLLD | - Opcode::VPSLLDQ | - Opcode::VPSLLQ | - Opcode::VPSLLVD | - Opcode::VPSLLVQ | - Opcode::VPSLLW | - Opcode::VPROLD | - Opcode::VPROLQ | - Opcode::VPROLVD | - Opcode::VPROLVQ | - Opcode::VPRORD | - Opcode::VPRORQ | - Opcode::VPRORRD | - Opcode::VPRORRQ | - Opcode::VPSLLVW | - Opcode::VPSRAQ | - Opcode::VPSRAVQ | - Opcode::VPSRAVW | - Opcode::VPSRLVW | - Opcode::VPSRAD | - Opcode::VPSRAVD | - Opcode::VPSRAW | - Opcode::VPSRLD | - Opcode::VPSRLDQ | - Opcode::VPSRLQ | - Opcode::VPSRLVD | - Opcode::VPSRLVQ | - Opcode::VPSRLW | - Opcode::PHADDD | - Opcode::PHADDSW | - Opcode::PHADDW | - Opcode::PHSUBD | - Opcode::PHSUBSW | - Opcode::PHSUBW | - Opcode::PMADDUBSW | - Opcode::ADDSUBPD | - Opcode::DPPS | - Opcode::DPPD | - Opcode::MPSADBW | - Opcode::RCPSS | - Opcode::RSQRTSS | - Opcode::SQRTSD | - Opcode::ADDSD | - Opcode::SUBSD | - Opcode::MULSD | - Opcode::DIVSD | - Opcode::SQRTSS | - Opcode::ADDSS | - Opcode::SUBSS | - Opcode::MULSS | - Opcode::DIVSS | - Opcode::HADDPS | - Opcode::HSUBPS | - Opcode::ADDSUBPS | - Opcode::PMULHRW | - Opcode::PFRCP | - Opcode::PFRSQRT | - Opcode::PFSUB | - Opcode::PFADD | - Opcode::PFRCPIT1 | - Opcode::PFRSQIT1 | - Opcode::PFSUBR | - Opcode::PFACC | - Opcode::PFMUL | - Opcode::PFMULHRW | - Opcode::PFRCPIT2 | - Opcode::PFNACC | - Opcode::PFPNACC | - Opcode::PSWAPD | - Opcode::PAVGUSB | - Opcode::XADD| - Opcode::DIV | - Opcode::IDIV | - Opcode::MUL | - Opcode::MULX | - Opcode::NEG | - Opcode::NOT | - Opcode::SAR | - Opcode::SAL | - Opcode::SHR | - Opcode::SARX | - Opcode::SHLX | - Opcode::SHRX | - Opcode::SHRD | - Opcode::SHL | - Opcode::RCR | - Opcode::RCL | - Opcode::ROR | - Opcode::RORX | - Opcode::ROL | - Opcode::INC | - Opcode::DEC | - Opcode::SBB | - Opcode::AND | - Opcode::XOR | - Opcode::OR | - Opcode::LEA | - Opcode::ADD | - Opcode::ADC | - Opcode::ADCX | - Opcode::ADOX | - Opcode::SUB | - Opcode::POPCNT | - Opcode::LZCNT | - Opcode::VPLZCNTD | - Opcode::VPLZCNTQ | - Opcode::BT | - Opcode::BTS | - Opcode::BTR | - Opcode::BTC | - Opcode::BSF | - Opcode::BSR | - Opcode::BZHI | - Opcode::PDEP | - Opcode::PEXT | - Opcode::TZCNT | - Opcode::ANDN | - Opcode::BEXTR | - Opcode::BLSI | - Opcode::BLSMSK | - Opcode::BLSR | - Opcode::ADDPS | - Opcode::ADDPD | - Opcode::ANDNPS | - Opcode::ANDNPD | - Opcode::ANDPS | - Opcode::ANDPD | - Opcode::COMISD | - Opcode::COMISS | - Opcode::DIVPS | - Opcode::DIVPD | - Opcode::MULPS | - Opcode::MULPD | - Opcode::ORPS | - Opcode::ORPD | - Opcode::PADDB | - Opcode::PADDD | - Opcode::PADDQ | - Opcode::PADDSB | - Opcode::PADDSW | - Opcode::PADDUSB | - Opcode::PADDUSW | - Opcode::PADDW | - Opcode::PAND | - Opcode::PANDN | - Opcode::PAVGB | - Opcode::PAVGW | - Opcode::PMADDWD | - Opcode::PMULHUW | - Opcode::PMULHW | - Opcode::PMULLW | - Opcode::PMULUDQ | - Opcode::POR | - Opcode::PSADBW | - Opcode::PSHUFD | - Opcode::PSHUFW | - Opcode::PSHUFB | - Opcode::PSLLD | - Opcode::PSLLDQ | - Opcode::PSLLQ | - Opcode::PSLLW | - Opcode::PSRAD | - Opcode::PSRAW | - Opcode::PSRLD | - Opcode::PSRLDQ | - Opcode::PSRLQ | - Opcode::PSRLW | - Opcode::PSUBB | - Opcode::PSUBD | - Opcode::PSUBQ | - Opcode::PSUBSB | - Opcode::PSUBSW | - Opcode::PSUBUSB | - Opcode::PSUBUSW | - Opcode::PSUBW | - Opcode::PXOR | - Opcode::RSQRTPS | - Opcode::SQRTPS | - Opcode::SQRTPD | - Opcode::SUBPS | - Opcode::SUBPD | - Opcode::XORPS | - Opcode::XORPD | - Opcode::RCPPS | - Opcode::SHLD | - Opcode::SLHD | - Opcode::UCOMISD | - Opcode::UCOMISS | - Opcode::F2XM1 | - Opcode::FABS | - Opcode::FADD | - Opcode::FADDP | - Opcode::FCHS | - Opcode::FCOS | - Opcode::FDIV | - Opcode::FDIVP | - Opcode::FDIVR | - Opcode::FDIVRP | - Opcode::FIADD | - Opcode::FIDIV | - Opcode::FIDIVR | - Opcode::FIMUL | - Opcode::FISUB | - Opcode::FISUBR | - Opcode::FMUL | - Opcode::FMULP | - Opcode::FNCLEX | - Opcode::FNINIT | - Opcode::FPATAN | - Opcode::FPREM | - Opcode::FPREM1 | - Opcode::FPTAN | - Opcode::FRNDINT | - Opcode::FSCALE | - Opcode::FSIN | - Opcode::FSINCOS | - Opcode::FSQRT | - Opcode::FSUB | - Opcode::FSUBP | - Opcode::FSUBR | - Opcode::FSUBRP | - Opcode::FXTRACT | - Opcode::FYL2X | - Opcode::FYL2XP1 | - Opcode::KADDB | - Opcode::KANDB | - Opcode::KANDNB | - Opcode::KNOTB | - Opcode::KORB | - Opcode::KSHIFTLB | - Opcode::KSHIFTRB | - Opcode::KXNORB | - Opcode::KXORB | - Opcode::KADDW | - Opcode::KANDW | - Opcode::KANDNW | - Opcode::KNOTW | - Opcode::KORW | - Opcode::KSHIFTLW | - Opcode::KSHIFTRW | - Opcode::KXNORW | - Opcode::KXORW | - Opcode::KADDD | - Opcode::KANDD | - Opcode::KANDND | - Opcode::KNOTD | - Opcode::KORD | - Opcode::KSHIFTLD | - Opcode::KSHIFTRD | - Opcode::KXNORD | - Opcode::KXORD | - Opcode::KADDQ | - Opcode::KANDQ | - Opcode::KANDNQ | - Opcode::KNOTQ | - Opcode::KORQ | - Opcode::KSHIFTLQ | - Opcode::KSHIFTRQ | - Opcode::KXNORQ | - Opcode::KXORQ | - Opcode::IMUL => { write!(out, "{}", colors.arithmetic_op(self)) } - Opcode::POPF | - Opcode::PUSHF | - Opcode::ENTER | - Opcode::LEAVE | - Opcode::PUSH | - Opcode::POP => { write!(out, "{}", colors.stack_op(self)) } - Opcode::WAIT | - Opcode::FNOP | - Opcode::FDISI8087_NOP | - Opcode::FENI8087_NOP | - Opcode::FSETPM287_NOP | - Opcode::PREFETCHNTA | - Opcode::PREFETCH0 | - Opcode::PREFETCH1 | - Opcode::PREFETCH2 | - Opcode::PREFETCHW | - Opcode::NOP => { write!(out, "{}", colors.nop_op(self)) } - - /* Control flow */ - Opcode::HLT | - Opcode::INT | - Opcode::INTO | - Opcode::IRET | - Opcode::IRETD | - Opcode::IRETQ | - Opcode::RETF | - Opcode::RETURN => { write!(out, "{}", colors.stop_op(self)) } - Opcode::LOOPNZ | - Opcode::LOOPZ | - Opcode::LOOP | - Opcode::JRCXZ | - Opcode::CALL | - Opcode::CALLF | - Opcode::JMP | - Opcode::JMPF | - Opcode::JO | - Opcode::JNO | - Opcode::JB | - Opcode::JNB | - Opcode::JZ | - Opcode::JNZ | - Opcode::JA | - Opcode::JNA | - Opcode::JS | - Opcode::JNS | - Opcode::JP | - Opcode::JNP | - Opcode::JL | - Opcode::JGE | - Opcode::JLE | - Opcode::JG => { write!(out, "{}", colors.control_flow_op(self)) } - - /* Data transfer */ - Opcode::PI2FW | - Opcode::PI2FD | - Opcode::PF2ID | - Opcode::PF2IW | - Opcode::VCVTDQ2PD | - Opcode::VCVTDQ2PS | - Opcode::VCVTPD2DQ | - Opcode::VCVTPD2PS | - Opcode::VCVTPH2PS | - Opcode::VCVTPS2DQ | - Opcode::VCVTPS2PD | - Opcode::VCVTPS2PH | - Opcode::VCVTTPD2DQ | - Opcode::VCVTTPS2DQ | - Opcode::VCVTSD2SI | - Opcode::VCVTSD2SS | - Opcode::VCVTSI2SD | - Opcode::VCVTSI2SS | - Opcode::VCVTSS2SD | - Opcode::VCVTSS2SI | - Opcode::VCVTTSD2SI | - Opcode::VCVTTSS2SI | - Opcode::VCVTPD2UDQ | - Opcode::VCVTTPD2UDQ | - Opcode::VCVTPS2UDQ | - Opcode::VCVTTPS2UDQ | - Opcode::VCVTQQ2PD | - Opcode::VCVTQQ2PS | - Opcode::VCVTSD2USI | - Opcode::VCVTTSD2USI | - Opcode::VCVTSS2USI | - Opcode::VCVTTSS2USI | - Opcode::VCVTUDQ2PD | - Opcode::VCVTUDQ2PS | - Opcode::VCVTUSI2USD | - Opcode::VCVTUSI2USS | - Opcode::VCVTTPD2QQ | - Opcode::VCVTPD2QQ | - Opcode::VCVTTPD2UQQ | - Opcode::VCVTPD2UQQ | - Opcode::VCVTTPS2QQ | - Opcode::VCVTPS2QQ | - Opcode::VCVTTPS2UQQ | - Opcode::VCVTPS2UQQ | - Opcode::VCVTUQQ2PD | - Opcode::VCVTUQQ2PS | - Opcode::VMOVDDUP | - Opcode::VPSHUFLW | - Opcode::VPSHUFHW | - Opcode::VBLENDMPD | - Opcode::VBLENDMPS | - Opcode::VPBLENDMD | - Opcode::VPBLENDMQ | - Opcode::VBLENDPD | - Opcode::VBLENDPS | - Opcode::VBLENDVPD | - Opcode::VBLENDVPS | - Opcode::VPBLENDMB | - Opcode::VPBLENDMW | - Opcode::PBLENDVB | - Opcode::PBLENDW | - Opcode::BLENDPD | - Opcode::BLENDPS | - Opcode::BLENDVPD | - Opcode::BLENDVPS | - Opcode::BLENDW | - Opcode::VBROADCASTF128 | - Opcode::VBROADCASTI128 | - Opcode::VBROADCASTSD | - Opcode::VBROADCASTSS | - Opcode::VPBROADCASTM | - Opcode::VEXTRACTF128 | - Opcode::VEXTRACTI128 | - Opcode::VEXTRACTPS | - Opcode::EXTRACTPS | - Opcode::VGATHERDPD | - Opcode::VGATHERDPS | - Opcode::VGATHERQPD | - Opcode::VGATHERQPS | - Opcode::VGATHERPF0DPD | - Opcode::VGATHERPF0DPS | - Opcode::VGATHERPF0QPD | - Opcode::VGATHERPF0QPS | - Opcode::VGATHERPF1DPD | - Opcode::VGATHERPF1DPS | - Opcode::VGATHERPF1QPD | - Opcode::VGATHERPF1QPS | - Opcode::VSCATTERDD | - Opcode::VSCATTERDQ | - Opcode::VSCATTERQD | - Opcode::VSCATTERQQ | - Opcode::VSCATTERDPS | - Opcode::VSCATTERDPD | - Opcode::VSCATTERQPS | - Opcode::VSCATTERQPD | - Opcode::VPSCATTERDD | - Opcode::VPSCATTERDQ | - Opcode::VPSCATTERQD | - Opcode::VPSCATTERQQ | - Opcode::VSCATTERPF0DPD | - Opcode::VSCATTERPF0DPS | - Opcode::VSCATTERPF0QPD | - Opcode::VSCATTERPF0QPS | - Opcode::VSCATTERPF1DPD | - Opcode::VSCATTERPF1DPS | - Opcode::VSCATTERPF1QPD | - Opcode::VSCATTERPF1QPS | - Opcode::VINSERTF128 | - Opcode::VINSERTI128 | - Opcode::VINSERTPS | - Opcode::INSERTPS | - Opcode::VEXTRACTF32X4 | - Opcode::VEXTRACTF64X2 | - Opcode::VEXTRACTF64X4 | - Opcode::VEXTRACTI32X4 | - Opcode::VEXTRACTI64X2 | - Opcode::VEXTRACTI64X4 | - Opcode::VINSERTF32X4 | - Opcode::VINSERTF64X2 | - Opcode::VINSERTF64X4 | - Opcode::VINSERTI64X2 | - Opcode::VINSERTI64X4 | - Opcode::VSHUFF32X4 | - Opcode::VSHUFF64X2 | - Opcode::VSHUFI32X4 | - Opcode::VSHUFI64X2 | - Opcode::VMASKMOVDQU | - Opcode::VMASKMOVPD | - Opcode::VMASKMOVPS | - Opcode::VMOVAPD | - Opcode::VMOVAPS | - Opcode::VMOVD | - Opcode::VMOVDQA | - Opcode::VMOVDQU | - Opcode::VMOVHLPS | - Opcode::VMOVHPD | - Opcode::VMOVHPS | - Opcode::VMOVLHPS | - Opcode::VMOVLPD | - Opcode::VMOVLPS | - Opcode::VMOVMSKPD | - Opcode::VMOVMSKPS | - Opcode::VMOVNTDQ | - Opcode::VMOVNTDQA | - Opcode::VMOVNTPD | - Opcode::VMOVNTPS | - Opcode::MOVDIR64B | - Opcode::MOVDIRI | - Opcode::MOVNTDQA | - Opcode::VMOVQ | - Opcode::VMOVSHDUP | - Opcode::VMOVSLDUP | - Opcode::VMOVUPD | - Opcode::VMOVUPS | - Opcode::VMOVSD | - Opcode::VMOVSS | - Opcode::VMOVDQA32 | - Opcode::VMOVDQA64 | - Opcode::VMOVDQU32 | - Opcode::VMOVDQU64 | - Opcode::VPMOVM2B | - Opcode::VPMOVM2W | - Opcode::VPMOVB2M | - Opcode::VPMOVW2M | - Opcode::VPMOVSWB | - Opcode::VPMOVUSWB | - Opcode::VPMOVSQB | - Opcode::VPMOVUSQB | - Opcode::VPMOVSQW | - Opcode::VPMOVUSQW | - Opcode::VPMOVSQD | - Opcode::VPMOVUSQD | - Opcode::VPMOVSDB | - Opcode::VPMOVUSDB | - Opcode::VPMOVSDW | - Opcode::VPMOVUSDW | - Opcode::VPMOVM2D | - Opcode::VPMOVM2Q | - Opcode::VPMOVB2D | - Opcode::VPMOVQ2M | - Opcode::VMOVDQU8 | - Opcode::VMOVDQU16 | - - Opcode::VPBLENDD | - Opcode::VPBLENDVB | - Opcode::VPBLENDW | - Opcode::VPBROADCASTB | - Opcode::VPBROADCASTD | - Opcode::VPBROADCASTQ | - Opcode::VPBROADCASTW | - Opcode::VPGATHERDD | - Opcode::VPGATHERDQ | - Opcode::VPGATHERQD | - Opcode::VPGATHERQQ | - Opcode::VPCLMULQDQ | - Opcode::VPMOVMSKB | - Opcode::VPMOVSXBD | - Opcode::VPMOVSXBQ | - Opcode::VPMOVSXBW | - Opcode::VPMOVSXDQ | - Opcode::VPMOVSXWD | - Opcode::VPMOVSXWQ | - Opcode::VPMOVZXBD | - Opcode::VPMOVZXBQ | - Opcode::VPMOVZXBW | - Opcode::VPMOVZXDQ | - Opcode::VPMOVZXWD | - Opcode::VPMOVZXWQ | - Opcode::PMOVSXBD | - Opcode::PMOVSXBQ | - Opcode::PMOVSXBW | - Opcode::PMOVSXDQ | - Opcode::PMOVSXWD | - Opcode::PMOVSXWQ | - Opcode::PMOVZXBD | - Opcode::PMOVZXBQ | - Opcode::PMOVZXBW | - Opcode::PMOVZXDQ | - Opcode::PMOVZXWD | - Opcode::PMOVZXWQ | - Opcode::KUNPCKBW | - Opcode::KUNPCKWD | - Opcode::KUNPCKDQ | - Opcode::VUNPCKHPD | - Opcode::VUNPCKHPS | - Opcode::VUNPCKLPD | - Opcode::VUNPCKLPS | - Opcode::VPUNPCKHBW | - Opcode::VPUNPCKHDQ | - Opcode::VPUNPCKHQDQ | - Opcode::VPUNPCKHWD | - Opcode::VPUNPCKLBW | - Opcode::VPUNPCKLDQ | - Opcode::VPUNPCKLQDQ | - Opcode::VPUNPCKLWD | - Opcode::VSHUFPD | - Opcode::VSHUFPS | - Opcode::VPACKSSDW | - Opcode::VPACKUSDW | - Opcode::PACKUSDW | - Opcode::VPACKSSWB | - Opcode::VPACKUSWB | - Opcode::VALIGND | - Opcode::VALIGNQ | - Opcode::VPALIGNR | - Opcode::PALIGNR | - Opcode::VPERM2F128 | - Opcode::VPERM2I128 | - Opcode::VPERMD | - Opcode::VPERMILPD | - Opcode::VPERMILPS | - Opcode::VPERMPD | - Opcode::VPERMPS | - Opcode::VPERMQ | - Opcode::VPERMI2D | - Opcode::VPERMI2Q | - Opcode::VPERMI2PD | - Opcode::VPERMI2PS | - Opcode::VPERMT2D | - Opcode::VPERMT2Q | - Opcode::VPERMT2PD | - Opcode::VPERMT2PS | - Opcode::VPERMI2B | - Opcode::VPERMI2W | - Opcode::VPERMW | - Opcode::VPEXTRB | - Opcode::VPEXTRD | - Opcode::VPEXTRQ | - Opcode::VPEXTRW | - Opcode::PEXTRB | - Opcode::PEXTRD | - Opcode::PEXTRQ | - Opcode::EXTRQ | - Opcode::PINSRB | - Opcode::PINSRD | - Opcode::PINSRQ | - Opcode::INSERTQ | - Opcode::VPINSRB | - Opcode::VPINSRD | - Opcode::VPINSRQ | - Opcode::VPINSRW | - Opcode::VPMASKMOVD | - Opcode::VPMASKMOVQ | - Opcode::VCOMPRESSD | - Opcode::VCOMPRESSQ | - Opcode::VCOMPRESSPD | - Opcode::VCOMPRESSPS | - Opcode::VPCOMPRESSQ | - Opcode::VPCOMPRESSD | - Opcode::VEXPANDPD | - Opcode::VEXPANDPS | - Opcode::VPSHUFB | - Opcode::VPSHUFD | - Opcode::VPHMINPOSUW | - Opcode::PHMINPOSUW | - Opcode::VZEROUPPER | - Opcode::VZEROALL | - Opcode::VFIXUPIMMPD | - Opcode::VFIXUPIMMPS | - Opcode::VFIXUPIMMSD | - Opcode::VFIXUPIMMSS | - Opcode::VREDUCEPD | - Opcode::VREDUCEPS | - Opcode::VREDUCESD | - Opcode::VREDUCESS | - Opcode::VGETEXPPD | - Opcode::VGETEXPPS | - Opcode::VGETEXPSD | - Opcode::VGETEXPSS | - Opcode::VGETMANTPD | - Opcode::VGETMANTPS | - Opcode::VGETMANTSD | - Opcode::VGETMANTSS | - Opcode::VLDDQU | - Opcode::BSWAP | - Opcode::CVTDQ2PD | - Opcode::CVTDQ2PS | - Opcode::CVTPS2DQ | - Opcode::CVTPD2DQ | - Opcode::CVTPI2PS | - Opcode::CVTPI2PD | - Opcode::CVTPS2PD | - Opcode::CVTPD2PS | - Opcode::CVTPS2PI | - Opcode::CVTPD2PI | - Opcode::CVTSD2SI | - Opcode::CVTSD2SS | - Opcode::CVTSI2SD | - Opcode::CVTSI2SS | - Opcode::CVTSS2SD | - Opcode::CVTSS2SI | - Opcode::CVTTPD2DQ | - Opcode::CVTTPS2DQ | - Opcode::CVTTPS2PI | - Opcode::CVTTPD2PI | - Opcode::CVTTSD2SI | - Opcode::CVTTSS2SI | - Opcode::MASKMOVQ | - Opcode::MASKMOVDQU | - Opcode::MOVAPS | - Opcode::MOVAPD | - Opcode::MOVD | - Opcode::MOVHPS | - Opcode::MOVHPD | - Opcode::MOVHLPS | - Opcode::MOVLPS | - Opcode::MOVLPD | - Opcode::MOVLHPS | - Opcode::MOVMSKPS | - Opcode::MOVMSKPD | - Opcode::MOVNTI | - Opcode::MOVNTPS | - Opcode::MOVNTPD | - Opcode::MOVNTSS | - Opcode::MOVNTSD | - Opcode::MOVNTQ | - Opcode::MOVNTDQ | - Opcode::MOVSD | - Opcode::MOVSS | - Opcode::MOVUPD | - Opcode::PSHUFHW | - Opcode::PSHUFLW | - Opcode::PUNPCKHBW | - Opcode::PUNPCKHDQ | - Opcode::PUNPCKHWD | - Opcode::PUNPCKLBW | - Opcode::PUNPCKLDQ | - Opcode::PUNPCKLWD | - Opcode::PUNPCKLQDQ | - Opcode::PUNPCKHQDQ | - Opcode::PACKSSDW | - Opcode::PACKSSWB | - Opcode::PACKUSWB | - Opcode::UNPCKHPS | - Opcode::UNPCKHPD | - Opcode::UNPCKLPS | - Opcode::UNPCKLPD | - Opcode::SHUFPD | - Opcode::SHUFPS | - Opcode::PMOVMSKB | - Opcode::KMOVB | - Opcode::KMOVW | - Opcode::KMOVD | - Opcode::KMOVQ | - Opcode::BNDMOV | - Opcode::LDDQU | - Opcode::CMC | - Opcode::CLC | - Opcode::CLI | - Opcode::CLD | - Opcode::STC | - Opcode::STI | - Opcode::STD | - Opcode::CBW | - Opcode::CWDE | - Opcode::CDQE | - Opcode::CWD | - Opcode::CDQ | - Opcode::CQO | - Opcode::MOVDDUP | - Opcode::MOVSLDUP | - Opcode::MOVDQ2Q | - Opcode::MOVDQU | - Opcode::MOVDQA | - Opcode::MOVQ | - Opcode::MOVQ2DQ | - Opcode::MOVSHDUP | - Opcode::MOVUPS | - Opcode::PEXTRW | - Opcode::PINSRW | - Opcode::MOV | - Opcode::MOVBE | - Opcode::LODS | - Opcode::STOS | - Opcode::LAHF | - Opcode::SAHF | - Opcode::MOVS | - Opcode::INS | - Opcode::IN | - Opcode::OUTS | - Opcode::OUT | - Opcode::MOVZX | - Opcode::MOVSX | - Opcode::MOVSXD | - Opcode::FILD | - Opcode::FBLD | - Opcode::FBSTP | - Opcode::FIST | - Opcode::FISTP | - Opcode::FISTTP | - Opcode::FLD | - Opcode::FLD1 | - Opcode::FLDCW | - Opcode::FLDENV | - Opcode::FLDL2E | - Opcode::FLDL2T | - Opcode::FLDLG2 | - Opcode::FLDLN2 | - Opcode::FLDPI | - Opcode::FLDZ | - Opcode::FST | - Opcode::FSTP | - Opcode::FSTPNCE | - Opcode::FNSAVE | - Opcode::FNSTCW | - Opcode::FNSTENV | - Opcode::FNSTOR | - Opcode::FNSTSW | - Opcode::FRSTOR | - Opcode::FXCH | - Opcode::XCHG | - Opcode::XLAT | - Opcode::CMOVA | - Opcode::CMOVB | - Opcode::CMOVG | - Opcode::CMOVGE | - Opcode::CMOVL | - Opcode::CMOVLE | - Opcode::CMOVNA | - Opcode::CMOVNB | - Opcode::CMOVNO | - Opcode::CMOVNP | - Opcode::CMOVNS | - Opcode::CMOVNZ | - Opcode::CMOVO | - Opcode::CMOVP | - Opcode::CMOVS | - Opcode::CMOVZ | - Opcode::FCMOVB | - Opcode::FCMOVBE | - Opcode::FCMOVE | - Opcode::FCMOVNB | - Opcode::FCMOVNBE | - Opcode::FCMOVNE | - Opcode::FCMOVNU | - Opcode::FCMOVU | - Opcode::SALC | - Opcode::SETO | - Opcode::SETNO | - Opcode::SETB | - Opcode::SETAE | - Opcode::SETZ | - Opcode::SETNZ | - Opcode::SETBE | - Opcode::SETA | - Opcode::SETS | - Opcode::SETNS | - Opcode::SETP | - Opcode::SETNP | - Opcode::SETL | - Opcode::SETGE | - Opcode::SETLE | - Opcode::SETG => { write!(out, "{}", colors.data_op(self)) } - - Opcode::VCOMISD | - Opcode::VCOMISS | - Opcode::VUCOMISD | - Opcode::VUCOMISS | - Opcode::KORTESTB | - Opcode::KTESTB | - Opcode::KORTESTW | - Opcode::KTESTW | - Opcode::KORTESTD | - Opcode::KTESTD | - Opcode::KORTESTQ | - Opcode::KTESTQ | - Opcode::VPTESTNMD | - Opcode::VPTESTNMQ | - Opcode::VPTERNLOGD | - Opcode::VPTERNLOGQ | - Opcode::VPTESTMD | - Opcode::VPTESTMQ | - Opcode::VPTESTNMB | - Opcode::VPTESTNMW | - Opcode::VPTESTMB | - Opcode::VPTESTMW | - Opcode::VPCMPD | - Opcode::VPCMPUD | - Opcode::VPCMPQ | - Opcode::VPCMPUQ | - Opcode::VPCMPB | - Opcode::VPCMPUB | - Opcode::VPCMPW | - Opcode::VPCMPUW | - Opcode::VCMPPD | - Opcode::VCMPPS | - Opcode::VCMPSD | - Opcode::VCMPSS | - Opcode::VMAXPD | - Opcode::VMAXPS | - Opcode::VMAXSD | - Opcode::VMAXSS | - Opcode::VPMAXSQ | - Opcode::VPMAXUQ | - Opcode::VPMINSQ | - Opcode::VPMINUQ | - Opcode::VMINPD | - Opcode::VMINPS | - Opcode::VMINSD | - Opcode::VMINSS | - Opcode::VPCMPEQB | - Opcode::VPCMPEQD | - Opcode::VPCMPEQQ | - Opcode::VPCMPEQW | - Opcode::VPCMPGTB | - Opcode::VPCMPGTD | - Opcode::VPCMPGTQ | - Opcode::VPCMPGTW | - Opcode::VPCMPESTRI | - Opcode::VPCMPESTRM | - Opcode::VPCMPISTRI | - Opcode::VPCMPISTRM | - Opcode::VPMAXSB | - Opcode::VPMAXSD | - Opcode::VPMAXSW | - Opcode::VPMAXUB | - Opcode::VPMAXUW | - Opcode::VPMAXUD | - Opcode::VPMINSB | - Opcode::VPMINSW | - Opcode::VPMINSD | - Opcode::VPMINUB | - Opcode::VPMINUW | - Opcode::VPMINUD | - Opcode::VFPCLASSPD | - Opcode::VFPCLASSPS | - Opcode::VFPCLASSSD | - Opcode::VFPCLASSSS | - Opcode::VRANGEPD | - Opcode::VRANGEPS | - Opcode::VRANGESD | - Opcode::VRANGESS | - Opcode::VPCONFLICTD | - Opcode::VPCONFLICTQ | - Opcode::VPTEST | - Opcode::VTESTPD | - Opcode::VTESTPS | - Opcode::PCMPEQB | - Opcode::PCMPEQD | - Opcode::PCMPEQQ | - Opcode::PCMPEQW | - Opcode::PCMPESTRI | - Opcode::PCMPESTRM | - Opcode::PCMPGTB | - Opcode::PCMPGTD | - Opcode::PCMPGTQ | - Opcode::PCMPGTW | - Opcode::PCMPISTRI | - Opcode::PCMPISTRM | - Opcode::PTEST | - Opcode::MAXPD | - Opcode::MAXPS | - Opcode::MAXSD | - Opcode::MAXSS | - Opcode::MINPD | - Opcode::MINPS | - Opcode::MINSD | - Opcode::MINSS | - Opcode::PMAXSB | - Opcode::PMAXSD | - Opcode::PMAXSW | - Opcode::PMAXUB | - Opcode::PMAXUD | - Opcode::PMAXUW | - Opcode::PMINSB | - Opcode::PMINSD | - Opcode::PMINSW | - Opcode::PMINUB | - Opcode::PMINUD | - Opcode::PMINUW | - Opcode::PFCMPGE | - Opcode::PFMIN | - Opcode::PFCMPGT | - Opcode::PFMAX | - Opcode::PFCMPEQ | - Opcode::CMPS | - Opcode::SCAS | - Opcode::TEST | - Opcode::FTST | - Opcode::FXAM | - Opcode::FUCOM | - Opcode::FUCOMI | - Opcode::FUCOMIP | - Opcode::FUCOMP | - Opcode::FUCOMPP | - Opcode::FCOM | - Opcode::FCOMI | - Opcode::FCOMIP | - Opcode::FCOMP | - Opcode::FCOMPP | - Opcode::FICOM | - Opcode::FICOMP | - Opcode::CMPSD | - Opcode::CMPSS | - Opcode::CMP | - Opcode::CMPPS | - Opcode::CMPPD | - Opcode::CMPXCHG8B | - Opcode::CMPXCHG16B | - Opcode::CMPXCHG => { write!(out, "{}", colors.comparison_op(self)) } - - Opcode::WRMSR | - Opcode::RDMSR | - Opcode::RDTSC | - Opcode::RDPMC | - Opcode::RDPID | - Opcode::RDFSBASE | - Opcode::RDGSBASE | - Opcode::WRFSBASE | - Opcode::WRGSBASE | - Opcode::FXSAVE | - Opcode::FXRSTOR | - Opcode::LDMXCSR | - Opcode::STMXCSR | - Opcode::VLDMXCSR | - Opcode::VSTMXCSR | - Opcode::XSAVE | - Opcode::XSAVEC | - Opcode::XSAVES | - Opcode::XSAVEC64 | - Opcode::XSAVES64 | - Opcode::XRSTOR | - Opcode::XRSTORS | - Opcode::XRSTORS64 | - Opcode::XSAVEOPT | - Opcode::LFENCE | - Opcode::MFENCE | - Opcode::SFENCE | - Opcode::CLFLUSH | - Opcode::CLFLUSHOPT | - Opcode::CLWB | - Opcode::SGDT | - Opcode::SIDT | - Opcode::LGDT | - Opcode::LIDT | - Opcode::SMSW | - Opcode::LMSW | - Opcode::SWAPGS | - Opcode::RDTSCP | - Opcode::INVEPT | - Opcode::INVVPID | - Opcode::INVPCID | - Opcode::INVLPG | - Opcode::INVLPGA | - Opcode::INVLPGB | - Opcode::TLBSYNC | - Opcode::PSMASH | - Opcode::PVALIDATE | - Opcode::RMPADJUST | - Opcode::RMPUPDATE | - Opcode::CPUID | - Opcode::WBINVD | - Opcode::INVD | - Opcode::SYSRET | - Opcode::CLTS | - Opcode::SYSCALL | - Opcode::TDCALL | - Opcode::SEAMRET | - Opcode::SEAMOPS | - Opcode::SEAMCALL | - Opcode::TPAUSE | - Opcode::UMONITOR | - Opcode::UMWAIT | - Opcode::LSL | - Opcode::SLDT | - Opcode::STR | - Opcode::LLDT | - Opcode::LTR | - Opcode::VERR | - Opcode::VERW | - Opcode::JMPE | - Opcode::EMMS | - Opcode::FEMMS | - Opcode::GETSEC | - Opcode::LDS | - Opcode::LES | - Opcode::LFS | - Opcode::LGS | - Opcode::LSS | - Opcode::RSM | - Opcode::SYSENTER | - Opcode::SYSEXIT | - Opcode::VMREAD | - Opcode::VMWRITE | - Opcode::VMCLEAR | - Opcode::VMPTRLD | - Opcode::VMPTRST | - Opcode::VMXON | - Opcode::VMCALL | - Opcode::VMLAUNCH | - Opcode::VMRESUME | - Opcode::VMLOAD | - Opcode::VMMCALL | - Opcode::VMSAVE | - Opcode::VMRUN | - Opcode::VMXOFF | - Opcode::PCONFIG | - Opcode::MONITOR | - Opcode::MWAIT | - Opcode::MONITORX | - Opcode::MWAITX | - Opcode::SKINIT | - Opcode::CLGI | - Opcode::STGI | - Opcode::CLAC | - Opcode::STAC | - Opcode::ENCLS | - Opcode::ENCLV | - Opcode::XGETBV | - Opcode::XSETBV | - Opcode::VMFUNC | - Opcode::XEND | - Opcode::XTEST | - Opcode::XABORT | - Opcode::XBEGIN | - Opcode::ENCLU | - Opcode::RDPKRU | - Opcode::WRPKRU | - Opcode::RDPRU | - Opcode::CLZERO | - Opcode::ENQCMD | - Opcode::ENQCMDS | - Opcode::PTWRITE | - Opcode::UIRET | - Opcode::TESTUI | - Opcode::CLUI | - Opcode::STUI | - Opcode::SENDUIPI | - Opcode::XSUSLDTRK | - Opcode::XRESLDTRK | - Opcode::BNDMK | - Opcode::BNDCL | - Opcode::BNDCU | - Opcode::BNDCN | - Opcode::BNDLDX | - Opcode::BNDSTX | - Opcode::LAR => { write!(out, "{}", colors.platform_op(self)) } - - Opcode::CRC32 | - Opcode::RDSEED | - Opcode::RDRAND | - Opcode::SHA1RNDS4 | - Opcode::SHA1NEXTE | - Opcode::SHA1MSG1 | - Opcode::SHA1MSG2 | - Opcode::SHA256RNDS2 | - Opcode::SHA256MSG1 | - Opcode::SHA256MSG2 | - Opcode::FFREE | - Opcode::FFREEP | - Opcode::FDECSTP | - Opcode::FINCSTP | - Opcode::GF2P8MULB | - Opcode::GF2P8AFFINEQB | - Opcode::GF2P8AFFINEINVQB | - Opcode::AESDEC128KL | - Opcode::AESDEC256KL | - Opcode::AESDECWIDE128KL | - Opcode::AESDECWIDE256KL | - Opcode::AESENC128KL | - Opcode::AESENC256KL | - Opcode::AESENCWIDE128KL | - Opcode::AESENCWIDE256KL | - Opcode::ENCODEKEY128 | - Opcode::ENCODEKEY256 | - Opcode::LOADIWKEY | - Opcode::HRESET | - Opcode::WRUSS | - Opcode::WRSS | - Opcode::INCSSP | - Opcode::SAVEPREVSSP | - Opcode::SETSSBSY | - Opcode::CLRSSBSY | - Opcode::RSTORSSP | - Opcode::ENDBR64 | - Opcode::ENDBR32 | - Opcode::AESDEC | - Opcode::AESDECLAST | - Opcode::AESENC | - Opcode::AESENCLAST | - Opcode::AESIMC | - Opcode::AESKEYGENASSIST | - Opcode::VAESDEC | - Opcode::VAESDECLAST | - Opcode::VAESENC | - Opcode::VAESENCLAST | - Opcode::VAESIMC | - Opcode::VAESKEYGENASSIST => { write!(out, "{}", colors.misc_op(self)) } - - Opcode::UD0 | - Opcode::UD1 | - Opcode::UD2 | - Opcode::Invalid => { write!(out, "{}", colors.invalid_op(self)) } - } - } -} - impl fmt::Display for Instruction { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { self.display_with(DisplayStyle::Intel).colorize(&NoColors, fmt) diff --git a/src/protected_mode/display.rs b/src/protected_mode/display.rs index 9ef531e..41e58d5 100644 --- a/src/protected_mode/display.rs +++ b/src/protected_mode/display.rs @@ -345,1462 +345,6 @@ impl fmt::Display for Opcode { } } -impl Opcode { - fn name(&self) -> &'static str { - unsafe { - crate::generated::opcode::MNEMONICS.get_kinda_unchecked(*self as usize) - } - } -} - -impl <T: fmt::Write, Y: YaxColors> Colorize<T, Y> for Opcode { - fn colorize(&self, colors: &Y, out: &mut T) -> fmt::Result { - match self { - Opcode::VGF2P8AFFINEQB | - Opcode::VGF2P8AFFINEINVQB | - Opcode::VPSHRDQ | - Opcode::VPSHRDD | - Opcode::VPSHRDW | - Opcode::VPSHLDQ | - Opcode::VPSHLDD | - Opcode::VPSHLDW | - Opcode::VBROADCASTF32X8 | - Opcode::VBROADCASTF64X4 | - Opcode::VBROADCASTF32X4 | - Opcode::VBROADCASTF64X2 | - Opcode::VBROADCASTF32X2 | - Opcode::VBROADCASTI32X8 | - Opcode::VBROADCASTI64X4 | - Opcode::VBROADCASTI32X4 | - Opcode::VBROADCASTI64X2 | - Opcode::VBROADCASTI32X2 | - Opcode::VEXTRACTI32X8 | - Opcode::VEXTRACTF32X8 | - Opcode::VINSERTI32X8 | - Opcode::VINSERTF32X8 | - Opcode::VINSERTI32X4 | - Opcode::V4FNMADDSS | - Opcode::V4FNMADDPS | - Opcode::VCVTNEPS2BF16 | - Opcode::V4FMADDSS | - Opcode::V4FMADDPS | - Opcode::VCVTNE2PS2BF16 | - Opcode::VP2INTERSECTD | - Opcode::VP2INTERSECTQ | - Opcode::VP4DPWSSDS | - Opcode::VP4DPWSSD | - Opcode::VPDPWSSDS | - Opcode::VPDPWSSD | - Opcode::VPDPBUSDS | - Opcode::VDPBF16PS | - Opcode::VPBROADCASTMW2D | - Opcode::VPBROADCASTMB2Q | - Opcode::VPMOVD2M | - Opcode::VPMOVQD | - Opcode::VPMOVWB | - Opcode::VPMOVDB | - Opcode::VPMOVDW | - Opcode::VPMOVQB | - Opcode::VPMOVQW | - Opcode::VGF2P8MULB | - Opcode::VPMADD52HUQ | - Opcode::VPMADD52LUQ | - Opcode::VPSHUFBITQMB | - Opcode::VPERMB | - Opcode::VPEXPANDD | - Opcode::VPEXPANDQ | - Opcode::VPABSQ | - Opcode::VPRORVD | - Opcode::VPRORVQ | - Opcode::VPMULTISHIFTQB | - Opcode::VPERMT2B | - Opcode::VPERMT2W | - Opcode::VPSHRDVQ | - Opcode::VPSHRDVD | - Opcode::VPSHRDVW | - Opcode::VPSHLDVQ | - Opcode::VPSHLDVD | - Opcode::VPSHLDVW | - Opcode::VPCOMPRESSB | - Opcode::VPCOMPRESSW | - Opcode::VPEXPANDB | - Opcode::VPEXPANDW | - Opcode::VPOPCNTD | - Opcode::VPOPCNTQ | - Opcode::VPOPCNTB | - Opcode::VPOPCNTW | - Opcode::VSCALEFSS | - Opcode::VSCALEFSD | - Opcode::VSCALEFPS | - Opcode::VSCALEFPD | - Opcode::VPDPBUSD | - Opcode::VCVTUSI2SD | - Opcode::VCVTUSI2SS | - Opcode::VPXORD | - Opcode::VPXORQ | - Opcode::VPORD | - Opcode::VPORQ | - Opcode::VPANDND | - Opcode::VPANDNQ | - Opcode::VPANDD | - Opcode::VPANDQ | - - Opcode::VHADDPS | - Opcode::VHSUBPS | - Opcode::VADDSUBPS | - Opcode::VADDPD | - Opcode::VADDPS | - Opcode::VADDSD | - Opcode::VADDSS | - Opcode::VADDSUBPD | - Opcode::VFMADD132PD | - Opcode::VFMADD132PS | - Opcode::VFMADD132SD | - Opcode::VFMADD132SS | - Opcode::VFMADD213PD | - Opcode::VFMADD213PS | - Opcode::VFMADD213SD | - Opcode::VFMADD213SS | - Opcode::VFMADD231PD | - Opcode::VFMADD231PS | - Opcode::VFMADD231SD | - Opcode::VFMADD231SS | - Opcode::VFMADDSUB132PD | - Opcode::VFMADDSUB132PS | - Opcode::VFMADDSUB213PD | - Opcode::VFMADDSUB213PS | - Opcode::VFMADDSUB231PD | - Opcode::VFMADDSUB231PS | - Opcode::VFMSUB132PD | - Opcode::VFMSUB132PS | - Opcode::VFMSUB132SD | - Opcode::VFMSUB132SS | - Opcode::VFMSUB213PD | - Opcode::VFMSUB213PS | - Opcode::VFMSUB213SD | - Opcode::VFMSUB213SS | - Opcode::VFMSUB231PD | - Opcode::VFMSUB231PS | - Opcode::VFMSUB231SD | - Opcode::VFMSUB231SS | - Opcode::VFMSUBADD132PD | - Opcode::VFMSUBADD132PS | - Opcode::VFMSUBADD213PD | - Opcode::VFMSUBADD213PS | - Opcode::VFMSUBADD231PD | - Opcode::VFMSUBADD231PS | - Opcode::VFNMADD132PD | - Opcode::VFNMADD132PS | - Opcode::VFNMADD132SD | - Opcode::VFNMADD132SS | - Opcode::VFNMADD213PD | - Opcode::VFNMADD213PS | - Opcode::VFNMADD213SD | - Opcode::VFNMADD213SS | - Opcode::VFNMADD231PD | - Opcode::VFNMADD231PS | - Opcode::VFNMADD231SD | - Opcode::VFNMADD231SS | - Opcode::VFNMSUB132PD | - Opcode::VFNMSUB132PS | - Opcode::VFNMSUB132SD | - Opcode::VFNMSUB132SS | - Opcode::VFNMSUB213PD | - Opcode::VFNMSUB213PS | - Opcode::VFNMSUB213SD | - Opcode::VFNMSUB213SS | - Opcode::VFNMSUB231PD | - Opcode::VFNMSUB231PS | - Opcode::VFNMSUB231SD | - Opcode::VFNMSUB231SS | - Opcode::VDIVPD | - Opcode::VDIVPS | - Opcode::VDIVSD | - Opcode::VDIVSS | - Opcode::VHADDPD | - Opcode::VHSUBPD | - Opcode::HADDPD | - Opcode::HSUBPD | - Opcode::VMULPD | - Opcode::VMULPS | - Opcode::VMULSD | - Opcode::VMULSS | - Opcode::VPABSB | - Opcode::VPABSD | - Opcode::VPABSW | - Opcode::PABSB | - Opcode::PABSD | - Opcode::PABSW | - Opcode::VPSIGNB | - Opcode::VPSIGND | - Opcode::VPSIGNW | - Opcode::PSIGNB | - Opcode::PSIGND | - Opcode::PSIGNW | - Opcode::VPADDB | - Opcode::VPADDD | - Opcode::VPADDQ | - Opcode::VPADDSB | - Opcode::VPADDSW | - Opcode::VPADDUSB | - Opcode::VPADDUSW | - Opcode::VPADDW | - Opcode::VPAVGB | - Opcode::VPAVGW | - Opcode::VPMULDQ | - Opcode::VPMULHRSW | - Opcode::VPMULHUW | - Opcode::VPMULHW | - Opcode::VPMULLQ | - Opcode::VPMULLD | - Opcode::VPMULLW | - Opcode::VPMULUDQ | - Opcode::PCLMULQDQ | - Opcode::PMULDQ | - Opcode::PMULHRSW | - Opcode::PMULLD | - Opcode::VPSUBB | - Opcode::VPSUBD | - Opcode::VPSUBQ | - Opcode::VPSUBSB | - Opcode::VPSUBSW | - Opcode::VPSUBUSB | - Opcode::VPSUBUSW | - Opcode::VPSUBW | - Opcode::VROUNDPD | - Opcode::VROUNDPS | - Opcode::VEXP2PD | - Opcode::VEXP2PS | - Opcode::VEXP2SD | - Opcode::VEXP2SS | - Opcode::VRCP28PD | - Opcode::VRCP28PS | - Opcode::VRCP28SD | - Opcode::VRCP28SS | - Opcode::VRCP14PD | - Opcode::VRCP14PS | - Opcode::VRCP14SD | - Opcode::VRCP14SS | - Opcode::VRNDSCALEPD | - Opcode::VRNDSCALEPS | - Opcode::VRNDSCALESD | - Opcode::VRNDSCALESS | - Opcode::VRSQRT14PD | - Opcode::VRSQRT14PS | - Opcode::VRSQRT14SD | - Opcode::VRSQRT14SS | - Opcode::VSCALEDPD | - Opcode::VSCALEDPS | - Opcode::VSCALEDSD | - Opcode::VSCALEDSS | - Opcode::VRSQRT28PD | - Opcode::VRSQRT28PS | - Opcode::VRSQRT28SD | - Opcode::VRSQRT28SS | - Opcode::VRSQRTPS | - Opcode::VSQRTPD | - Opcode::VSQRTPS | - Opcode::VSUBPD | - Opcode::VSUBPS | - Opcode::VSUBSD | - Opcode::VSUBSS | - Opcode::VRCPSS | - Opcode::VROUNDSD | - Opcode::VROUNDSS | - Opcode::ROUNDPD | - Opcode::ROUNDPS | - Opcode::ROUNDSD | - Opcode::ROUNDSS | - Opcode::VRSQRTSS | - Opcode::VSQRTSD | - Opcode::VSQRTSS | - Opcode::VPSADBW | - Opcode::VMPSADBW | - Opcode::VDBPSADBW | - Opcode::VPHADDD | - Opcode::VPHADDSW | - Opcode::VPHADDW | - Opcode::VPHSUBD | - Opcode::VPHSUBSW | - Opcode::VPHSUBW | - Opcode::VPMADDUBSW | - Opcode::VPMADDWD | - Opcode::VDPPD | - Opcode::VDPPS | - Opcode::VRCPPS | - Opcode::VORPD | - Opcode::VORPS | - Opcode::VANDPD | - Opcode::VANDPS | - Opcode::VANDNPD | - Opcode::VANDNPS | - Opcode::VPAND | - Opcode::VPANDN | - Opcode::VPOR | - Opcode::VPXOR | - Opcode::VXORPD | - Opcode::VXORPS | - Opcode::VPSLLD | - Opcode::VPSLLDQ | - Opcode::VPSLLQ | - Opcode::VPSLLVD | - Opcode::VPSLLVQ | - Opcode::VPSLLW | - Opcode::VPROLD | - Opcode::VPROLQ | - Opcode::VPROLVD | - Opcode::VPROLVQ | - Opcode::VPRORD | - Opcode::VPRORQ | - Opcode::VPRORRD | - Opcode::VPRORRQ | - Opcode::VPSLLVW | - Opcode::VPSRAQ | - Opcode::VPSRAVQ | - Opcode::VPSRAVW | - Opcode::VPSRLVW | - Opcode::VPSRAD | - Opcode::VPSRAVD | - Opcode::VPSRAW | - Opcode::VPSRLD | - Opcode::VPSRLDQ | - Opcode::VPSRLQ | - Opcode::VPSRLVD | - Opcode::VPSRLVQ | - Opcode::VPSRLW | - Opcode::PHADDD | - Opcode::PHADDSW | - Opcode::PHADDW | - Opcode::PHSUBD | - Opcode::PHSUBSW | - Opcode::PHSUBW | - Opcode::PMADDUBSW | - Opcode::ADDSUBPD | - Opcode::DPPS | - Opcode::DPPD | - Opcode::MPSADBW | - Opcode::RCPSS | - Opcode::RSQRTSS | - Opcode::SQRTSD | - Opcode::ADDSD | - Opcode::SUBSD | - Opcode::MULSD | - Opcode::DIVSD | - Opcode::SQRTSS | - Opcode::ADDSS | - Opcode::SUBSS | - Opcode::MULSS | - Opcode::DIVSS | - Opcode::HADDPS | - Opcode::HSUBPS | - Opcode::ADDSUBPS | - Opcode::PMULHRW | - Opcode::PFRCP | - Opcode::PFRSQRT | - Opcode::PFSUB | - Opcode::PFADD | - Opcode::PFRCPIT1 | - Opcode::PFRSQIT1 | - Opcode::PFSUBR | - Opcode::PFACC | - Opcode::PFMUL | - Opcode::PFMULHRW | - Opcode::PFRCPIT2 | - Opcode::PFNACC | - Opcode::PFPNACC | - Opcode::PSWAPD | - Opcode::PAVGUSB | - Opcode::XADD| - Opcode::DIV | - Opcode::IDIV | - Opcode::MUL | - Opcode::MULX | - Opcode::NEG | - Opcode::NOT | - Opcode::SAR | - Opcode::SAL | - Opcode::SHR | - Opcode::SARX | - Opcode::SHLX | - Opcode::SHRX | - Opcode::SHRD | - Opcode::SHL | - Opcode::RCR | - Opcode::RCL | - Opcode::ROR | - Opcode::RORX | - Opcode::ROL | - Opcode::INC | - Opcode::DEC | - Opcode::SBB | - Opcode::AND | - Opcode::XOR | - Opcode::OR | - Opcode::LEA | - Opcode::ADD | - Opcode::ADC | - Opcode::ADCX | - Opcode::ADOX | - Opcode::SUB | - Opcode::POPCNT | - Opcode::LZCNT | - Opcode::VPLZCNTD | - Opcode::VPLZCNTQ | - Opcode::BT | - Opcode::BTS | - Opcode::BTR | - Opcode::BTC | - Opcode::BSF | - Opcode::BSR | - Opcode::BZHI | - Opcode::PDEP | - Opcode::PEXT | - Opcode::TZCNT | - Opcode::ANDN | - Opcode::BEXTR | - Opcode::BLSI | - Opcode::BLSMSK | - Opcode::BLSR | - Opcode::ADDPS | - Opcode::ADDPD | - Opcode::ANDNPS | - Opcode::ANDNPD | - Opcode::ANDPS | - Opcode::ANDPD | - Opcode::COMISD | - Opcode::COMISS | - Opcode::DIVPS | - Opcode::DIVPD | - Opcode::MULPS | - Opcode::MULPD | - Opcode::ORPS | - Opcode::ORPD | - Opcode::PADDB | - Opcode::PADDD | - Opcode::PADDQ | - Opcode::PADDSB | - Opcode::PADDSW | - Opcode::PADDUSB | - Opcode::PADDUSW | - Opcode::PADDW | - Opcode::PAND | - Opcode::PANDN | - Opcode::PAVGB | - Opcode::PAVGW | - Opcode::PMADDWD | - Opcode::PMULHUW | - Opcode::PMULHW | - Opcode::PMULLW | - Opcode::PMULUDQ | - Opcode::POR | - Opcode::PSADBW | - Opcode::PSHUFD | - Opcode::PSHUFW | - Opcode::PSHUFB | - Opcode::PSLLD | - Opcode::PSLLDQ | - Opcode::PSLLQ | - Opcode::PSLLW | - Opcode::PSRAD | - Opcode::PSRAW | - Opcode::PSRLD | - Opcode::PSRLDQ | - Opcode::PSRLQ | - Opcode::PSRLW | - Opcode::PSUBB | - Opcode::PSUBD | - Opcode::PSUBQ | - Opcode::PSUBSB | - Opcode::PSUBSW | - Opcode::PSUBUSB | - Opcode::PSUBUSW | - Opcode::PSUBW | - Opcode::PXOR | - Opcode::RSQRTPS | - Opcode::SQRTPS | - Opcode::SQRTPD | - Opcode::SUBPS | - Opcode::SUBPD | - Opcode::XORPS | - Opcode::XORPD | - Opcode::RCPPS | - Opcode::SHLD | - Opcode::SLHD | - Opcode::UCOMISD | - Opcode::UCOMISS | - Opcode::F2XM1 | - Opcode::FABS | - Opcode::FADD | - Opcode::FADDP | - Opcode::FCHS | - Opcode::FCOS | - Opcode::FDIV | - Opcode::FDIVP | - Opcode::FDIVR | - Opcode::FDIVRP | - Opcode::FIADD | - Opcode::FIDIV | - Opcode::FIDIVR | - Opcode::FIMUL | - Opcode::FISUB | - Opcode::FISUBR | - Opcode::FMUL | - Opcode::FMULP | - Opcode::FNCLEX | - Opcode::FNINIT | - Opcode::FPATAN | - Opcode::FPREM | - Opcode::FPREM1 | - Opcode::FPTAN | - Opcode::FRNDINT | - Opcode::FSCALE | - Opcode::FSIN | - Opcode::FSINCOS | - Opcode::FSQRT | - Opcode::FSUB | - Opcode::FSUBP | - Opcode::FSUBR | - Opcode::FSUBRP | - Opcode::FXTRACT | - Opcode::FYL2X | - Opcode::FYL2XP1 | - Opcode::AAA | - Opcode::AAS | - Opcode::DAS | - Opcode::DAA | - Opcode::AAD | - Opcode::AAM | - Opcode::KADDB | - Opcode::KANDB | - Opcode::KANDNB | - Opcode::KNOTB | - Opcode::KORB | - Opcode::KSHIFTLB | - Opcode::KSHIFTRB | - Opcode::KXNORB | - Opcode::KXORB | - Opcode::KADDW | - Opcode::KANDW | - Opcode::KANDNW | - Opcode::KNOTW | - Opcode::KORW | - Opcode::KSHIFTLW | - Opcode::KSHIFTRW | - Opcode::KXNORW | - Opcode::KXORW | - Opcode::KADDD | - Opcode::KANDD | - Opcode::KANDND | - Opcode::KNOTD | - Opcode::KORD | - Opcode::KSHIFTLD | - Opcode::KSHIFTRD | - Opcode::KXNORD | - Opcode::KXORD | - Opcode::KADDQ | - Opcode::KANDQ | - Opcode::KANDNQ | - Opcode::KNOTQ | - Opcode::KORQ | - Opcode::KSHIFTLQ | - Opcode::KSHIFTRQ | - Opcode::KXNORQ | - Opcode::KXORQ | - Opcode::IMUL => { write!(out, "{}", colors.arithmetic_op(self)) } - Opcode::POPF | - Opcode::PUSHF | - Opcode::ENTER | - Opcode::LEAVE | - Opcode::PUSHA | - Opcode::POPA | - Opcode::PUSH | - Opcode::POP => { write!(out, "{}", colors.stack_op(self)) } - Opcode::WAIT | - Opcode::FNOP | - Opcode::FDISI8087_NOP | - Opcode::FENI8087_NOP | - Opcode::FSETPM287_NOP | - Opcode::PREFETCHNTA | - Opcode::PREFETCH0 | - Opcode::PREFETCH1 | - Opcode::PREFETCH2 | - Opcode::PREFETCHW | - Opcode::NOP => { write!(out, "{}", colors.nop_op(self)) } - - /* Control flow */ - Opcode::HLT | - Opcode::INT | - Opcode::INTO | - Opcode::IRET | - Opcode::IRETD | - Opcode::IRETQ | - Opcode::RETF | - Opcode::RETURN => { write!(out, "{}", colors.stop_op(self)) } - Opcode::LOOPNZ | - Opcode::LOOPZ | - Opcode::LOOP | - Opcode::JECXZ | - Opcode::CALL | - Opcode::CALLF | - Opcode::JMP | - Opcode::JMPF | - Opcode::JO | - Opcode::JNO | - Opcode::JB | - Opcode::JNB | - Opcode::JZ | - Opcode::JNZ | - Opcode::JA | - Opcode::JNA | - Opcode::JS | - Opcode::JNS | - Opcode::JP | - Opcode::JNP | - Opcode::JL | - Opcode::JGE | - Opcode::JLE | - Opcode::JG => { write!(out, "{}", colors.control_flow_op(self)) } - - /* Data transfer */ - Opcode::PI2FW | - Opcode::PI2FD | - Opcode::PF2ID | - Opcode::PF2IW | - Opcode::VCVTDQ2PD | - Opcode::VCVTDQ2PS | - Opcode::VCVTPD2DQ | - Opcode::VCVTPD2PS | - Opcode::VCVTPH2PS | - Opcode::VCVTPS2DQ | - Opcode::VCVTPS2PD | - Opcode::VCVTPS2PH | - Opcode::VCVTTPD2DQ | - Opcode::VCVTTPS2DQ | - Opcode::VCVTSD2SI | - Opcode::VCVTSD2SS | - Opcode::VCVTSI2SD | - Opcode::VCVTSI2SS | - Opcode::VCVTSS2SD | - Opcode::VCVTSS2SI | - Opcode::VCVTTSD2SI | - Opcode::VCVTTSS2SI | - Opcode::VCVTPD2UDQ | - Opcode::VCVTTPD2UDQ | - Opcode::VCVTPS2UDQ | - Opcode::VCVTTPS2UDQ | - Opcode::VCVTQQ2PD | - Opcode::VCVTQQ2PS | - Opcode::VCVTSD2USI | - Opcode::VCVTTSD2USI | - Opcode::VCVTSS2USI | - Opcode::VCVTTSS2USI | - Opcode::VCVTUDQ2PD | - Opcode::VCVTUDQ2PS | - Opcode::VCVTUSI2USD | - Opcode::VCVTUSI2USS | - Opcode::VCVTTPD2QQ | - Opcode::VCVTPD2QQ | - Opcode::VCVTTPD2UQQ | - Opcode::VCVTPD2UQQ | - Opcode::VCVTTPS2QQ | - Opcode::VCVTPS2QQ | - Opcode::VCVTTPS2UQQ | - Opcode::VCVTPS2UQQ | - Opcode::VCVTUQQ2PD | - Opcode::VCVTUQQ2PS | - Opcode::VMOVDDUP | - Opcode::VPSHUFLW | - Opcode::VPSHUFHW | - Opcode::VBLENDMPD | - Opcode::VBLENDMPS | - Opcode::VPBLENDMD | - Opcode::VPBLENDMQ | - Opcode::VBLENDPD | - Opcode::VBLENDPS | - Opcode::VBLENDVPD | - Opcode::VBLENDVPS | - Opcode::VPBLENDMB | - Opcode::VPBLENDMW | - Opcode::PBLENDVB | - Opcode::PBLENDW | - Opcode::BLENDPD | - Opcode::BLENDPS | - Opcode::BLENDVPD | - Opcode::BLENDVPS | - Opcode::BLENDW | - Opcode::VBROADCASTF128 | - Opcode::VBROADCASTI128 | - Opcode::VBROADCASTSD | - Opcode::VBROADCASTSS | - Opcode::VPBROADCASTM | - Opcode::VEXTRACTF128 | - Opcode::VEXTRACTI128 | - Opcode::VEXTRACTPS | - Opcode::EXTRACTPS | - Opcode::VGATHERDPD | - Opcode::VGATHERDPS | - Opcode::VGATHERQPD | - Opcode::VGATHERQPS | - Opcode::VGATHERPF0DPD | - Opcode::VGATHERPF0DPS | - Opcode::VGATHERPF0QPD | - Opcode::VGATHERPF0QPS | - Opcode::VGATHERPF1DPD | - Opcode::VGATHERPF1DPS | - Opcode::VGATHERPF1QPD | - Opcode::VGATHERPF1QPS | - Opcode::VSCATTERDD | - Opcode::VSCATTERDQ | - Opcode::VSCATTERQD | - Opcode::VSCATTERQQ | - Opcode::VSCATTERDPS | - Opcode::VSCATTERDPD | - Opcode::VSCATTERQPS | - Opcode::VSCATTERQPD | - Opcode::VPSCATTERDD | - Opcode::VPSCATTERDQ | - Opcode::VPSCATTERQD | - Opcode::VPSCATTERQQ | - Opcode::VSCATTERPF0DPD | - Opcode::VSCATTERPF0DPS | - Opcode::VSCATTERPF0QPD | - Opcode::VSCATTERPF0QPS | - Opcode::VSCATTERPF1DPD | - Opcode::VSCATTERPF1DPS | - Opcode::VSCATTERPF1QPD | - Opcode::VSCATTERPF1QPS | - Opcode::VINSERTF128 | - Opcode::VINSERTI128 | - Opcode::VINSERTPS | - Opcode::INSERTPS | - Opcode::VEXTRACTF32X4 | - Opcode::VEXTRACTF64X2 | - Opcode::VEXTRACTF64X4 | - Opcode::VEXTRACTI32X4 | - Opcode::VEXTRACTI64X2 | - Opcode::VEXTRACTI64X4 | - Opcode::VINSERTF32X4 | - Opcode::VINSERTF64X2 | - Opcode::VINSERTF64X4 | - Opcode::VINSERTI64X2 | - Opcode::VINSERTI64X4 | - Opcode::VSHUFF32X4 | - Opcode::VSHUFF64X2 | - Opcode::VSHUFI32X4 | - Opcode::VSHUFI64X2 | - Opcode::VMASKMOVDQU | - Opcode::VMASKMOVPD | - Opcode::VMASKMOVPS | - Opcode::VMOVAPD | - Opcode::VMOVAPS | - Opcode::VMOVD | - Opcode::VMOVDQA | - Opcode::VMOVDQU | - Opcode::VMOVHLPS | - Opcode::VMOVHPD | - Opcode::VMOVHPS | - Opcode::VMOVLHPS | - Opcode::VMOVLPD | - Opcode::VMOVLPS | - Opcode::VMOVMSKPD | - Opcode::VMOVMSKPS | - Opcode::VMOVNTDQ | - Opcode::VMOVNTDQA | - Opcode::VMOVNTPD | - Opcode::VMOVNTPS | - Opcode::MOVDIR64B | - Opcode::MOVDIRI | - Opcode::MOVNTDQA | - Opcode::VMOVQ | - Opcode::VMOVSHDUP | - Opcode::VMOVSLDUP | - Opcode::VMOVUPD | - Opcode::VMOVUPS | - Opcode::VMOVSD | - Opcode::VMOVSS | - Opcode::VMOVDQA32 | - Opcode::VMOVDQA64 | - Opcode::VMOVDQU32 | - Opcode::VMOVDQU64 | - Opcode::VPMOVM2B | - Opcode::VPMOVM2W | - Opcode::VPMOVB2M | - Opcode::VPMOVW2M | - Opcode::VPMOVSWB | - Opcode::VPMOVUSWB | - Opcode::VPMOVSQB | - Opcode::VPMOVUSQB | - Opcode::VPMOVSQW | - Opcode::VPMOVUSQW | - Opcode::VPMOVSQD | - Opcode::VPMOVUSQD | - Opcode::VPMOVSDB | - Opcode::VPMOVUSDB | - Opcode::VPMOVSDW | - Opcode::VPMOVUSDW | - Opcode::VPMOVM2D | - Opcode::VPMOVM2Q | - Opcode::VPMOVB2D | - Opcode::VPMOVQ2M | - Opcode::VMOVDQU8 | - Opcode::VMOVDQU16 | - - Opcode::VPBLENDD | - Opcode::VPBLENDVB | - Opcode::VPBLENDW | - Opcode::VPBROADCASTB | - Opcode::VPBROADCASTD | - Opcode::VPBROADCASTQ | - Opcode::VPBROADCASTW | - Opcode::VPGATHERDD | - Opcode::VPGATHERDQ | - Opcode::VPGATHERQD | - Opcode::VPGATHERQQ | - Opcode::VPCLMULQDQ | - Opcode::VPMOVMSKB | - Opcode::VPMOVSXBD | - Opcode::VPMOVSXBQ | - Opcode::VPMOVSXBW | - Opcode::VPMOVSXDQ | - Opcode::VPMOVSXWD | - Opcode::VPMOVSXWQ | - Opcode::VPMOVZXBD | - Opcode::VPMOVZXBQ | - Opcode::VPMOVZXBW | - Opcode::VPMOVZXDQ | - Opcode::VPMOVZXWD | - Opcode::VPMOVZXWQ | - Opcode::PMOVSXBD | - Opcode::PMOVSXBQ | - Opcode::PMOVSXBW | - Opcode::PMOVSXDQ | - Opcode::PMOVSXWD | - Opcode::PMOVSXWQ | - Opcode::PMOVZXBD | - Opcode::PMOVZXBQ | - Opcode::PMOVZXBW | - Opcode::PMOVZXDQ | - Opcode::PMOVZXWD | - Opcode::PMOVZXWQ | - Opcode::KUNPCKBW | - Opcode::KUNPCKWD | - Opcode::KUNPCKDQ | - Opcode::VUNPCKHPD | - Opcode::VUNPCKHPS | - Opcode::VUNPCKLPD | - Opcode::VUNPCKLPS | - Opcode::VPUNPCKHBW | - Opcode::VPUNPCKHDQ | - Opcode::VPUNPCKHQDQ | - Opcode::VPUNPCKHWD | - Opcode::VPUNPCKLBW | - Opcode::VPUNPCKLDQ | - Opcode::VPUNPCKLQDQ | - Opcode::VPUNPCKLWD | - Opcode::VSHUFPD | - Opcode::VSHUFPS | - Opcode::VPACKSSDW | - Opcode::VPACKUSDW | - Opcode::PACKUSDW | - Opcode::VPACKSSWB | - Opcode::VPACKUSWB | - Opcode::VALIGND | - Opcode::VALIGNQ | - Opcode::VPALIGNR | - Opcode::PALIGNR | - Opcode::VPERM2F128 | - Opcode::VPERM2I128 | - Opcode::VPERMD | - Opcode::VPERMILPD | - Opcode::VPERMILPS | - Opcode::VPERMPD | - Opcode::VPERMPS | - Opcode::VPERMQ | - Opcode::VPERMI2D | - Opcode::VPERMI2Q | - Opcode::VPERMI2PD | - Opcode::VPERMI2PS | - Opcode::VPERMT2D | - Opcode::VPERMT2Q | - Opcode::VPERMT2PD | - Opcode::VPERMT2PS | - Opcode::VPERMI2B | - Opcode::VPERMI2W | - Opcode::VPERMW | - Opcode::VPEXTRB | - Opcode::VPEXTRD | - Opcode::VPEXTRQ | - Opcode::VPEXTRW | - Opcode::PEXTRB | - Opcode::PEXTRD | - Opcode::PEXTRQ | - Opcode::EXTRQ | - Opcode::PINSRB | - Opcode::PINSRD | - Opcode::PINSRQ | - Opcode::INSERTQ | - Opcode::VPINSRB | - Opcode::VPINSRD | - Opcode::VPINSRQ | - Opcode::VPINSRW | - Opcode::VPMASKMOVD | - Opcode::VPMASKMOVQ | - Opcode::VCOMPRESSD | - Opcode::VCOMPRESSQ | - Opcode::VCOMPRESSPD | - Opcode::VCOMPRESSPS | - Opcode::VPCOMPRESSQ | - Opcode::VPCOMPRESSD | - Opcode::VEXPANDPD | - Opcode::VEXPANDPS | - Opcode::VPSHUFB | - Opcode::VPSHUFD | - Opcode::VPHMINPOSUW | - Opcode::PHMINPOSUW | - Opcode::VZEROUPPER | - Opcode::VZEROALL | - Opcode::VFIXUPIMMPD | - Opcode::VFIXUPIMMPS | - Opcode::VFIXUPIMMSD | - Opcode::VFIXUPIMMSS | - Opcode::VREDUCEPD | - Opcode::VREDUCEPS | - Opcode::VREDUCESD | - Opcode::VREDUCESS | - Opcode::VGETEXPPD | - Opcode::VGETEXPPS | - Opcode::VGETEXPSD | - Opcode::VGETEXPSS | - Opcode::VGETMANTPD | - Opcode::VGETMANTPS | - Opcode::VGETMANTSD | - Opcode::VGETMANTSS | - Opcode::VLDDQU | - Opcode::BSWAP | - Opcode::CVTDQ2PD | - Opcode::CVTDQ2PS | - Opcode::CVTPS2DQ | - Opcode::CVTPD2DQ | - Opcode::CVTPI2PS | - Opcode::CVTPI2PD | - Opcode::CVTPS2PD | - Opcode::CVTPD2PS | - Opcode::CVTPS2PI | - Opcode::CVTPD2PI | - Opcode::CVTSD2SI | - Opcode::CVTSD2SS | - Opcode::CVTSI2SD | - Opcode::CVTSI2SS | - Opcode::CVTSS2SD | - Opcode::CVTSS2SI | - Opcode::CVTTPD2DQ | - Opcode::CVTTPS2DQ | - Opcode::CVTTPS2PI | - Opcode::CVTTPD2PI | - Opcode::CVTTSD2SI | - Opcode::CVTTSS2SI | - Opcode::MASKMOVQ | - Opcode::MASKMOVDQU | - Opcode::MOVAPS | - Opcode::MOVAPD | - Opcode::MOVD | - Opcode::MOVHPS | - Opcode::MOVHPD | - Opcode::MOVHLPS | - Opcode::MOVLPS | - Opcode::MOVLPD | - Opcode::MOVLHPS | - Opcode::MOVMSKPS | - Opcode::MOVMSKPD | - Opcode::MOVNTI | - Opcode::MOVNTPS | - Opcode::MOVNTPD | - Opcode::MOVNTSS | - Opcode::MOVNTSD | - Opcode::MOVNTQ | - Opcode::MOVNTDQ | - Opcode::MOVSD | - Opcode::MOVSS | - Opcode::MOVUPD | - Opcode::PSHUFHW | - Opcode::PSHUFLW | - Opcode::PUNPCKHBW | - Opcode::PUNPCKHDQ | - Opcode::PUNPCKHWD | - Opcode::PUNPCKLBW | - Opcode::PUNPCKLDQ | - Opcode::PUNPCKLWD | - Opcode::PUNPCKLQDQ | - Opcode::PUNPCKHQDQ | - Opcode::PACKSSDW | - Opcode::PACKSSWB | - Opcode::PACKUSWB | - Opcode::UNPCKHPS | - Opcode::UNPCKHPD | - Opcode::UNPCKLPS | - Opcode::UNPCKLPD | - Opcode::SHUFPD | - Opcode::SHUFPS | - Opcode::PMOVMSKB | - Opcode::KMOVB | - Opcode::KMOVW | - Opcode::KMOVD | - Opcode::KMOVQ | - Opcode::BNDMOV | - Opcode::LDDQU | - Opcode::CMC | - Opcode::CLC | - Opcode::CLI | - Opcode::CLD | - Opcode::STC | - Opcode::STI | - Opcode::STD | - Opcode::CBW | - Opcode::CWDE | - Opcode::CDQE | - Opcode::CWD | - Opcode::CDQ | - Opcode::CQO | - Opcode::MOVDDUP | - Opcode::MOVSLDUP | - Opcode::MOVDQ2Q | - Opcode::MOVDQU | - Opcode::MOVDQA | - Opcode::MOVQ | - Opcode::MOVQ2DQ | - Opcode::MOVSHDUP | - Opcode::MOVUPS | - Opcode::PEXTRW | - Opcode::PINSRW | - Opcode::MOV | - Opcode::MOVBE | - Opcode::LODS | - Opcode::STOS | - Opcode::LAHF | - Opcode::SAHF | - Opcode::MOVS | - Opcode::INS | - Opcode::IN | - Opcode::OUTS | - Opcode::OUT | - Opcode::MOVZX | - Opcode::MOVSX | - Opcode::MOVSXD | - Opcode::FILD | - Opcode::FBLD | - Opcode::FBSTP | - Opcode::FIST | - Opcode::FISTP | - Opcode::FISTTP | - Opcode::FLD | - Opcode::FLD1 | - Opcode::FLDCW | - Opcode::FLDENV | - Opcode::FLDL2E | - Opcode::FLDL2T | - Opcode::FLDLG2 | - Opcode::FLDLN2 | - Opcode::FLDPI | - Opcode::FLDZ | - Opcode::FST | - Opcode::FSTP | - Opcode::FSTPNCE | - Opcode::FNSAVE | - Opcode::FNSTCW | - Opcode::FNSTENV | - Opcode::FNSTOR | - Opcode::FNSTSW | - Opcode::FRSTOR | - Opcode::FXCH | - Opcode::XCHG | - Opcode::XLAT | - Opcode::CMOVA | - Opcode::CMOVB | - Opcode::CMOVG | - Opcode::CMOVGE | - Opcode::CMOVL | - Opcode::CMOVLE | - Opcode::CMOVNA | - Opcode::CMOVNB | - Opcode::CMOVNO | - Opcode::CMOVNP | - Opcode::CMOVNS | - Opcode::CMOVNZ | - Opcode::CMOVO | - Opcode::CMOVP | - Opcode::CMOVS | - Opcode::CMOVZ | - Opcode::FCMOVB | - Opcode::FCMOVBE | - Opcode::FCMOVE | - Opcode::FCMOVNB | - Opcode::FCMOVNBE | - Opcode::FCMOVNE | - Opcode::FCMOVNU | - Opcode::FCMOVU | - Opcode::SALC | - Opcode::SETO | - Opcode::SETNO | - Opcode::SETB | - Opcode::SETAE | - Opcode::SETZ | - Opcode::SETNZ | - Opcode::SETBE | - Opcode::SETA | - Opcode::SETS | - Opcode::SETNS | - Opcode::SETP | - Opcode::SETNP | - Opcode::SETL | - Opcode::SETGE | - Opcode::SETLE | - Opcode::SETG => { write!(out, "{}", colors.data_op(self)) } - - Opcode::VCOMISD | - Opcode::VCOMISS | - Opcode::VUCOMISD | - Opcode::VUCOMISS | - Opcode::KORTESTB | - Opcode::KTESTB | - Opcode::KORTESTW | - Opcode::KTESTW | - Opcode::KORTESTD | - Opcode::KTESTD | - Opcode::KORTESTQ | - Opcode::KTESTQ | - Opcode::VPTESTNMD | - Opcode::VPTESTNMQ | - Opcode::VPTERNLOGD | - Opcode::VPTERNLOGQ | - Opcode::VPTESTMD | - Opcode::VPTESTMQ | - Opcode::VPTESTNMB | - Opcode::VPTESTNMW | - Opcode::VPTESTMB | - Opcode::VPTESTMW | - Opcode::VPCMPD | - Opcode::VPCMPUD | - Opcode::VPCMPQ | - Opcode::VPCMPUQ | - Opcode::VPCMPB | - Opcode::VPCMPUB | - Opcode::VPCMPW | - Opcode::VPCMPUW | - Opcode::VCMPPD | - Opcode::VCMPPS | - Opcode::VCMPSD | - Opcode::VCMPSS | - Opcode::VMAXPD | - Opcode::VMAXPS | - Opcode::VMAXSD | - Opcode::VMAXSS | - Opcode::VPMAXSQ | - Opcode::VPMAXUQ | - Opcode::VPMINSQ | - Opcode::VPMINUQ | - Opcode::VMINPD | - Opcode::VMINPS | - Opcode::VMINSD | - Opcode::VMINSS | - Opcode::VPCMPEQB | - Opcode::VPCMPEQD | - Opcode::VPCMPEQQ | - Opcode::VPCMPEQW | - Opcode::VPCMPGTB | - Opcode::VPCMPGTD | - Opcode::VPCMPGTQ | - Opcode::VPCMPGTW | - Opcode::VPCMPESTRI | - Opcode::VPCMPESTRM | - Opcode::VPCMPISTRI | - Opcode::VPCMPISTRM | - Opcode::VPMAXSB | - Opcode::VPMAXSD | - Opcode::VPMAXSW | - Opcode::VPMAXUB | - Opcode::VPMAXUW | - Opcode::VPMAXUD | - Opcode::VPMINSB | - Opcode::VPMINSW | - Opcode::VPMINSD | - Opcode::VPMINUB | - Opcode::VPMINUW | - Opcode::VPMINUD | - Opcode::VFPCLASSPD | - Opcode::VFPCLASSPS | - Opcode::VFPCLASSSD | - Opcode::VFPCLASSSS | - Opcode::VRANGEPD | - Opcode::VRANGEPS | - Opcode::VRANGESD | - Opcode::VRANGESS | - Opcode::VPCONFLICTD | - Opcode::VPCONFLICTQ | - Opcode::VPTEST | - Opcode::VTESTPD | - Opcode::VTESTPS | - Opcode::PCMPEQB | - Opcode::PCMPEQD | - Opcode::PCMPEQQ | - Opcode::PCMPEQW | - Opcode::PCMPESTRI | - Opcode::PCMPESTRM | - Opcode::PCMPGTB | - Opcode::PCMPGTD | - Opcode::PCMPGTQ | - Opcode::PCMPGTW | - Opcode::PCMPISTRI | - Opcode::PCMPISTRM | - Opcode::PTEST | - Opcode::MAXPD | - Opcode::MAXPS | - Opcode::MAXSD | - Opcode::MAXSS | - Opcode::MINPD | - Opcode::MINPS | - Opcode::MINSD | - Opcode::MINSS | - Opcode::PMAXSB | - Opcode::PMAXSD | - Opcode::PMAXSW | - Opcode::PMAXUB | - Opcode::PMAXUD | - Opcode::PMAXUW | - Opcode::PMINSB | - Opcode::PMINSD | - Opcode::PMINSW | - Opcode::PMINUB | - Opcode::PMINUD | - Opcode::PMINUW | - Opcode::PFCMPGE | - Opcode::PFMIN | - Opcode::PFCMPGT | - Opcode::PFMAX | - Opcode::PFCMPEQ | - Opcode::CMPS | - Opcode::SCAS | - Opcode::TEST | - Opcode::FTST | - Opcode::FXAM | - Opcode::FUCOM | - Opcode::FUCOMI | - Opcode::FUCOMIP | - Opcode::FUCOMP | - Opcode::FUCOMPP | - Opcode::FCOM | - Opcode::FCOMI | - Opcode::FCOMIP | - Opcode::FCOMP | - Opcode::FCOMPP | - Opcode::FICOM | - Opcode::FICOMP | - Opcode::CMPSD | - Opcode::CMPSS | - Opcode::CMP | - Opcode::CMPPS | - Opcode::CMPPD | - Opcode::CMPXCHG8B | - Opcode::CMPXCHG16B | - Opcode::CMPXCHG => { write!(out, "{}", colors.comparison_op(self)) } - - Opcode::WRMSR | - Opcode::RDMSR | - Opcode::RDTSC | - Opcode::RDPMC | - Opcode::RDPID | - Opcode::RDFSBASE | - Opcode::RDGSBASE | - Opcode::WRFSBASE | - Opcode::WRGSBASE | - Opcode::FXSAVE | - Opcode::FXRSTOR | - Opcode::LDMXCSR | - Opcode::STMXCSR | - Opcode::VLDMXCSR | - Opcode::VSTMXCSR | - Opcode::XSAVE | - Opcode::XSAVEC | - Opcode::XSAVES | - Opcode::XSAVEC64 | - Opcode::XSAVES64 | - Opcode::XRSTOR | - Opcode::XRSTORS | - Opcode::XRSTORS64 | - Opcode::XSAVEOPT | - Opcode::LFENCE | - Opcode::MFENCE | - Opcode::SFENCE | - Opcode::CLFLUSH | - Opcode::CLFLUSHOPT | - Opcode::CLWB | - Opcode::LDS | - Opcode::LES | - Opcode::SGDT | - Opcode::SIDT | - Opcode::LGDT | - Opcode::LIDT | - Opcode::SMSW | - Opcode::LMSW | - Opcode::SWAPGS | - Opcode::RDTSCP | - Opcode::INVEPT | - Opcode::INVVPID | - Opcode::INVPCID | - Opcode::INVLPG | - Opcode::INVLPGA | - Opcode::INVLPGB | - Opcode::TLBSYNC | - Opcode::PSMASH | - Opcode::PVALIDATE | - Opcode::RMPADJUST | - Opcode::RMPUPDATE | - Opcode::CPUID | - Opcode::WBINVD | - Opcode::INVD | - Opcode::SYSRET | - Opcode::CLTS | - Opcode::SYSCALL | - Opcode::TDCALL | - Opcode::SEAMRET | - Opcode::SEAMOPS | - Opcode::SEAMCALL | - Opcode::TPAUSE | - Opcode::UMONITOR | - Opcode::UMWAIT | - Opcode::LSL | - Opcode::SLDT | - Opcode::STR | - Opcode::LLDT | - Opcode::LTR | - Opcode::VERR | - Opcode::VERW | - Opcode::JMPE | - Opcode::EMMS | - Opcode::FEMMS | - Opcode::GETSEC | - Opcode::LFS | - Opcode::LGS | - Opcode::LSS | - Opcode::RSM | - Opcode::SYSENTER | - Opcode::SYSEXIT | - Opcode::VMREAD | - Opcode::VMWRITE | - Opcode::VMCLEAR | - Opcode::VMPTRLD | - Opcode::VMPTRST | - Opcode::VMXON | - Opcode::VMCALL | - Opcode::VMLAUNCH | - Opcode::VMRESUME | - Opcode::VMLOAD | - Opcode::VMMCALL | - Opcode::VMSAVE | - Opcode::VMRUN | - Opcode::VMXOFF | - Opcode::PCONFIG | - Opcode::MONITOR | - Opcode::MWAIT | - Opcode::MONITORX | - Opcode::MWAITX | - Opcode::SKINIT | - Opcode::CLGI | - Opcode::STGI | - Opcode::CLAC | - Opcode::STAC | - Opcode::ENCLS | - Opcode::ENCLV | - Opcode::XGETBV | - Opcode::XSETBV | - Opcode::VMFUNC | - Opcode::XEND | - Opcode::XTEST | - Opcode::XABORT | - Opcode::XBEGIN | - Opcode::ENCLU | - Opcode::RDPKRU | - Opcode::WRPKRU | - Opcode::RDPRU | - Opcode::CLZERO | - Opcode::ENQCMD | - Opcode::ENQCMDS | - Opcode::PTWRITE | - Opcode::UIRET | - Opcode::TESTUI | - Opcode::CLUI | - Opcode::STUI | - Opcode::SENDUIPI | - Opcode::XSUSLDTRK | - Opcode::XRESLDTRK | - Opcode::BOUND | - Opcode::ARPL | - Opcode::BNDMK | - Opcode::BNDCL | - Opcode::BNDCU | - Opcode::BNDCN | - Opcode::BNDLDX | - Opcode::BNDSTX | - Opcode::LAR => { write!(out, "{}", colors.platform_op(self)) } - - Opcode::CRC32 | - Opcode::RDSEED | - Opcode::RDRAND | - Opcode::SHA1RNDS4 | - Opcode::SHA1NEXTE | - Opcode::SHA1MSG1 | - Opcode::SHA1MSG2 | - Opcode::SHA256RNDS2 | - Opcode::SHA256MSG1 | - Opcode::SHA256MSG2 | - Opcode::FFREE | - Opcode::FFREEP | - Opcode::FDECSTP | - Opcode::FINCSTP | - Opcode::GF2P8MULB | - Opcode::GF2P8AFFINEQB | - Opcode::GF2P8AFFINEINVQB | - Opcode::AESDEC128KL | - Opcode::AESDEC256KL | - Opcode::AESDECWIDE128KL | - Opcode::AESDECWIDE256KL | - Opcode::AESENC128KL | - Opcode::AESENC256KL | - Opcode::AESENCWIDE128KL | - Opcode::AESENCWIDE256KL | - Opcode::ENCODEKEY128 | - Opcode::ENCODEKEY256 | - Opcode::LOADIWKEY | - Opcode::HRESET | - Opcode::WRUSS | - Opcode::WRSS | - Opcode::INCSSP | - Opcode::SAVEPREVSSP | - Opcode::SETSSBSY | - Opcode::CLRSSBSY | - Opcode::RSTORSSP | - Opcode::ENDBR64 | - Opcode::ENDBR32 | - Opcode::AESDEC | - Opcode::AESDECLAST | - Opcode::AESENC | - Opcode::AESENCLAST | - Opcode::AESIMC | - Opcode::AESKEYGENASSIST | - Opcode::VAESDEC | - Opcode::VAESDECLAST | - Opcode::VAESENC | - Opcode::VAESENCLAST | - Opcode::VAESIMC | - Opcode::VAESKEYGENASSIST => { write!(out, "{}", colors.misc_op(self)) } - - Opcode::UD0 | - Opcode::UD1 | - Opcode::UD2 | - Opcode::Invalid => { write!(out, "{}", colors.invalid_op(self)) } - } - } -} - impl fmt::Display for Instruction { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { self.display_with(DisplayStyle::Intel).colorize(&NoColors, fmt) diff --git a/src/real_mode/display.rs b/src/real_mode/display.rs index 5783d1a..2263886 100644 --- a/src/real_mode/display.rs +++ b/src/real_mode/display.rs @@ -345,1462 +345,6 @@ impl fmt::Display for Opcode { } } -impl Opcode { - fn name(&self) -> &'static str { - unsafe { - crate::generated::opcode::MNEMONICS.get_kinda_unchecked(*self as usize) - } - } -} - -impl <T: fmt::Write, Y: YaxColors> Colorize<T, Y> for Opcode { - fn colorize(&self, colors: &Y, out: &mut T) -> fmt::Result { - match self { - Opcode::VGF2P8AFFINEQB | - Opcode::VGF2P8AFFINEINVQB | - Opcode::VPSHRDQ | - Opcode::VPSHRDD | - Opcode::VPSHRDW | - Opcode::VPSHLDQ | - Opcode::VPSHLDD | - Opcode::VPSHLDW | - Opcode::VBROADCASTF32X8 | - Opcode::VBROADCASTF64X4 | - Opcode::VBROADCASTF32X4 | - Opcode::VBROADCASTF64X2 | - Opcode::VBROADCASTF32X2 | - Opcode::VBROADCASTI32X8 | - Opcode::VBROADCASTI64X4 | - Opcode::VBROADCASTI32X4 | - Opcode::VBROADCASTI64X2 | - Opcode::VBROADCASTI32X2 | - Opcode::VEXTRACTI32X8 | - Opcode::VEXTRACTF32X8 | - Opcode::VINSERTI32X8 | - Opcode::VINSERTF32X8 | - Opcode::VINSERTI32X4 | - Opcode::V4FNMADDSS | - Opcode::V4FNMADDPS | - Opcode::VCVTNEPS2BF16 | - Opcode::V4FMADDSS | - Opcode::V4FMADDPS | - Opcode::VCVTNE2PS2BF16 | - Opcode::VP2INTERSECTD | - Opcode::VP2INTERSECTQ | - Opcode::VP4DPWSSDS | - Opcode::VP4DPWSSD | - Opcode::VPDPWSSDS | - Opcode::VPDPWSSD | - Opcode::VPDPBUSDS | - Opcode::VDPBF16PS | - Opcode::VPBROADCASTMW2D | - Opcode::VPBROADCASTMB2Q | - Opcode::VPMOVD2M | - Opcode::VPMOVQD | - Opcode::VPMOVWB | - Opcode::VPMOVDB | - Opcode::VPMOVDW | - Opcode::VPMOVQB | - Opcode::VPMOVQW | - Opcode::VGF2P8MULB | - Opcode::VPMADD52HUQ | - Opcode::VPMADD52LUQ | - Opcode::VPSHUFBITQMB | - Opcode::VPERMB | - Opcode::VPEXPANDD | - Opcode::VPEXPANDQ | - Opcode::VPABSQ | - Opcode::VPRORVD | - Opcode::VPRORVQ | - Opcode::VPMULTISHIFTQB | - Opcode::VPERMT2B | - Opcode::VPERMT2W | - Opcode::VPSHRDVQ | - Opcode::VPSHRDVD | - Opcode::VPSHRDVW | - Opcode::VPSHLDVQ | - Opcode::VPSHLDVD | - Opcode::VPSHLDVW | - Opcode::VPCOMPRESSB | - Opcode::VPCOMPRESSW | - Opcode::VPEXPANDB | - Opcode::VPEXPANDW | - Opcode::VPOPCNTD | - Opcode::VPOPCNTQ | - Opcode::VPOPCNTB | - Opcode::VPOPCNTW | - Opcode::VSCALEFSS | - Opcode::VSCALEFSD | - Opcode::VSCALEFPS | - Opcode::VSCALEFPD | - Opcode::VPDPBUSD | - Opcode::VCVTUSI2SD | - Opcode::VCVTUSI2SS | - Opcode::VPXORD | - Opcode::VPXORQ | - Opcode::VPORD | - Opcode::VPORQ | - Opcode::VPANDND | - Opcode::VPANDNQ | - Opcode::VPANDD | - Opcode::VPANDQ | - - Opcode::VHADDPS | - Opcode::VHSUBPS | - Opcode::VADDSUBPS | - Opcode::VADDPD | - Opcode::VADDPS | - Opcode::VADDSD | - Opcode::VADDSS | - Opcode::VADDSUBPD | - Opcode::VFMADD132PD | - Opcode::VFMADD132PS | - Opcode::VFMADD132SD | - Opcode::VFMADD132SS | - Opcode::VFMADD213PD | - Opcode::VFMADD213PS | - Opcode::VFMADD213SD | - Opcode::VFMADD213SS | - Opcode::VFMADD231PD | - Opcode::VFMADD231PS | - Opcode::VFMADD231SD | - Opcode::VFMADD231SS | - Opcode::VFMADDSUB132PD | - Opcode::VFMADDSUB132PS | - Opcode::VFMADDSUB213PD | - Opcode::VFMADDSUB213PS | - Opcode::VFMADDSUB231PD | - Opcode::VFMADDSUB231PS | - Opcode::VFMSUB132PD | - Opcode::VFMSUB132PS | - Opcode::VFMSUB132SD | - Opcode::VFMSUB132SS | - Opcode::VFMSUB213PD | - Opcode::VFMSUB213PS | - Opcode::VFMSUB213SD | - Opcode::VFMSUB213SS | - Opcode::VFMSUB231PD | - Opcode::VFMSUB231PS | - Opcode::VFMSUB231SD | - Opcode::VFMSUB231SS | - Opcode::VFMSUBADD132PD | - Opcode::VFMSUBADD132PS | - Opcode::VFMSUBADD213PD | - Opcode::VFMSUBADD213PS | - Opcode::VFMSUBADD231PD | - Opcode::VFMSUBADD231PS | - Opcode::VFNMADD132PD | - Opcode::VFNMADD132PS | - Opcode::VFNMADD132SD | - Opcode::VFNMADD132SS | - Opcode::VFNMADD213PD | - Opcode::VFNMADD213PS | - Opcode::VFNMADD213SD | - Opcode::VFNMADD213SS | - Opcode::VFNMADD231PD | - Opcode::VFNMADD231PS | - Opcode::VFNMADD231SD | - Opcode::VFNMADD231SS | - Opcode::VFNMSUB132PD | - Opcode::VFNMSUB132PS | - Opcode::VFNMSUB132SD | - Opcode::VFNMSUB132SS | - Opcode::VFNMSUB213PD | - Opcode::VFNMSUB213PS | - Opcode::VFNMSUB213SD | - Opcode::VFNMSUB213SS | - Opcode::VFNMSUB231PD | - Opcode::VFNMSUB231PS | - Opcode::VFNMSUB231SD | - Opcode::VFNMSUB231SS | - Opcode::VDIVPD | - Opcode::VDIVPS | - Opcode::VDIVSD | - Opcode::VDIVSS | - Opcode::VHADDPD | - Opcode::VHSUBPD | - Opcode::HADDPD | - Opcode::HSUBPD | - Opcode::VMULPD | - Opcode::VMULPS | - Opcode::VMULSD | - Opcode::VMULSS | - Opcode::VPABSB | - Opcode::VPABSD | - Opcode::VPABSW | - Opcode::PABSB | - Opcode::PABSD | - Opcode::PABSW | - Opcode::VPSIGNB | - Opcode::VPSIGND | - Opcode::VPSIGNW | - Opcode::PSIGNB | - Opcode::PSIGND | - Opcode::PSIGNW | - Opcode::VPADDB | - Opcode::VPADDD | - Opcode::VPADDQ | - Opcode::VPADDSB | - Opcode::VPADDSW | - Opcode::VPADDUSB | - Opcode::VPADDUSW | - Opcode::VPADDW | - Opcode::VPAVGB | - Opcode::VPAVGW | - Opcode::VPMULDQ | - Opcode::VPMULHRSW | - Opcode::VPMULHUW | - Opcode::VPMULHW | - Opcode::VPMULLQ | - Opcode::VPMULLD | - Opcode::VPMULLW | - Opcode::VPMULUDQ | - Opcode::PCLMULQDQ | - Opcode::PMULDQ | - Opcode::PMULHRSW | - Opcode::PMULLD | - Opcode::VPSUBB | - Opcode::VPSUBD | - Opcode::VPSUBQ | - Opcode::VPSUBSB | - Opcode::VPSUBSW | - Opcode::VPSUBUSB | - Opcode::VPSUBUSW | - Opcode::VPSUBW | - Opcode::VROUNDPD | - Opcode::VROUNDPS | - Opcode::VEXP2PD | - Opcode::VEXP2PS | - Opcode::VEXP2SD | - Opcode::VEXP2SS | - Opcode::VRCP28PD | - Opcode::VRCP28PS | - Opcode::VRCP28SD | - Opcode::VRCP28SS | - Opcode::VRCP14PD | - Opcode::VRCP14PS | - Opcode::VRCP14SD | - Opcode::VRCP14SS | - Opcode::VRNDSCALEPD | - Opcode::VRNDSCALEPS | - Opcode::VRNDSCALESD | - Opcode::VRNDSCALESS | - Opcode::VRSQRT14PD | - Opcode::VRSQRT14PS | - Opcode::VRSQRT14SD | - Opcode::VRSQRT14SS | - Opcode::VSCALEDPD | - Opcode::VSCALEDPS | - Opcode::VSCALEDSD | - Opcode::VSCALEDSS | - Opcode::VRSQRT28PD | - Opcode::VRSQRT28PS | - Opcode::VRSQRT28SD | - Opcode::VRSQRT28SS | - Opcode::VRSQRTPS | - Opcode::VSQRTPD | - Opcode::VSQRTPS | - Opcode::VSUBPD | - Opcode::VSUBPS | - Opcode::VSUBSD | - Opcode::VSUBSS | - Opcode::VRCPSS | - Opcode::VROUNDSD | - Opcode::VROUNDSS | - Opcode::ROUNDPD | - Opcode::ROUNDPS | - Opcode::ROUNDSD | - Opcode::ROUNDSS | - Opcode::VRSQRTSS | - Opcode::VSQRTSD | - Opcode::VSQRTSS | - Opcode::VPSADBW | - Opcode::VMPSADBW | - Opcode::VDBPSADBW | - Opcode::VPHADDD | - Opcode::VPHADDSW | - Opcode::VPHADDW | - Opcode::VPHSUBD | - Opcode::VPHSUBSW | - Opcode::VPHSUBW | - Opcode::VPMADDUBSW | - Opcode::VPMADDWD | - Opcode::VDPPD | - Opcode::VDPPS | - Opcode::VRCPPS | - Opcode::VORPD | - Opcode::VORPS | - Opcode::VANDPD | - Opcode::VANDPS | - Opcode::VANDNPD | - Opcode::VANDNPS | - Opcode::VPAND | - Opcode::VPANDN | - Opcode::VPOR | - Opcode::VPXOR | - Opcode::VXORPD | - Opcode::VXORPS | - Opcode::VPSLLD | - Opcode::VPSLLDQ | - Opcode::VPSLLQ | - Opcode::VPSLLVD | - Opcode::VPSLLVQ | - Opcode::VPSLLW | - Opcode::VPROLD | - Opcode::VPROLQ | - Opcode::VPROLVD | - Opcode::VPROLVQ | - Opcode::VPRORD | - Opcode::VPRORQ | - Opcode::VPRORRD | - Opcode::VPRORRQ | - Opcode::VPSLLVW | - Opcode::VPSRAQ | - Opcode::VPSRAVQ | - Opcode::VPSRAVW | - Opcode::VPSRLVW | - Opcode::VPSRAD | - Opcode::VPSRAVD | - Opcode::VPSRAW | - Opcode::VPSRLD | - Opcode::VPSRLDQ | - Opcode::VPSRLQ | - Opcode::VPSRLVD | - Opcode::VPSRLVQ | - Opcode::VPSRLW | - Opcode::PHADDD | - Opcode::PHADDSW | - Opcode::PHADDW | - Opcode::PHSUBD | - Opcode::PHSUBSW | - Opcode::PHSUBW | - Opcode::PMADDUBSW | - Opcode::ADDSUBPD | - Opcode::DPPS | - Opcode::DPPD | - Opcode::MPSADBW | - Opcode::RCPSS | - Opcode::RSQRTSS | - Opcode::SQRTSD | - Opcode::ADDSD | - Opcode::SUBSD | - Opcode::MULSD | - Opcode::DIVSD | - Opcode::SQRTSS | - Opcode::ADDSS | - Opcode::SUBSS | - Opcode::MULSS | - Opcode::DIVSS | - Opcode::HADDPS | - Opcode::HSUBPS | - Opcode::ADDSUBPS | - Opcode::PMULHRW | - Opcode::PFRCP | - Opcode::PFRSQRT | - Opcode::PFSUB | - Opcode::PFADD | - Opcode::PFRCPIT1 | - Opcode::PFRSQIT1 | - Opcode::PFSUBR | - Opcode::PFACC | - Opcode::PFMUL | - Opcode::PFMULHRW | - Opcode::PFRCPIT2 | - Opcode::PFNACC | - Opcode::PFPNACC | - Opcode::PSWAPD | - Opcode::PAVGUSB | - Opcode::XADD| - Opcode::DIV | - Opcode::IDIV | - Opcode::MUL | - Opcode::MULX | - Opcode::NEG | - Opcode::NOT | - Opcode::SAR | - Opcode::SAL | - Opcode::SHR | - Opcode::SARX | - Opcode::SHLX | - Opcode::SHRX | - Opcode::SHRD | - Opcode::SHL | - Opcode::RCR | - Opcode::RCL | - Opcode::ROR | - Opcode::RORX | - Opcode::ROL | - Opcode::INC | - Opcode::DEC | - Opcode::SBB | - Opcode::AND | - Opcode::XOR | - Opcode::OR | - Opcode::LEA | - Opcode::ADD | - Opcode::ADC | - Opcode::ADCX | - Opcode::ADOX | - Opcode::SUB | - Opcode::POPCNT | - Opcode::LZCNT | - Opcode::VPLZCNTD | - Opcode::VPLZCNTQ | - Opcode::BT | - Opcode::BTS | - Opcode::BTR | - Opcode::BTC | - Opcode::BSF | - Opcode::BSR | - Opcode::BZHI | - Opcode::PDEP | - Opcode::PEXT | - Opcode::TZCNT | - Opcode::ANDN | - Opcode::BEXTR | - Opcode::BLSI | - Opcode::BLSMSK | - Opcode::BLSR | - Opcode::ADDPS | - Opcode::ADDPD | - Opcode::ANDNPS | - Opcode::ANDNPD | - Opcode::ANDPS | - Opcode::ANDPD | - Opcode::COMISD | - Opcode::COMISS | - Opcode::DIVPS | - Opcode::DIVPD | - Opcode::MULPS | - Opcode::MULPD | - Opcode::ORPS | - Opcode::ORPD | - Opcode::PADDB | - Opcode::PADDD | - Opcode::PADDQ | - Opcode::PADDSB | - Opcode::PADDSW | - Opcode::PADDUSB | - Opcode::PADDUSW | - Opcode::PADDW | - Opcode::PAND | - Opcode::PANDN | - Opcode::PAVGB | - Opcode::PAVGW | - Opcode::PMADDWD | - Opcode::PMULHUW | - Opcode::PMULHW | - Opcode::PMULLW | - Opcode::PMULUDQ | - Opcode::POR | - Opcode::PSADBW | - Opcode::PSHUFD | - Opcode::PSHUFW | - Opcode::PSHUFB | - Opcode::PSLLD | - Opcode::PSLLDQ | - Opcode::PSLLQ | - Opcode::PSLLW | - Opcode::PSRAD | - Opcode::PSRAW | - Opcode::PSRLD | - Opcode::PSRLDQ | - Opcode::PSRLQ | - Opcode::PSRLW | - Opcode::PSUBB | - Opcode::PSUBD | - Opcode::PSUBQ | - Opcode::PSUBSB | - Opcode::PSUBSW | - Opcode::PSUBUSB | - Opcode::PSUBUSW | - Opcode::PSUBW | - Opcode::PXOR | - Opcode::RSQRTPS | - Opcode::SQRTPS | - Opcode::SQRTPD | - Opcode::SUBPS | - Opcode::SUBPD | - Opcode::XORPS | - Opcode::XORPD | - Opcode::RCPPS | - Opcode::SHLD | - Opcode::SLHD | - Opcode::UCOMISD | - Opcode::UCOMISS | - Opcode::F2XM1 | - Opcode::FABS | - Opcode::FADD | - Opcode::FADDP | - Opcode::FCHS | - Opcode::FCOS | - Opcode::FDIV | - Opcode::FDIVP | - Opcode::FDIVR | - Opcode::FDIVRP | - Opcode::FIADD | - Opcode::FIDIV | - Opcode::FIDIVR | - Opcode::FIMUL | - Opcode::FISUB | - Opcode::FISUBR | - Opcode::FMUL | - Opcode::FMULP | - Opcode::FNCLEX | - Opcode::FNINIT | - Opcode::FPATAN | - Opcode::FPREM | - Opcode::FPREM1 | - Opcode::FPTAN | - Opcode::FRNDINT | - Opcode::FSCALE | - Opcode::FSIN | - Opcode::FSINCOS | - Opcode::FSQRT | - Opcode::FSUB | - Opcode::FSUBP | - Opcode::FSUBR | - Opcode::FSUBRP | - Opcode::FXTRACT | - Opcode::FYL2X | - Opcode::FYL2XP1 | - Opcode::AAA | - Opcode::AAS | - Opcode::DAS | - Opcode::DAA | - Opcode::AAD | - Opcode::AAM | - Opcode::KADDB | - Opcode::KANDB | - Opcode::KANDNB | - Opcode::KNOTB | - Opcode::KORB | - Opcode::KSHIFTLB | - Opcode::KSHIFTRB | - Opcode::KXNORB | - Opcode::KXORB | - Opcode::KADDW | - Opcode::KANDW | - Opcode::KANDNW | - Opcode::KNOTW | - Opcode::KORW | - Opcode::KSHIFTLW | - Opcode::KSHIFTRW | - Opcode::KXNORW | - Opcode::KXORW | - Opcode::KADDD | - Opcode::KANDD | - Opcode::KANDND | - Opcode::KNOTD | - Opcode::KORD | - Opcode::KSHIFTLD | - Opcode::KSHIFTRD | - Opcode::KXNORD | - Opcode::KXORD | - Opcode::KADDQ | - Opcode::KANDQ | - Opcode::KANDNQ | - Opcode::KNOTQ | - Opcode::KORQ | - Opcode::KSHIFTLQ | - Opcode::KSHIFTRQ | - Opcode::KXNORQ | - Opcode::KXORQ | - Opcode::IMUL => { write!(out, "{}", colors.arithmetic_op(self)) } - Opcode::POPF | - Opcode::PUSHF | - Opcode::ENTER | - Opcode::LEAVE | - Opcode::PUSHA | - Opcode::POPA | - Opcode::PUSH | - Opcode::POP => { write!(out, "{}", colors.stack_op(self)) } - Opcode::WAIT | - Opcode::FNOP | - Opcode::FDISI8087_NOP | - Opcode::FENI8087_NOP | - Opcode::FSETPM287_NOP | - Opcode::PREFETCHNTA | - Opcode::PREFETCH0 | - Opcode::PREFETCH1 | - Opcode::PREFETCH2 | - Opcode::PREFETCHW | - Opcode::NOP => { write!(out, "{}", colors.nop_op(self)) } - - /* Control flow */ - Opcode::HLT | - Opcode::INT | - Opcode::INTO | - Opcode::IRET | - Opcode::IRETD | - Opcode::IRETQ | - Opcode::RETF | - Opcode::RETURN => { write!(out, "{}", colors.stop_op(self)) } - Opcode::LOOPNZ | - Opcode::LOOPZ | - Opcode::LOOP | - Opcode::JCXZ | - Opcode::CALL | - Opcode::CALLF | - Opcode::JMP | - Opcode::JMPF | - Opcode::JO | - Opcode::JNO | - Opcode::JB | - Opcode::JNB | - Opcode::JZ | - Opcode::JNZ | - Opcode::JA | - Opcode::JNA | - Opcode::JS | - Opcode::JNS | - Opcode::JP | - Opcode::JNP | - Opcode::JL | - Opcode::JGE | - Opcode::JLE | - Opcode::JG => { write!(out, "{}", colors.control_flow_op(self)) } - - /* Data transfer */ - Opcode::PI2FW | - Opcode::PI2FD | - Opcode::PF2ID | - Opcode::PF2IW | - Opcode::VCVTDQ2PD | - Opcode::VCVTDQ2PS | - Opcode::VCVTPD2DQ | - Opcode::VCVTPD2PS | - Opcode::VCVTPH2PS | - Opcode::VCVTPS2DQ | - Opcode::VCVTPS2PD | - Opcode::VCVTPS2PH | - Opcode::VCVTTPD2DQ | - Opcode::VCVTTPS2DQ | - Opcode::VCVTSD2SI | - Opcode::VCVTSD2SS | - Opcode::VCVTSI2SD | - Opcode::VCVTSI2SS | - Opcode::VCVTSS2SD | - Opcode::VCVTSS2SI | - Opcode::VCVTTSD2SI | - Opcode::VCVTTSS2SI | - Opcode::VCVTPD2UDQ | - Opcode::VCVTTPD2UDQ | - Opcode::VCVTPS2UDQ | - Opcode::VCVTTPS2UDQ | - Opcode::VCVTQQ2PD | - Opcode::VCVTQQ2PS | - Opcode::VCVTSD2USI | - Opcode::VCVTTSD2USI | - Opcode::VCVTSS2USI | - Opcode::VCVTTSS2USI | - Opcode::VCVTUDQ2PD | - Opcode::VCVTUDQ2PS | - Opcode::VCVTUSI2USD | - Opcode::VCVTUSI2USS | - Opcode::VCVTTPD2QQ | - Opcode::VCVTPD2QQ | - Opcode::VCVTTPD2UQQ | - Opcode::VCVTPD2UQQ | - Opcode::VCVTTPS2QQ | - Opcode::VCVTPS2QQ | - Opcode::VCVTTPS2UQQ | - Opcode::VCVTPS2UQQ | - Opcode::VCVTUQQ2PD | - Opcode::VCVTUQQ2PS | - Opcode::VMOVDDUP | - Opcode::VPSHUFLW | - Opcode::VPSHUFHW | - Opcode::VBLENDMPD | - Opcode::VBLENDMPS | - Opcode::VPBLENDMD | - Opcode::VPBLENDMQ | - Opcode::VBLENDPD | - Opcode::VBLENDPS | - Opcode::VBLENDVPD | - Opcode::VBLENDVPS | - Opcode::VPBLENDMB | - Opcode::VPBLENDMW | - Opcode::PBLENDVB | - Opcode::PBLENDW | - Opcode::BLENDPD | - Opcode::BLENDPS | - Opcode::BLENDVPD | - Opcode::BLENDVPS | - Opcode::BLENDW | - Opcode::VBROADCASTF128 | - Opcode::VBROADCASTI128 | - Opcode::VBROADCASTSD | - Opcode::VBROADCASTSS | - Opcode::VPBROADCASTM | - Opcode::VEXTRACTF128 | - Opcode::VEXTRACTI128 | - Opcode::VEXTRACTPS | - Opcode::EXTRACTPS | - Opcode::VGATHERDPD | - Opcode::VGATHERDPS | - Opcode::VGATHERQPD | - Opcode::VGATHERQPS | - Opcode::VGATHERPF0DPD | - Opcode::VGATHERPF0DPS | - Opcode::VGATHERPF0QPD | - Opcode::VGATHERPF0QPS | - Opcode::VGATHERPF1DPD | - Opcode::VGATHERPF1DPS | - Opcode::VGATHERPF1QPD | - Opcode::VGATHERPF1QPS | - Opcode::VSCATTERDD | - Opcode::VSCATTERDQ | - Opcode::VSCATTERQD | - Opcode::VSCATTERQQ | - Opcode::VSCATTERDPS | - Opcode::VSCATTERDPD | - Opcode::VSCATTERQPS | - Opcode::VSCATTERQPD | - Opcode::VPSCATTERDD | - Opcode::VPSCATTERDQ | - Opcode::VPSCATTERQD | - Opcode::VPSCATTERQQ | - Opcode::VSCATTERPF0DPD | - Opcode::VSCATTERPF0DPS | - Opcode::VSCATTERPF0QPD | - Opcode::VSCATTERPF0QPS | - Opcode::VSCATTERPF1DPD | - Opcode::VSCATTERPF1DPS | - Opcode::VSCATTERPF1QPD | - Opcode::VSCATTERPF1QPS | - Opcode::VINSERTF128 | - Opcode::VINSERTI128 | - Opcode::VINSERTPS | - Opcode::INSERTPS | - Opcode::VEXTRACTF32X4 | - Opcode::VEXTRACTF64X2 | - Opcode::VEXTRACTF64X4 | - Opcode::VEXTRACTI32X4 | - Opcode::VEXTRACTI64X2 | - Opcode::VEXTRACTI64X4 | - Opcode::VINSERTF32X4 | - Opcode::VINSERTF64X2 | - Opcode::VINSERTF64X4 | - Opcode::VINSERTI64X2 | - Opcode::VINSERTI64X4 | - Opcode::VSHUFF32X4 | - Opcode::VSHUFF64X2 | - Opcode::VSHUFI32X4 | - Opcode::VSHUFI64X2 | - Opcode::VMASKMOVDQU | - Opcode::VMASKMOVPD | - Opcode::VMASKMOVPS | - Opcode::VMOVAPD | - Opcode::VMOVAPS | - Opcode::VMOVD | - Opcode::VMOVDQA | - Opcode::VMOVDQU | - Opcode::VMOVHLPS | - Opcode::VMOVHPD | - Opcode::VMOVHPS | - Opcode::VMOVLHPS | - Opcode::VMOVLPD | - Opcode::VMOVLPS | - Opcode::VMOVMSKPD | - Opcode::VMOVMSKPS | - Opcode::VMOVNTDQ | - Opcode::VMOVNTDQA | - Opcode::VMOVNTPD | - Opcode::VMOVNTPS | - Opcode::MOVDIR64B | - Opcode::MOVDIRI | - Opcode::MOVNTDQA | - Opcode::VMOVQ | - Opcode::VMOVSHDUP | - Opcode::VMOVSLDUP | - Opcode::VMOVUPD | - Opcode::VMOVUPS | - Opcode::VMOVSD | - Opcode::VMOVSS | - Opcode::VMOVDQA32 | - Opcode::VMOVDQA64 | - Opcode::VMOVDQU32 | - Opcode::VMOVDQU64 | - Opcode::VPMOVM2B | - Opcode::VPMOVM2W | - Opcode::VPMOVB2M | - Opcode::VPMOVW2M | - Opcode::VPMOVSWB | - Opcode::VPMOVUSWB | - Opcode::VPMOVSQB | - Opcode::VPMOVUSQB | - Opcode::VPMOVSQW | - Opcode::VPMOVUSQW | - Opcode::VPMOVSQD | - Opcode::VPMOVUSQD | - Opcode::VPMOVSDB | - Opcode::VPMOVUSDB | - Opcode::VPMOVSDW | - Opcode::VPMOVUSDW | - Opcode::VPMOVM2D | - Opcode::VPMOVM2Q | - Opcode::VPMOVB2D | - Opcode::VPMOVQ2M | - Opcode::VMOVDQU8 | - Opcode::VMOVDQU16 | - - Opcode::VPBLENDD | - Opcode::VPBLENDVB | - Opcode::VPBLENDW | - Opcode::VPBROADCASTB | - Opcode::VPBROADCASTD | - Opcode::VPBROADCASTQ | - Opcode::VPBROADCASTW | - Opcode::VPGATHERDD | - Opcode::VPGATHERDQ | - Opcode::VPGATHERQD | - Opcode::VPGATHERQQ | - Opcode::VPCLMULQDQ | - Opcode::VPMOVMSKB | - Opcode::VPMOVSXBD | - Opcode::VPMOVSXBQ | - Opcode::VPMOVSXBW | - Opcode::VPMOVSXDQ | - Opcode::VPMOVSXWD | - Opcode::VPMOVSXWQ | - Opcode::VPMOVZXBD | - Opcode::VPMOVZXBQ | - Opcode::VPMOVZXBW | - Opcode::VPMOVZXDQ | - Opcode::VPMOVZXWD | - Opcode::VPMOVZXWQ | - Opcode::PMOVSXBD | - Opcode::PMOVSXBQ | - Opcode::PMOVSXBW | - Opcode::PMOVSXDQ | - Opcode::PMOVSXWD | - Opcode::PMOVSXWQ | - Opcode::PMOVZXBD | - Opcode::PMOVZXBQ | - Opcode::PMOVZXBW | - Opcode::PMOVZXDQ | - Opcode::PMOVZXWD | - Opcode::PMOVZXWQ | - Opcode::KUNPCKBW | - Opcode::KUNPCKWD | - Opcode::KUNPCKDQ | - Opcode::VUNPCKHPD | - Opcode::VUNPCKHPS | - Opcode::VUNPCKLPD | - Opcode::VUNPCKLPS | - Opcode::VPUNPCKHBW | - Opcode::VPUNPCKHDQ | - Opcode::VPUNPCKHQDQ | - Opcode::VPUNPCKHWD | - Opcode::VPUNPCKLBW | - Opcode::VPUNPCKLDQ | - Opcode::VPUNPCKLQDQ | - Opcode::VPUNPCKLWD | - Opcode::VSHUFPD | - Opcode::VSHUFPS | - Opcode::VPACKSSDW | - Opcode::VPACKUSDW | - Opcode::PACKUSDW | - Opcode::VPACKSSWB | - Opcode::VPACKUSWB | - Opcode::VALIGND | - Opcode::VALIGNQ | - Opcode::VPALIGNR | - Opcode::PALIGNR | - Opcode::VPERM2F128 | - Opcode::VPERM2I128 | - Opcode::VPERMD | - Opcode::VPERMILPD | - Opcode::VPERMILPS | - Opcode::VPERMPD | - Opcode::VPERMPS | - Opcode::VPERMQ | - Opcode::VPERMI2D | - Opcode::VPERMI2Q | - Opcode::VPERMI2PD | - Opcode::VPERMI2PS | - Opcode::VPERMT2D | - Opcode::VPERMT2Q | - Opcode::VPERMT2PD | - Opcode::VPERMT2PS | - Opcode::VPERMI2B | - Opcode::VPERMI2W | - Opcode::VPERMW | - Opcode::VPEXTRB | - Opcode::VPEXTRD | - Opcode::VPEXTRQ | - Opcode::VPEXTRW | - Opcode::PEXTRB | - Opcode::PEXTRD | - Opcode::PEXTRQ | - Opcode::EXTRQ | - Opcode::PINSRB | - Opcode::PINSRD | - Opcode::PINSRQ | - Opcode::INSERTQ | - Opcode::VPINSRB | - Opcode::VPINSRD | - Opcode::VPINSRQ | - Opcode::VPINSRW | - Opcode::VPMASKMOVD | - Opcode::VPMASKMOVQ | - Opcode::VCOMPRESSD | - Opcode::VCOMPRESSQ | - Opcode::VCOMPRESSPD | - Opcode::VCOMPRESSPS | - Opcode::VPCOMPRESSQ | - Opcode::VPCOMPRESSD | - Opcode::VEXPANDPD | - Opcode::VEXPANDPS | - Opcode::VPSHUFB | - Opcode::VPSHUFD | - Opcode::VPHMINPOSUW | - Opcode::PHMINPOSUW | - Opcode::VZEROUPPER | - Opcode::VZEROALL | - Opcode::VFIXUPIMMPD | - Opcode::VFIXUPIMMPS | - Opcode::VFIXUPIMMSD | - Opcode::VFIXUPIMMSS | - Opcode::VREDUCEPD | - Opcode::VREDUCEPS | - Opcode::VREDUCESD | - Opcode::VREDUCESS | - Opcode::VGETEXPPD | - Opcode::VGETEXPPS | - Opcode::VGETEXPSD | - Opcode::VGETEXPSS | - Opcode::VGETMANTPD | - Opcode::VGETMANTPS | - Opcode::VGETMANTSD | - Opcode::VGETMANTSS | - Opcode::VLDDQU | - Opcode::BSWAP | - Opcode::CVTDQ2PD | - Opcode::CVTDQ2PS | - Opcode::CVTPS2DQ | - Opcode::CVTPD2DQ | - Opcode::CVTPI2PS | - Opcode::CVTPI2PD | - Opcode::CVTPS2PD | - Opcode::CVTPD2PS | - Opcode::CVTPS2PI | - Opcode::CVTPD2PI | - Opcode::CVTSD2SI | - Opcode::CVTSD2SS | - Opcode::CVTSI2SD | - Opcode::CVTSI2SS | - Opcode::CVTSS2SD | - Opcode::CVTSS2SI | - Opcode::CVTTPD2DQ | - Opcode::CVTTPS2DQ | - Opcode::CVTTPS2PI | - Opcode::CVTTPD2PI | - Opcode::CVTTSD2SI | - Opcode::CVTTSS2SI | - Opcode::MASKMOVQ | - Opcode::MASKMOVDQU | - Opcode::MOVAPS | - Opcode::MOVAPD | - Opcode::MOVD | - Opcode::MOVHPS | - Opcode::MOVHPD | - Opcode::MOVHLPS | - Opcode::MOVLPS | - Opcode::MOVLPD | - Opcode::MOVLHPS | - Opcode::MOVMSKPS | - Opcode::MOVMSKPD | - Opcode::MOVNTI | - Opcode::MOVNTPS | - Opcode::MOVNTPD | - Opcode::MOVNTSS | - Opcode::MOVNTSD | - Opcode::MOVNTQ | - Opcode::MOVNTDQ | - Opcode::MOVSD | - Opcode::MOVSS | - Opcode::MOVUPD | - Opcode::PSHUFHW | - Opcode::PSHUFLW | - Opcode::PUNPCKHBW | - Opcode::PUNPCKHDQ | - Opcode::PUNPCKHWD | - Opcode::PUNPCKLBW | - Opcode::PUNPCKLDQ | - Opcode::PUNPCKLWD | - Opcode::PUNPCKLQDQ | - Opcode::PUNPCKHQDQ | - Opcode::PACKSSDW | - Opcode::PACKSSWB | - Opcode::PACKUSWB | - Opcode::UNPCKHPS | - Opcode::UNPCKHPD | - Opcode::UNPCKLPS | - Opcode::UNPCKLPD | - Opcode::SHUFPD | - Opcode::SHUFPS | - Opcode::PMOVMSKB | - Opcode::KMOVB | - Opcode::KMOVW | - Opcode::KMOVD | - Opcode::KMOVQ | - Opcode::BNDMOV | - Opcode::LDDQU | - Opcode::CMC | - Opcode::CLC | - Opcode::CLI | - Opcode::CLD | - Opcode::STC | - Opcode::STI | - Opcode::STD | - Opcode::CBW | - Opcode::CWDE | - Opcode::CDQE | - Opcode::CWD | - Opcode::CDQ | - Opcode::CQO | - Opcode::MOVDDUP | - Opcode::MOVSLDUP | - Opcode::MOVDQ2Q | - Opcode::MOVDQU | - Opcode::MOVDQA | - Opcode::MOVQ | - Opcode::MOVQ2DQ | - Opcode::MOVSHDUP | - Opcode::MOVUPS | - Opcode::PEXTRW | - Opcode::PINSRW | - Opcode::MOV | - Opcode::MOVBE | - Opcode::LODS | - Opcode::STOS | - Opcode::LAHF | - Opcode::SAHF | - Opcode::MOVS | - Opcode::INS | - Opcode::IN | - Opcode::OUTS | - Opcode::OUT | - Opcode::MOVZX | - Opcode::MOVSX | - Opcode::MOVSXD | - Opcode::FILD | - Opcode::FBLD | - Opcode::FBSTP | - Opcode::FIST | - Opcode::FISTP | - Opcode::FISTTP | - Opcode::FLD | - Opcode::FLD1 | - Opcode::FLDCW | - Opcode::FLDENV | - Opcode::FLDL2E | - Opcode::FLDL2T | - Opcode::FLDLG2 | - Opcode::FLDLN2 | - Opcode::FLDPI | - Opcode::FLDZ | - Opcode::FST | - Opcode::FSTP | - Opcode::FSTPNCE | - Opcode::FNSAVE | - Opcode::FNSTCW | - Opcode::FNSTENV | - Opcode::FNSTOR | - Opcode::FNSTSW | - Opcode::FRSTOR | - Opcode::FXCH | - Opcode::XCHG | - Opcode::XLAT | - Opcode::CMOVA | - Opcode::CMOVB | - Opcode::CMOVG | - Opcode::CMOVGE | - Opcode::CMOVL | - Opcode::CMOVLE | - Opcode::CMOVNA | - Opcode::CMOVNB | - Opcode::CMOVNO | - Opcode::CMOVNP | - Opcode::CMOVNS | - Opcode::CMOVNZ | - Opcode::CMOVO | - Opcode::CMOVP | - Opcode::CMOVS | - Opcode::CMOVZ | - Opcode::FCMOVB | - Opcode::FCMOVBE | - Opcode::FCMOVE | - Opcode::FCMOVNB | - Opcode::FCMOVNBE | - Opcode::FCMOVNE | - Opcode::FCMOVNU | - Opcode::FCMOVU | - Opcode::SALC | - Opcode::SETO | - Opcode::SETNO | - Opcode::SETB | - Opcode::SETAE | - Opcode::SETZ | - Opcode::SETNZ | - Opcode::SETBE | - Opcode::SETA | - Opcode::SETS | - Opcode::SETNS | - Opcode::SETP | - Opcode::SETNP | - Opcode::SETL | - Opcode::SETGE | - Opcode::SETLE | - Opcode::SETG => { write!(out, "{}", colors.data_op(self)) } - - Opcode::VCOMISD | - Opcode::VCOMISS | - Opcode::VUCOMISD | - Opcode::VUCOMISS | - Opcode::KORTESTB | - Opcode::KTESTB | - Opcode::KORTESTW | - Opcode::KTESTW | - Opcode::KORTESTD | - Opcode::KTESTD | - Opcode::KORTESTQ | - Opcode::KTESTQ | - Opcode::VPTESTNMD | - Opcode::VPTESTNMQ | - Opcode::VPTERNLOGD | - Opcode::VPTERNLOGQ | - Opcode::VPTESTMD | - Opcode::VPTESTMQ | - Opcode::VPTESTNMB | - Opcode::VPTESTNMW | - Opcode::VPTESTMB | - Opcode::VPTESTMW | - Opcode::VPCMPD | - Opcode::VPCMPUD | - Opcode::VPCMPQ | - Opcode::VPCMPUQ | - Opcode::VPCMPB | - Opcode::VPCMPUB | - Opcode::VPCMPW | - Opcode::VPCMPUW | - Opcode::VCMPPD | - Opcode::VCMPPS | - Opcode::VCMPSD | - Opcode::VCMPSS | - Opcode::VMAXPD | - Opcode::VMAXPS | - Opcode::VMAXSD | - Opcode::VMAXSS | - Opcode::VPMAXSQ | - Opcode::VPMAXUQ | - Opcode::VPMINSQ | - Opcode::VPMINUQ | - Opcode::VMINPD | - Opcode::VMINPS | - Opcode::VMINSD | - Opcode::VMINSS | - Opcode::VPCMPEQB | - Opcode::VPCMPEQD | - Opcode::VPCMPEQQ | - Opcode::VPCMPEQW | - Opcode::VPCMPGTB | - Opcode::VPCMPGTD | - Opcode::VPCMPGTQ | - Opcode::VPCMPGTW | - Opcode::VPCMPESTRI | - Opcode::VPCMPESTRM | - Opcode::VPCMPISTRI | - Opcode::VPCMPISTRM | - Opcode::VPMAXSB | - Opcode::VPMAXSD | - Opcode::VPMAXSW | - Opcode::VPMAXUB | - Opcode::VPMAXUW | - Opcode::VPMAXUD | - Opcode::VPMINSB | - Opcode::VPMINSW | - Opcode::VPMINSD | - Opcode::VPMINUB | - Opcode::VPMINUW | - Opcode::VPMINUD | - Opcode::VFPCLASSPD | - Opcode::VFPCLASSPS | - Opcode::VFPCLASSSD | - Opcode::VFPCLASSSS | - Opcode::VRANGEPD | - Opcode::VRANGEPS | - Opcode::VRANGESD | - Opcode::VRANGESS | - Opcode::VPCONFLICTD | - Opcode::VPCONFLICTQ | - Opcode::VPTEST | - Opcode::VTESTPD | - Opcode::VTESTPS | - Opcode::PCMPEQB | - Opcode::PCMPEQD | - Opcode::PCMPEQQ | - Opcode::PCMPEQW | - Opcode::PCMPESTRI | - Opcode::PCMPESTRM | - Opcode::PCMPGTB | - Opcode::PCMPGTD | - Opcode::PCMPGTQ | - Opcode::PCMPGTW | - Opcode::PCMPISTRI | - Opcode::PCMPISTRM | - Opcode::PTEST | - Opcode::MAXPD | - Opcode::MAXPS | - Opcode::MAXSD | - Opcode::MAXSS | - Opcode::MINPD | - Opcode::MINPS | - Opcode::MINSD | - Opcode::MINSS | - Opcode::PMAXSB | - Opcode::PMAXSD | - Opcode::PMAXSW | - Opcode::PMAXUB | - Opcode::PMAXUD | - Opcode::PMAXUW | - Opcode::PMINSB | - Opcode::PMINSD | - Opcode::PMINSW | - Opcode::PMINUB | - Opcode::PMINUD | - Opcode::PMINUW | - Opcode::PFCMPGE | - Opcode::PFMIN | - Opcode::PFCMPGT | - Opcode::PFMAX | - Opcode::PFCMPEQ | - Opcode::CMPS | - Opcode::SCAS | - Opcode::TEST | - Opcode::FTST | - Opcode::FXAM | - Opcode::FUCOM | - Opcode::FUCOMI | - Opcode::FUCOMIP | - Opcode::FUCOMP | - Opcode::FUCOMPP | - Opcode::FCOM | - Opcode::FCOMI | - Opcode::FCOMIP | - Opcode::FCOMP | - Opcode::FCOMPP | - Opcode::FICOM | - Opcode::FICOMP | - Opcode::CMPSD | - Opcode::CMPSS | - Opcode::CMP | - Opcode::CMPPS | - Opcode::CMPPD | - Opcode::CMPXCHG8B | - Opcode::CMPXCHG16B | - Opcode::CMPXCHG => { write!(out, "{}", colors.comparison_op(self)) } - - Opcode::WRMSR | - Opcode::RDMSR | - Opcode::RDTSC | - Opcode::RDPMC | - Opcode::RDPID | - Opcode::RDFSBASE | - Opcode::RDGSBASE | - Opcode::WRFSBASE | - Opcode::WRGSBASE | - Opcode::FXSAVE | - Opcode::FXRSTOR | - Opcode::LDMXCSR | - Opcode::STMXCSR | - Opcode::VLDMXCSR | - Opcode::VSTMXCSR | - Opcode::XSAVE | - Opcode::XSAVEC | - Opcode::XSAVES | - Opcode::XSAVEC64 | - Opcode::XSAVES64 | - Opcode::XRSTOR | - Opcode::XRSTORS | - Opcode::XRSTORS64 | - Opcode::XSAVEOPT | - Opcode::LFENCE | - Opcode::MFENCE | - Opcode::SFENCE | - Opcode::CLFLUSH | - Opcode::CLFLUSHOPT | - Opcode::CLWB | - Opcode::LDS | - Opcode::LES | - Opcode::SGDT | - Opcode::SIDT | - Opcode::LGDT | - Opcode::LIDT | - Opcode::SMSW | - Opcode::LMSW | - Opcode::SWAPGS | - Opcode::RDTSCP | - Opcode::INVEPT | - Opcode::INVVPID | - Opcode::INVPCID | - Opcode::INVLPG | - Opcode::INVLPGA | - Opcode::INVLPGB | - Opcode::TLBSYNC | - Opcode::PSMASH | - Opcode::PVALIDATE | - Opcode::RMPADJUST | - Opcode::RMPUPDATE | - Opcode::CPUID | - Opcode::WBINVD | - Opcode::INVD | - Opcode::SYSRET | - Opcode::CLTS | - Opcode::SYSCALL | - Opcode::TDCALL | - Opcode::SEAMRET | - Opcode::SEAMOPS | - Opcode::SEAMCALL | - Opcode::TPAUSE | - Opcode::UMONITOR | - Opcode::UMWAIT | - Opcode::LSL | - Opcode::SLDT | - Opcode::STR | - Opcode::LLDT | - Opcode::LTR | - Opcode::VERR | - Opcode::VERW | - Opcode::JMPE | - Opcode::EMMS | - Opcode::FEMMS | - Opcode::GETSEC | - Opcode::LFS | - Opcode::LGS | - Opcode::LSS | - Opcode::RSM | - Opcode::SYSENTER | - Opcode::SYSEXIT | - Opcode::VMREAD | - Opcode::VMWRITE | - Opcode::VMCLEAR | - Opcode::VMPTRLD | - Opcode::VMPTRST | - Opcode::VMXON | - Opcode::VMCALL | - Opcode::VMLAUNCH | - Opcode::VMRESUME | - Opcode::VMLOAD | - Opcode::VMMCALL | - Opcode::VMSAVE | - Opcode::VMRUN | - Opcode::VMXOFF | - Opcode::PCONFIG | - Opcode::MONITOR | - Opcode::MWAIT | - Opcode::MONITORX | - Opcode::MWAITX | - Opcode::SKINIT | - Opcode::CLGI | - Opcode::STGI | - Opcode::CLAC | - Opcode::STAC | - Opcode::ENCLS | - Opcode::ENCLV | - Opcode::XGETBV | - Opcode::XSETBV | - Opcode::VMFUNC | - Opcode::XEND | - Opcode::XTEST | - Opcode::XABORT | - Opcode::XBEGIN | - Opcode::ENCLU | - Opcode::RDPKRU | - Opcode::WRPKRU | - Opcode::RDPRU | - Opcode::CLZERO | - Opcode::ENQCMD | - Opcode::ENQCMDS | - Opcode::PTWRITE | - Opcode::UIRET | - Opcode::TESTUI | - Opcode::CLUI | - Opcode::STUI | - Opcode::SENDUIPI | - Opcode::XSUSLDTRK | - Opcode::XRESLDTRK | - Opcode::BOUND | - Opcode::ARPL | - Opcode::BNDMK | - Opcode::BNDCL | - Opcode::BNDCU | - Opcode::BNDCN | - Opcode::BNDLDX | - Opcode::BNDSTX | - Opcode::LAR => { write!(out, "{}", colors.platform_op(self)) } - - Opcode::CRC32 | - Opcode::RDSEED | - Opcode::RDRAND | - Opcode::SHA1RNDS4 | - Opcode::SHA1NEXTE | - Opcode::SHA1MSG1 | - Opcode::SHA1MSG2 | - Opcode::SHA256RNDS2 | - Opcode::SHA256MSG1 | - Opcode::SHA256MSG2 | - Opcode::FFREE | - Opcode::FFREEP | - Opcode::FDECSTP | - Opcode::FINCSTP | - Opcode::GF2P8MULB | - Opcode::GF2P8AFFINEQB | - Opcode::GF2P8AFFINEINVQB | - Opcode::AESDEC128KL | - Opcode::AESDEC256KL | - Opcode::AESDECWIDE128KL | - Opcode::AESDECWIDE256KL | - Opcode::AESENC128KL | - Opcode::AESENC256KL | - Opcode::AESENCWIDE128KL | - Opcode::AESENCWIDE256KL | - Opcode::ENCODEKEY128 | - Opcode::ENCODEKEY256 | - Opcode::LOADIWKEY | - Opcode::HRESET | - Opcode::WRUSS | - Opcode::WRSS | - Opcode::INCSSP | - Opcode::SAVEPREVSSP | - Opcode::SETSSBSY | - Opcode::CLRSSBSY | - Opcode::RSTORSSP | - Opcode::ENDBR64 | - Opcode::ENDBR32 | - Opcode::AESDEC | - Opcode::AESDECLAST | - Opcode::AESENC | - Opcode::AESENCLAST | - Opcode::AESIMC | - Opcode::AESKEYGENASSIST | - Opcode::VAESDEC | - Opcode::VAESDECLAST | - Opcode::VAESENC | - Opcode::VAESENCLAST | - Opcode::VAESIMC | - Opcode::VAESKEYGENASSIST => { write!(out, "{}", colors.misc_op(self)) } - - Opcode::UD0 | - Opcode::UD1 | - Opcode::UD2 | - Opcode::Invalid => { write!(out, "{}", colors.invalid_op(self)) } - } - } -} - impl fmt::Display for Instruction { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { self.display_with(DisplayStyle::Intel).colorize(&NoColors, fmt) |