[AArch64][AsmParser] error on unexpected SVE predicate type suffix
authorCullen Rhodes <cullen.rhodes@arm.com>
Fri, 7 Jun 2019 08:46:56 +0000 (08:46 +0000)
committerCullen Rhodes <cullen.rhodes@arm.com>
Fri, 7 Jun 2019 08:46:56 +0000 (08:46 +0000)
commit1f0d25124498a13019a93832898ff20b28d51303
tree726c8fec42715506e9112812d73935890438151a
parentf7305484841f09dbcacff326730dc3d62addead4
[AArch64][AsmParser] error on unexpected SVE predicate type suffix

Summary:
This patch fixes a bug in the assembler that permitted a type suffix on
predicate registers when not expected. For instance, the following was
previously valid:

    faddv h0, p0.q, z1.h

This bug was present in all SVE instructions containing predicates with
no type suffix and no predication form qualifier, i.e. /z or /m. The
latter instructions are already caught with an appropiate error message
by the assembler, e.g.:

            .text
    <stdin>:1:13: error: not expecting size suffix
    cmpne p1.s, p0.b/z, z2.s, 0
                ^

A similar issue for SVE vector registers was fixed in:

  https://reviews.llvm.org/D59636

Reviewed By: SjoerdMeijer

Differential Revision: https://reviews.llvm.org/D62942

llvm-svn: 362780
57 files changed:
llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
llvm/test/MC/AArch64/SVE/andv-diagnostics.s
llvm/test/MC/AArch64/SVE/clasta-diagnostics.s
llvm/test/MC/AArch64/SVE/clastb-diagnostics.s
llvm/test/MC/AArch64/SVE/cntp-diagnostics.s
llvm/test/MC/AArch64/SVE/compact-diagnostics.s
llvm/test/MC/AArch64/SVE/decp-diagnostics.s
llvm/test/MC/AArch64/SVE/eorv-diagnostics.s
llvm/test/MC/AArch64/SVE/fadda-diagnostics.s
llvm/test/MC/AArch64/SVE/faddv-diagnostics.s
llvm/test/MC/AArch64/SVE/fmaxnmv-diagnostics.s
llvm/test/MC/AArch64/SVE/fmaxv-diagnostics.s
llvm/test/MC/AArch64/SVE/fminnmv-diagnostics.s
llvm/test/MC/AArch64/SVE/fminv-diagnostics.s
llvm/test/MC/AArch64/SVE/incp-diagnostics.s
llvm/test/MC/AArch64/SVE/lasta-diagnostics.s
llvm/test/MC/AArch64/SVE/lastb-diagnostics.s
llvm/test/MC/AArch64/SVE/orv-diagnostics.s
llvm/test/MC/AArch64/SVE/pfirst-diagnostics.s
llvm/test/MC/AArch64/SVE/pnext-diagnostics.s
llvm/test/MC/AArch64/SVE/prfb-diagnostics.s
llvm/test/MC/AArch64/SVE/prfd-diagnostics.s
llvm/test/MC/AArch64/SVE/prfh-diagnostics.s
llvm/test/MC/AArch64/SVE/prfw-diagnostics.s
llvm/test/MC/AArch64/SVE/ptest-diagnostics.s
llvm/test/MC/AArch64/SVE/saddv-diagnostics.s
llvm/test/MC/AArch64/SVE/sel-diagnostics.s
llvm/test/MC/AArch64/SVE/smaxv-diagnostics.s
llvm/test/MC/AArch64/SVE/sminv-diagnostics.s
llvm/test/MC/AArch64/SVE/splice-diagnostics.s
llvm/test/MC/AArch64/SVE/sqdecp-diagnostics.s
llvm/test/MC/AArch64/SVE/sqincp-diagnostics.s
llvm/test/MC/AArch64/SVE/st1b-diagnostics.s
llvm/test/MC/AArch64/SVE/st1d-diagnostics.s
llvm/test/MC/AArch64/SVE/st1h-diagnostics.s
llvm/test/MC/AArch64/SVE/st1w-diagnostics.s
llvm/test/MC/AArch64/SVE/st2b-diagnostics.s
llvm/test/MC/AArch64/SVE/st2d-diagnostics.s
llvm/test/MC/AArch64/SVE/st2h-diagnostics.s
llvm/test/MC/AArch64/SVE/st2w-diagnostics.s
llvm/test/MC/AArch64/SVE/st3b-diagnostics.s
llvm/test/MC/AArch64/SVE/st3d-diagnostics.s
llvm/test/MC/AArch64/SVE/st3h-diagnostics.s
llvm/test/MC/AArch64/SVE/st3w-diagnostics.s
llvm/test/MC/AArch64/SVE/st4b-diagnostics.s
llvm/test/MC/AArch64/SVE/st4d-diagnostics.s
llvm/test/MC/AArch64/SVE/st4h-diagnostics.s
llvm/test/MC/AArch64/SVE/st4w-diagnostics.s
llvm/test/MC/AArch64/SVE/stnt1b-diagnostics.s
llvm/test/MC/AArch64/SVE/stnt1d-diagnostics.s
llvm/test/MC/AArch64/SVE/stnt1h-diagnostics.s
llvm/test/MC/AArch64/SVE/stnt1w-diagnostics.s
llvm/test/MC/AArch64/SVE/uaddv-diagnostics.s
llvm/test/MC/AArch64/SVE/umaxv-diagnostics.s
llvm/test/MC/AArch64/SVE/uminv-diagnostics.s
llvm/test/MC/AArch64/SVE/uqdecp-diagnostics.s
llvm/test/MC/AArch64/SVE/uqincp-diagnostics.s