-
-
Notifications
You must be signed in to change notification settings - Fork 482
Closed
Description
I was doing some parsing on InstructionDefinitions.inc and found that there are 128 duplicated entries. Given the definition of ZydisInstructionDefinition, it's not immediately clear to me why this would be. Are they redundant entries to make lookup faster?
Here are a few examples. I've included the perl script to fully reproduce my findings.
line 25 is a duplicate of line 21
line 26 is a duplicate of line 22
line 47 is a duplicate of line 43
line 48 is a duplicate of line 44
I didn't see a previous issue about this, but apologies for the noise if I missed it.
version: master@f2ad85f
use strict;
use warnings;
die "Usage: $0 /path/to/InstructionDefinitions.inc\n" unless @ARGV==1;
open my $fdIn, '<', $ARGV[0] or die "$ARGV[0]: $!\n";
my %all_insns = ();
while(<$fdIn>) {
s/\s//g;
last if $_ eq '};'; # only parse ISTR_DEFINITIONS_LEGACY
if(exists $all_insns{$_}) {
print "line $. is a duplicate of line $all_insns{$_}\n";
} else {
$all_insns{$_}=$.;
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels