[AArch64] Catch attempts to use SVE types when SVE is disabled
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 2 Dec 2019 17:48:08 +0000 (17:48 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 2 Dec 2019 17:48:08 +0000 (17:48 +0000)
commitc0e0174bbd7009d34e78484bbaa9e0353939819c
treecbb404f121c885dfdd5f835dd7e55c8e9b294141
parent6da4c454acee4dac53c4c549fa1caeb73fe1f82b
[AArch64] Catch attempts to use SVE types when SVE is disabled

This patch reports an error if code tries to use variable-length
SVE types when SVE is disabled.  We already report a similar error
for definitions or uses of SVE functions when SVE is disabled.

2019-12-02  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/aarch64/aarch64.c (aarch64_report_sve_required): New function.
(aarch64_expand_mov_immediate): Use it when attempting to measure
the length of an SVE vector.
(aarch64_mov_operand_p): Only allow SVE CNT immediates when
SVE is enabled.

gcc/testsuite/
* gcc.target/aarch64/sve/acle/general/nosve_4.c: New test.
* gcc.target/aarch64/sve/acle/general/nosve_5.c: Likewise.
* gcc.target/aarch64/sve/pcs/nosve_4.c: Expected a second error
for the copy.
* gcc.target/aarch64/sve/pcs/nosve_5.c: Likewise.
* gcc.target/aarch64/sve/pcs/nosve_6.c: Likewise.

From-SVN: r278909
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/acle/general/nosve_4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/acle/general/nosve_5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/pcs/nosve_4.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/nosve_5.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/nosve_6.c