On Fri, 29 Jun 2018 at 15:32, Kyrill Tkachov
<kyrylo.tkac...@foss.arm.com> wrote:
>
> Hi all,
>
> In this testcase the user forces an odd register as the starting reg for a 
> DFmode value.
> The output_move_double function tries to store that using an STRD instruction.
> But for TARGET_ARM the starting register of an STRD must be an even one.
> This is always the case with compiler-allocated registers for DFmode values, 
> but the
> inline assembly forced our hand here.
>
> This patch  restricts the STRD-emitting logic in output_move_double to not 
> avoid
> odd-numbered source registers in STRD.
> I'm not a fan of the whole function, we should be exposing a lot of the logic 
> in there
> to RTL rather than at the final output stage, but that would need to be fixed 
> separately.
>
> This patch is much safer for backporting purposes.
>
> Bootstrapped and tested on arm-none-linux-gnueabihf.
>

Hi Kyrill,

I think you want to skip this test if one overrides -mfloat-abi, like
the small attached patch does.

OK?

Thanks,

Christophe

> Committing to trunk.
> Thanks,
> Kyrill
>
> 2018-06-29  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>
>
>      * config/arm/arm.c (output_move_double): Don't allow STRD instructions
>      if starting source register is not even.
>
> 2018-06-29  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>
>
>      * gcc.target/arm/arm-soft-strd-even.c: New test.
gcc/testsuite/ChangeLog:

2018-07-02  Christophe Lyon  <christophe.l...@linaro.org>

        * gcc.target/arm/arm-soft-strd-even.c: Skip if -mfloat-abi is
        overriden.

diff --git a/gcc/testsuite/gcc.target/arm/arm-soft-strd-even.c 
b/gcc/testsuite/gcc.target/arm/arm-soft-strd-even.c
index fb7317c..4ef3dd8 100644
--- a/gcc/testsuite/gcc.target/arm/arm-soft-strd-even.c
+++ b/gcc/testsuite/gcc.target/arm/arm-soft-strd-even.c
@@ -1,5 +1,6 @@
 /* { dg-do assemble } */
 /* { dg-require-effective-target arm_arm_ok } */
+/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } 
{"-mfloat-abi=soft" } } */
 /* { dg-options "-O2 -marm -mfloat-abi=soft" } */
 
 /* Check that we don't try to emit STRD in ARM state with

Reply via email to