diff --git a/assemble.c b/assemble.c index fd56f5b8..38add4f6 100644 --- a/assemble.c +++ b/assemble.c @@ -160,7 +160,7 @@ * \340 resb reserve bytes of uninitialized storage. * Operand 0 had better be a segmentless constant. * \341 wait this instruction needs a WAIT "prefix" - * \360 no SSE prefix (== \364\331) + * \360 np no SSE prefix (== \364\331) * \361 66 SSE prefix (== \366\331) * \364 !osp operand-size prefix (0x66) not permitted * \365 !asp address-size prefix (0x67) not permitted diff --git a/insns.pl b/insns.pl index 451c4f2b..25049816 100755 --- a/insns.pl +++ b/insns.pl @@ -772,6 +772,7 @@ sub byte_code_compile($$) { 'norep' => 0331, # No REP prefix permitted 'wait' => 0341, # Needs a wait prefix 'resb' => 0340, + 'np' => 0360, # No prefix 'jcc8' => 0370, # Match only if Jcc possible with single byte 'jmp8' => 0371, # Match only if JMP possible with single byte 'jlen' => 0373, # Length of jump @@ -825,16 +826,14 @@ sub byte_code_compile($$) { if (defined $pc) { # Plain code push(@codes, $pc); - } elsif ($prefix_ok && $op =~ /^(66|f2|f3|np)$/) { - # 66/F2/F3 prefix used as an opcode extension, or np = no prefix + } elsif ($prefix_ok && $op =~ /^(66|f2|f3)$/) { + # 66/F2/F3 prefix used as an opcode extension if ($op eq '66') { push(@codes, 0361); } elsif ($op eq 'f2') { push(@codes, 0332); - } elsif ($op eq 'f3') { - push(@codes, 0333); } else { - push(@codes, 0360); + push(@codes, 0333); } } elsif ($op =~ /^[0-9a-f]{2}$/) { if (defined($litix) && $litix+$codes[$litix]+1 == scalar @codes &&