From eb9e0938403b63e6478d6d874285a39e9984dbda Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 21 May 2008 10:34:33 -0700 Subject: [PATCH] Fix skipping 0270 code when searching for disasm prefixes The 0270 code was incorrectly entered as 270 (decimal), which meant that instructions with vex but no .nds got misfiled in the improper opcode tables. --- insns.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/insns.pl b/insns.pl index 81997320..bbb17021 100644 --- a/insns.pl +++ b/insns.pl @@ -406,6 +406,8 @@ sub hexstr(@) { # \1[0123] mean byte plus register value # \330 means byte plus condition code # \0 or \340 mean give up and return empty set +# \17[234] skip is4 control byte +# \26x \270 skip VEX control bytes sub startseq($) { my ($codestr) = @_; my $word, @range; @@ -461,11 +463,11 @@ sub startseq($) { return addprefix($prefix, $c1..($c1+15)); } elsif ($c0 == 0 || $c0 == 0340) { return $prefix; - } elsif (($c0 & ~3) == 0260 || $c0 == 270) { - shift(@codes); - shift(@codes); - } elsif ($c0 == 0172) { + } elsif (($c0 & ~3) == 0260 || $c0 == 0270) { + shift(@codes); # Skip VEX control bytes shift(@codes); + } elsif ($c0 >= 0172 && $c0 <= 174) { + shift(@codes); # Skip is4 control byte } else { # We really need to be able to distinguish "forbidden" # and "ignorable" codes here -- 2.11.4.GIT