diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-05-20 19:29:04 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-05-20 19:29:04 -0700 |
commit | 52dc353868a9adba69df6bd72a30ab1eaff4388e (patch) | |
tree | 48153812545ca19cb44dad9f6b3f0b381f9fcacc /insns.pl | |
parent | 21513e822f64a79dfc651da7e94408d97d985db6 (diff) | |
download | nasm-52dc353868a9adba69df6bd72a30ab1eaff4388e.tar.gz nasm-52dc353868a9adba69df6bd72a30ab1eaff4388e.tar.bz2 nasm-52dc353868a9adba69df6bd72a30ab1eaff4388e.zip |
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.pl | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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; |