diff options
author | iximeow <me@iximeow.net> | 2022-07-23 18:23:25 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2023-01-02 08:50:23 -0800 |
commit | d5eafcbc374357a66794297a60c3a7a2b035bff3 (patch) | |
tree | c9fb30c6f07c5d446faa0f7a0d89620f5fc9c86a /src/generated/imp.rs | |
parent | e6e7fabfc907eaf016520d9c2a2e128b0d28f019 (diff) |
codegen `Colorized` impl and normalize `name()` implementation
unfortunately because of the layout of instruction information this
*adds* lines rather than removes them..
Diffstat (limited to 'src/generated/imp.rs')
-rw-r--r-- | src/generated/imp.rs | 1512 |
1 files changed, 1509 insertions, 3 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); |