mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-13 17:57:12 +08:00
AVX-512: Fix parser to handle opmask decorator correctly
When a memory reference operand is a destination, this could have an opmask decorator as well. Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
d4760c19b5
commit
50ab1522e9
13
parser.c
13
parser.c
@ -758,17 +758,20 @@ is_expression:
|
||||
recover = true;
|
||||
} else { /* we got the required ] */
|
||||
i = stdscan(NULL, &tokval);
|
||||
if (i == TOKEN_DECORATOR) {
|
||||
if ((i == TOKEN_DECORATOR) || (i == TOKEN_OPMASK)) {
|
||||
/*
|
||||
* according to AVX512 spec, only broacast decorator is
|
||||
* expected for memory reference operands
|
||||
* according to AVX512 spec, broacast or opmask decorator
|
||||
* is expected for memory reference operands
|
||||
*/
|
||||
if (tokval.t_flag & TFLAG_BRDCAST) {
|
||||
brace_flags |= GEN_BRDCAST(0);
|
||||
i = stdscan(NULL, &tokval);
|
||||
} else if (i == TOKEN_OPMASK) {
|
||||
brace_flags |= VAL_OPMASK(nasm_regvals[tokval.t_integer]);
|
||||
i = stdscan(NULL, &tokval);
|
||||
} else {
|
||||
nasm_error(ERR_NONFATAL, "broadcast decorator"
|
||||
"expected inside braces");
|
||||
nasm_error(ERR_NONFATAL, "broadcast or opmask "
|
||||
"decorator expected inside braces");
|
||||
recover = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user