mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
Make MAX_OPERANDS a parameter in insns.pl as well
MAX_OPERANDS is present in insns.pl as well (although proper C compilers shouldn't need this kind of zero padding.) Make sure it's clear to everyone.
This commit is contained in:
parent
aaa088fbf3
commit
ff3b57c253
5
insns.pl
5
insns.pl
@ -11,6 +11,9 @@
|
||||
# LONGER PREFIXES FIRST!
|
||||
@disasm_prefixes = qw(0F24 0F25 0F38 0F3A 0F7A 0FA6 0FA7 0F);
|
||||
|
||||
# This should match MAX_OPERANDS from nasm.h
|
||||
$MAX_OPERANDS = 5;
|
||||
|
||||
print STDERR "Reading insns.dat...\n";
|
||||
|
||||
@args = ();
|
||||
@ -299,7 +302,7 @@ sub format {
|
||||
@ops = split(/\,/, $operands);
|
||||
}
|
||||
$num = scalar(@ops);
|
||||
while (scalar(@ops) < 4) {
|
||||
while (scalar(@ops) < $MAX_OPERANDS) {
|
||||
push(@ops, '0');
|
||||
}
|
||||
$operands = join(',', @ops);
|
||||
|
Loading…
Reference in New Issue
Block a user