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
|
||||
my @on;
|
||||
foreach my $oi (@ol) {
|
||||
# Remove first capital K
|
||||
($xins = $oi) =~ s/\bK//;
|
||||
push(@on, $xins);
|
||||
if ($ins !~ /^\bKTEST/) {
|
||||
my @on;
|
||||
foreach my $oi (@ol) {
|
||||
# Remove first capital K
|
||||
($xins = $oi) =~ s/\bK//;
|
||||
push(@on, $xins);
|
||||
}
|
||||
push(@ol, @on);
|
||||
}
|
||||
push(@ol, @on);
|
||||
undef @on;
|
||||
|
||||
# Allow SHIFT -> SH
|
||||
if ($ins =~ /SHIFT/) {
|
||||
my @on;
|
||||
foreach my $oi (@ol) {
|
||||
# Remove first capital K
|
||||
($xins = $oi) =~ s/SHIFT/SH/;
|
||||
push(@on, $xins);
|
||||
}
|
||||
}
|
||||
push(@ol, @on);
|
||||
undef @on;
|
||||
}
|
||||
|
||||
# All instruction patterns except the first are ND
|
||||
for (my $i = 1; $i < scalar(@ol); $i++) {
|
||||
|
Reference in New Issue
Block a user