summaryrefslogtreecommitdiff
path: root/insns.pl
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-05-20 19:29:04 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-05-20 19:29:04 -0700
commit52dc353868a9adba69df6bd72a30ab1eaff4388e (patch)
tree48153812545ca19cb44dad9f6b3f0b381f9fcacc /insns.pl
parent21513e822f64a79dfc651da7e94408d97d985db6 (diff)
downloadnasm-52dc353868a9adba69df6bd72a30ab1eaff4388e.tar.gz
Handle is4 bytes without meaningful information in the bottom bits
Support is4 bytes without meaningful information in the bottom bits. This is equivalent to /is4=0 for the assembler, but makes the bottom bits don't care for the disassembler.
Diffstat (limited to 'insns.pl')
-rw-r--r--insns.pl10
1 files changed, 7 insertions, 3 deletions
diff --git a/insns.pl b/insns.pl
index 5b45d7e5..81997320 100644
--- a/insns.pl
+++ b/insns.pl
@@ -687,10 +687,14 @@ sub byte_code_compile($) {
}
$prefix_ok = 0;
} elsif ($op eq '/is4') {
- if (!defined($oppos{'i'} || !defined($oppos{'s'}))) {
- die "$0: $line: $op without 'i' and 's' operands\n";
+ if (!defined($oppos{'s'})) {
+ die "$0: $line: $op without 's' operand\n";
+ }
+ if (defined($oppos{'i'})) {
+ push(@codes, 0172, ($oppos{'s'} << 3)+$oppos{'i'});
+ } else {
+ push(@codes, 0174, $oppos{'s'});
}
- push(@codes, 0172, ($oppos{'s'} << 3)+$oppos{'i'});
$prefix_ok = 0;
} elsif ($op =~ /^\/is4\=([0-9]+)$/) {
my $imm = $1;