match: Check the number of elements in broadcasting operands
authorJin Kyu Song <jin.kyu.song@intel.com>
Wed, 30 Oct 2013 10:12:45 +0000 (03:12 -0700)
committerJin Kyu Song <jin.kyu.song@intel.com>
Wed, 20 Nov 2013 19:29:42 +0000 (11:29 -0800)
commit25c221258641aec4198e9e46127536676878a4bd
tree3b3435793bd08c7bcbde3dba5b8a6d581ad05863
parent7903c07b7753fb02fc3b5ba6211dc566bc25aa7c
match: Check the number of elements in broadcasting operands

The broadcasting decorator {1to##} must describe exactly how many times
the memory element is repeated in order to clearly match the correct
instruction format.

For example,
    vaddpd zmm30,zmm29,QWORD [rdx+0x3f8]{1to8}   ; good
    vaddpd zmm30,zmm29,QWORD [rdx+0x3f8]{1to16}  ; fail qword * 16 = 1024b

    vaddps zmm30,zmm29,DWORD [rcx]{1to16}  ; good
    vaddps zmm30,zmm29,DWORD [rcx]{1to8}  ; fail dword * 8 = 256b

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
assemble.c
nasm.h
parser.c