mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-18 16:25:05 +08:00
assemble: defer "operand size missing" until end of type check
Defer the "operand size missing" error until we know all the other operands have the correct type. Otherwise we'll end up with false positives, which result in noise entered into the xsizeflags array, thus causing fuzzy matching to fail. It's possible we should defer it even further. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
a81655bffb
commit
3fb86f2cd6
@ -2053,6 +2053,7 @@ static enum match_result matches(const struct itemplate *itemp,
|
||||
insn *instruction, int bits)
|
||||
{
|
||||
int i, size[MAX_OPERANDS], asize, oprs, ret;
|
||||
bool opsizemissing = false;
|
||||
|
||||
ret = MOK_GOOD;
|
||||
|
||||
@ -2178,9 +2179,12 @@ static enum match_result matches(const struct itemplate *itemp,
|
||||
if ((itemp->opd[i] & ~type & ~SIZE_MASK) || (type & SIZE_MASK))
|
||||
return MERR_INVALOP;
|
||||
else
|
||||
opsizemissing = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (opsizemissing)
|
||||
return MERR_OPSIZEMISSING;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check operand sizes
|
||||
|
Loading…
Reference in New Issue
Block a user