aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2014-08-25 20:04:30 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2014-08-25 20:04:30 +0400
commit8a5d3e68a4a0bb65a5768f004dc8d06ff4dbff30 (patch)
treede9509886c7f880bf47a5bf3ef482fe70ec32369
parent5d488a30a45e781178f5beeb2c5c0328aea695d5 (diff)
downloadnasm-8a5d3e68a4a0bb65a5768f004dc8d06ff4dbff30.tar.gz
nasm-8a5d3e68a4a0bb65a5768f004dc8d06ff4dbff30.tar.xz
nasm-8a5d3e68a4a0bb65a5768f004dc8d06ff4dbff30.zip
insns: Move 'np' mnemonic into @plain_codes
This is literal mnemonic so no need to special handling, move it to @plain_codes instead. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--assemble.c2
-rwxr-xr-xinsns.pl9
2 files changed, 5 insertions, 6 deletions
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 <operand 0> 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 &&