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.
# 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 = ();
@ops = split(/\,/, $operands);
}
$num = scalar(@ops);
- while (scalar(@ops) < 4) {
+ while (scalar(@ops) < $MAX_OPERANDS) {
push(@ops, '0');
}
$operands = join(',', @ops);
MAXPREFIX /* Total number of prefix slots */
};
+/* If you need to change this, also change it in insns.pl */
#define MAX_OPERANDS 5
typedef struct insn { /* an instruction itself */