mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-09-22 10:43:39 -04:00
preinsns.pl: don't allow KTEST to be just TEST
The semantics for KTEST are so very different from TEST that it would be a bad idea to allow the TEST spelling. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
@@ -222,25 +222,26 @@ $macros{'k'} = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Allow instruction without K
|
# Allow instruction without K
|
||||||
my @on;
|
if ($ins !~ /^\bKTEST/) {
|
||||||
foreach my $oi (@ol) {
|
my @on;
|
||||||
# Remove first capital K
|
foreach my $oi (@ol) {
|
||||||
($xins = $oi) =~ s/\bK//;
|
# Remove first capital K
|
||||||
push(@on, $xins);
|
($xins = $oi) =~ s/\bK//;
|
||||||
|
push(@on, $xins);
|
||||||
|
}
|
||||||
|
push(@ol, @on);
|
||||||
}
|
}
|
||||||
push(@ol, @on);
|
|
||||||
undef @on;
|
|
||||||
|
|
||||||
# Allow SHIFT -> SH
|
# Allow SHIFT -> SH
|
||||||
if ($ins =~ /SHIFT/) {
|
if ($ins =~ /SHIFT/) {
|
||||||
|
my @on;
|
||||||
foreach my $oi (@ol) {
|
foreach my $oi (@ol) {
|
||||||
# Remove first capital K
|
# Remove first capital K
|
||||||
($xins = $oi) =~ s/SHIFT/SH/;
|
($xins = $oi) =~ s/SHIFT/SH/;
|
||||||
push(@on, $xins);
|
push(@on, $xins);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
push(@ol, @on);
|
push(@ol, @on);
|
||||||
undef @on;
|
}
|
||||||
|
|
||||||
# All instruction patterns except the first are ND
|
# All instruction patterns except the first are ND
|
||||||
for (my $i = 1; $i < scalar(@ol); $i++) {
|
for (my $i = 1; $i < scalar(@ol); $i++) {
|
||||||
|
Reference in New Issue
Block a user