mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-07-24 10:25:42 -04:00
Fix a few instances of missing renumbers
parser.c: change hard-coded argument count 3 to MAX_ARGUMENTS assemble.c: change a few missed code renumbers
This commit is contained in:
parent
19315e012f
commit
8f94f988f0
@ -1272,7 +1272,7 @@ static void gencode(int32_t segment, int32_t offset, int bits,
|
|||||||
errfunc(ERR_WARNING, "word value exceeds bounds");
|
errfunc(ERR_WARNING, "word value exceeds bounds");
|
||||||
}
|
}
|
||||||
out(offset, segment, &data, OUT_ADDRESS + 2,
|
out(offset, segment, &data, OUT_ADDRESS + 2,
|
||||||
ins->oprs[c - 0140].segment, ins->oprs[c - 0130].wrt);
|
ins->oprs[c - 0140].segment, ins->oprs[c - 0140].wrt);
|
||||||
offset += 2;
|
offset += 2;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1302,7 +1302,7 @@ static void gencode(int32_t segment, int32_t offset, int bits,
|
|||||||
offset++;
|
offset++;
|
||||||
} else {
|
} else {
|
||||||
out(offset, segment, &data, OUT_ADDRESS + 4,
|
out(offset, segment, &data, OUT_ADDRESS + 4,
|
||||||
ins->oprs[c - 0150].segment, ins->oprs[c - 0140].wrt);
|
ins->oprs[c - 0150].segment, ins->oprs[c - 0150].wrt);
|
||||||
offset += 4;
|
offset += 4;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
4
parser.c
4
parser.c
@ -339,10 +339,10 @@ insn *parse_line(int pass, char *buffer, insn * result,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* right. Now we begin to parse the operands. There may be up to three
|
/* right. Now we begin to parse the operands. There may be up to four
|
||||||
* of these, separated by commas, and terminated by a zero token. */
|
* of these, separated by commas, and terminated by a zero token. */
|
||||||
|
|
||||||
for (operand = 0; operand < 3; operand++) {
|
for (operand = 0; operand < MAX_OPERANDS; operand++) {
|
||||||
expr *value; /* used most of the time */
|
expr *value; /* used most of the time */
|
||||||
int mref; /* is this going to be a memory ref? */
|
int mref; /* is this going to be a memory ref? */
|
||||||
int bracket; /* is it a [] mref, or a & mref? */
|
int bracket; /* is it a [] mref, or a & mref? */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user