Commit-ID: 8a5d3e68a4a0bb65a5768f004dc8d06ff4dbff30
Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=8a5d3e68a4a0bb65a5768f004dc8d06ff4dbff30
Author: Cyrill Gorcunov <gor...@gm...>
AuthorDate: Mon, 25 Aug 2014 20:04:30 +0400
Committer: Cyrill Gorcunov <gor...@gm...>
CommitDate: Mon, 25 Aug 2014 20:04:30 +0400
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 <gor...@gm...>
---
assemble.c | 2 +-
insns.pl | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/assemble.c b/assemble.c
index fd56f5b..38add4f 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 451c4f2..2504981 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 &&
|