mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-06 18:30:21 +08:00
BR 3392370: {z} decorator allowed on MOVDQ* memory operands
The spec says very clearly the {z} decorator is allowed on memory operands for the MOVDQ* instructions. Remove special cases from the code to disallow this case, which had the unfortunate effect of generating a very uninformative error message. Reported-by: Agner <agner@agner.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
parent
2cd8bab66a
commit
c33d95fde9
22
asm/parser.c
22
asm/parser.c
@ -975,25 +975,11 @@ is_expression:
|
||||
recover = true;
|
||||
} else { /* we got the required ] */
|
||||
i = stdscan(NULL, &tokval);
|
||||
if ((i == TOKEN_DECORATOR) || (i == TOKEN_OPMASK)) {
|
||||
/*
|
||||
* 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) |
|
||||
VAL_BRNUM(tokval.t_integer - BRC_1TO2);
|
||||
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 or opmask "
|
||||
"decorator expected inside braces");
|
||||
recover = true;
|
||||
}
|
||||
if (i == TOKEN_DECORATOR || i == TOKEN_OPMASK) {
|
||||
/* parse opmask (and zeroing) after an operand */
|
||||
recover = parse_braces(&brace_flags);
|
||||
i = tokval.t_type;
|
||||
}
|
||||
|
||||
if (i != 0 && i != ',') {
|
||||
nasm_error(ERR_NONFATAL, "comma or end of line expected");
|
||||
recover = true;
|
||||
|
@ -4069,57 +4069,39 @@ VMOVDDUP zmmreg|mask|z,zmmrm512 [rm:dup: evex.512.f2.0f.w1 1
|
||||
VMOVDQA32 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.66.0f.w0 6f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA32 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.66.0f.w0 6f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA32 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.66.0f.w0 6f /r ] AVX512,FUTURE
|
||||
VMOVDQA32 xmmreg|mask|z,xmmreg [mr: evex.128.66.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA32 ymmreg|mask|z,ymmreg [mr: evex.256.66.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA32 zmmreg|mask|z,zmmreg [mr: evex.512.66.0f.w0 7f /r ] AVX512,FUTURE
|
||||
VMOVDQA32 mem128|mask,xmmreg [mr:fvm: evex.128.66.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA32 mem256|mask,ymmreg [mr:fvm: evex.256.66.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA32 mem512|mask,zmmreg [mr:fvm: evex.512.66.0f.w0 7f /r ] AVX512,FUTURE
|
||||
VMOVDQA32 xmmrm128|mask|z,xmmreg [mr: evex.128.66.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA32 ymmrm256|mask|z,ymmreg [mr: evex.256.66.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA32 zmmrm512|mask|z,zmmreg [mr: evex.512.66.0f.w0 7f /r ] AVX512,FUTURE
|
||||
VMOVDQA64 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.66.0f.w1 6f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA64 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.66.0f.w1 6f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA64 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.66.0f.w1 6f /r ] AVX512,FUTURE
|
||||
VMOVDQA64 xmmreg|mask|z,xmmreg [mr: evex.128.66.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA64 ymmreg|mask|z,ymmreg [mr: evex.256.66.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA64 zmmreg|mask|z,zmmreg [mr: evex.512.66.0f.w1 7f /r ] AVX512,FUTURE
|
||||
VMOVDQA64 mem128|mask,xmmreg [mr:fvm: evex.128.66.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA64 mem256|mask,ymmreg [mr:fvm: evex.256.66.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA64 mem512|mask,zmmreg [mr:fvm: evex.512.66.0f.w1 7f /r ] AVX512,FUTURE
|
||||
VMOVDQA64 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.66.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA64 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.66.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQA64 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.66.0f.w1 7f /r ] AVX512,FUTURE
|
||||
VMOVDQU16 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f2.0f.w1 6f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU16 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f2.0f.w1 6f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU16 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f2.0f.w1 6f /r ] AVX512BW,FUTURE
|
||||
VMOVDQU16 xmmreg|mask|z,xmmreg [mr: evex.128.f2.0f.w1 7f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU16 ymmreg|mask|z,ymmreg [mr: evex.256.f2.0f.w1 7f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU16 zmmreg|mask|z,zmmreg [mr: evex.512.f2.0f.w1 7f /r ] AVX512BW,FUTURE
|
||||
VMOVDQU16 mem128|mask,xmmreg [mr:fvm: evex.128.f2.0f.w1 7f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU16 mem256|mask,ymmreg [mr:fvm: evex.256.f2.0f.w1 7f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU16 mem512|mask,zmmreg [mr:fvm: evex.512.f2.0f.w1 7f /r ] AVX512BW,FUTURE
|
||||
VMOVDQU16 xmmrm128|mask|z,xmmreg [mr: evex.128.f2.0f.w1 7f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU16 ymmrm256|mask|z,ymmreg [mr: evex.256.f2.0f.w1 7f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU16 zmmrm512|mask|z,zmmreg [mr: evex.512.f2.0f.w1 7f /r ] AVX512BW,FUTURE
|
||||
VMOVDQU32 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f3.0f.w0 6f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU32 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f3.0f.w0 6f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU32 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f3.0f.w0 6f /r ] AVX512,FUTURE
|
||||
VMOVDQU32 xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU32 ymmreg|mask|z,ymmreg [mr: evex.256.f3.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU32 zmmreg|mask|z,zmmreg [mr: evex.512.f3.0f.w0 7f /r ] AVX512,FUTURE
|
||||
VMOVDQU32 mem128|mask,xmmreg [mr:fvm: evex.128.f3.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU32 mem256|mask,ymmreg [mr:fvm: evex.256.f3.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU32 mem512|mask,zmmreg [mr:fvm: evex.512.f3.0f.w0 7f /r ] AVX512,FUTURE
|
||||
VMOVDQU32 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.f3.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU32 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.f3.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU32 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.f3.0f.w0 7f /r ] AVX512,FUTURE
|
||||
VMOVDQU64 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f3.0f.w1 6f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU64 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f3.0f.w1 6f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU64 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f3.0f.w1 6f /r ] AVX512,FUTURE
|
||||
VMOVDQU64 xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU64 ymmreg|mask|z,ymmreg [mr: evex.256.f3.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU64 zmmreg|mask|z,zmmreg [mr: evex.512.f3.0f.w1 7f /r ] AVX512,FUTURE
|
||||
VMOVDQU64 mem128|mask,xmmreg [mr:fvm: evex.128.f3.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU64 mem256|mask,ymmreg [mr:fvm: evex.256.f3.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU64 mem512|mask,zmmreg [mr:fvm: evex.512.f3.0f.w1 7f /r ] AVX512,FUTURE
|
||||
VMOVDQU64 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.f3.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU64 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.f3.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
|
||||
VMOVDQU64 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.f3.0f.w1 7f /r ] AVX512,FUTURE
|
||||
VMOVDQU8 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f2.0f.w0 6f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU8 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f2.0f.w0 6f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU8 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f2.0f.w0 6f /r ] AVX512BW,FUTURE
|
||||
VMOVDQU8 xmmreg|mask|z,xmmreg [mr: evex.128.f2.0f.w0 7f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU8 ymmreg|mask|z,ymmreg [mr: evex.256.f2.0f.w0 7f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU8 zmmreg|mask|z,zmmreg [mr: evex.512.f2.0f.w0 7f /r ] AVX512BW,FUTURE
|
||||
VMOVDQU8 mem128|mask,xmmreg [mr:fvm: evex.128.f2.0f.w0 7f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU8 mem256|mask,ymmreg [mr:fvm: evex.256.f2.0f.w0 7f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU8 mem512|mask,zmmreg [mr:fvm: evex.512.f2.0f.w0 7f /r ] AVX512BW,FUTURE
|
||||
VMOVDQU8 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.f2.0f.w0 7f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU8 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.f2.0f.w0 7f /r ] AVX512VL,AVX512BW,FUTURE
|
||||
VMOVDQU8 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.f2.0f.w0 7f /r ] AVX512BW,FUTURE
|
||||
VMOVHLPS xmmreg,xmmreg*,xmmreg [rvm: evex.nds.128.0f.w0 12 /r ] AVX512,FUTURE
|
||||
VMOVHPD xmmreg,xmmreg*,mem64 [rvm:t1s: evex.nds.128.66.0f.w1 16 /r ] AVX512,FUTURE
|
||||
VMOVHPD mem64,xmmreg [mr:t1s: evex.128.66.0f.w1 17 /r ] AVX512,FUTURE
|
||||
|
Loading…
x
Reference in New Issue
Block a user