summaryrefslogtreecommitdiff
path: root/insns.pl
diff options
context:
space:
mode:
Diffstat (limited to 'insns.pl')
-rwxr-xr-xinsns.pl15
1 files changed, 15 insertions, 0 deletions
diff --git a/insns.pl b/insns.pl
index eb99f6b4..60f7dd37 100755
--- a/insns.pl
+++ b/insns.pl
@@ -427,6 +427,10 @@ sub format_insn($$$$$) {
my $num, $nd = 0;
my @bytecode;
my $op, @ops, $opp, @opx, @oppx, @decos, @opevex;
+ my @iflags = ( "FPU", "MMX", "3DNOW", "SSE", "SSE2",
+ "SSE3", "VMX", "SSSE3", "SSE4A", "SSE41",
+ "SSE42", "SSE5", "AVX", "AVX2", "AVX512",
+ "FMA", "BMI1", "BMI2", "TBM", "RTM", "INVPCID");
return (undef, undef) if $operands eq "ignore";
@@ -476,6 +480,17 @@ sub format_insn($$$$$) {
}
$decorators =~ tr/a-z/A-Z/;
+ # check if two different insn set types are set
+ $cnt = 0;
+ foreach $fla (split(/,/, $flags)) {
+ if ($fla ~~ @iflags) {
+ $cnt++;
+ if ($cnt >= 2) {
+ die "Too many insn set flags in $flags\n";
+ }
+ }
+ }
+
# format the flags
$flags =~ s/,/|IF_/g;
$flags =~ s/(\|IF_ND|IF_ND\|)//, $nd = 1 if $flags =~ /IF_ND/;