When this testcase was introduced it failed to account for the possibility of...
authorMatthew Malcomson <matthew.malcomson@arm.com>
Thu, 14 Feb 2019 14:51:46 +0000 (14:51 +0000)
committerMatthew Malcomson <matmal01@gcc.gnu.org>
Thu, 14 Feb 2019 14:51:46 +0000 (14:51 +0000)
commit6461bdc48fa3f98015584953598a83f8c7caa506
tree741b8d74b2634252797ac61608223aca09d09212
parentae2341c94d1743c7bedb499ebdcbbab7d9a40ebd
When this testcase was introduced it failed to account for the possibility of...

When this testcase was introduced it failed to account for the possibility of
targets that do not support arm mode or that do not support the ldrd/strd
instructions.

This patch accounts for both of these by adding some
dg-require-effective-target lines to the testcase.

This patch also adds a new effective-target procedure to check a target
supports ldrd/strd.

This patch also adds a new effective-target procedure to check a target
supports arm ldrd/strd.
The check uses the 'r' constraint to ensure SP is not used so that it will work
for thumb mode code generation as well as arm mode.

Tested by running this testcase with cross compilers using "-march=armv5t",
"-mcpu=cortex-m3", "-mcpu-arm7tdmi", "-mcpu=cortex-a9 -march=armv5t" for both
arm-none-eabi and arm-none-linux-gnueabihf.
Also ran this testcase with `make check` natively.

gcc/testsuite/ChangeLog:

2019-02-14  Matthew Malcomson  <matthew.malcomson@arm.com>

* gcc.dg/rtl/arm/ldrd-peepholes.c: Restrict testcase.
* lib/target-supports.exp: Add procedure to check for ldrd.

From-SVN: r268881
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/rtl/arm/ldrd-peepholes.c
gcc/testsuite/lib/target-supports.exp