nasm/test/gather.asm
H. Peter Anvin e20ca02cfb BR 3392260: Handle instructions only separated by vector SIB size
There are two instructions (VGATHERQPS, VPGATHERQD) where the only
separation between two forms is the vector length given to the vector
SIB.  This means the *matcher* has to be able to distinguish
instructions by vector SIB length and the matcher only operates on the
operands and the instruction flags, not on the bytecode.

Export the vector index-ness into the operand flags and add to the
matcher.

This resolves BR 3392260.

Reported-by: Agner <agner@anger.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-07-19 17:09:39 -07:00

12 lines
476 B
NASM

bits 64
VGATHERQPS xmm1, [xmm0 + rsi], xmm2 ; OK
VGATHERQPS xmm1, [ymm0 + rsi], xmm2 ; fail: error: invalid effective address
VGATHERDPD ymm1, [xmm0 + rsi], ymm2 ; OK
VGATHERDPD xmm1, [xmm0 + rsi], xmm2 ; OK
VGATHERQPD xmm1, [xmm0 + rsi], xmm2 ; OK
VGATHERQPD ymm1, [ymm0 + rsi], ymm2 ; OK
VPGATHERQD xmm1, [xmm0 + rsi], xmm2 ; OK
VPGATHERQD xmm1, [ymm0 + rsi], xmm2 ; fail: error: invalid effective address
VPGATHERDQ ymm1, [xmm0 + rsi], ymm2 ; OK