This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCHv5] Fix not 8-byte aligned ldrd/strd on ARMv5 (PR 89544)
- From: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- To: "Richard Earnshaw (lists)" <Richard dot Earnshaw at arm dot com>, Richard Biener <rguenther at suse dot de>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>, Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>, Eric Botcazou <ebotcazou at adacore dot com>, Jeff Law <law at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Fri, 6 Sep 2019 10:15:52 +0000
- Subject: Re: [PATCHv5] Fix not 8-byte aligned ldrd/strd on ARMv5 (PR 89544)
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1+K/gVIaCNXZvjkMJ0rSf0P6RefSUwbUapsLoBWIh/I=; b=AFjWLX380ldkTgLXJMjva2DHMLZ9Y1mZtEE7jhLqdYzYN664ytAbn8abE2fzVLF7qEikwFG7160EQGqHTn7WL8GCMPide3b19Zk6HAmMzk1iwtoAgTQSeWgKIjcVBMfbkfHMzq0b2nhfQxcDfvJl6maETsHDlczqaHN/57q7HztCtZCbcnwvr+pYlWsHH/1w7q7/UqcW6+L6nAd34JuTgFQRyDTX2StBPqfJz2+ART5Ks2EFh7ceEnYpdHcbxVHTVNA2MYawA2aRqojmu4/0T//Fts9ibG8Bm+1Y6+546xoEUYad9rDX60h0WMpdYkGLciNu4fee9jS3WCdGPd+SrA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TOKDf/Cb62LYmuF96TAH4JX+rw6AUAlKEoimlBfkvb2jX8rsXDgmZyq5QCQGt7u/ZWrJWNsWN9BTU1SC7nqrz1p5Cf4az0G0NTsuFT8wuTnOtRU8EbkQuGMMa+kuPHByaSea0FBo1f1VTjAUqAv8627JWlK0kEz0wRuRhSjn+arVebKRu8GyWzTE35v3fg7Ly9cL0KIHQnS54Wb1G47i1h6tuw9e966oH1MBCg5z+Www4Neq/PZxsilqwv3dQAwjpxUTjOkLa2GzMfZdPRhym1WEQFsaHCBIE3Qyt4UVjedgoTLwnYYa7TLq/lwaXQ2Tb1+8tkUuIJ3qibTYSV3wrQ==
- References: <AM6PR07MB4037775DF79E0229DCCA425AE44F0@AM6PR07MB4037.eurprd07.prod.outlook.com> <AM6PR10MB256664D731C3CC92F2FBEDC5E4DC0@AM6PR10MB2566.EURPRD10.PROD.OUTLOOK.COM> <alpine.LSU.2.20.1908021451300.19626@zhemvz.fhfr.qr> <AM6PR10MB2566A6E51DC500187D9EC6CFE4D90@AM6PR10MB2566.EURPRD10.PROD.OUTLOOK.COM> <DB8PR10MB2569255E3191B5C7FA70D338E4D70@DB8PR10MB2569.EURPRD10.PROD.OUTLOOK.COM> <alpine.LSU.2.20.1908141319050.11741@zhemvz.fhfr.qr> <AM6PR10MB256602B22A8F0DA91782D76DE4AD0@AM6PR10MB2566.EURPRD10.PROD.OUTLOOK.COM> <alpine.LSU.2.20.1908151032040.32458@zhemvz.fhfr.qr> <AM6PR10MB2566EF4119F45406B60B3972E4AC0@AM6PR10MB2566.EURPRD10.PROD.OUTLOOK.COM> <alpine.LSU.2.20.1908151437430.32458@zhemvz.fhfr.qr> <AM6PR10MB2566B60823F40D98F4F2D55DE4AC0@AM6PR10MB2566.EURPRD10.PROD.OUTLOOK.COM> <A61C6A2B-A22F-475B-A150-5065DB4686CC@suse.de> <AM6PR10MB2566627D2A92173775D78936E4AC0@AM6PR10MB2566.EURPRD10.PROD.OUTLOOK.COM> <c4e0d051-5b17-2bfa-d0c9-383fa65f8ae2@arm.com>
On 9/4/19 2:53 PM, Richard Earnshaw (lists) wrote:
> Index: gcc/testsuite/gcc.target/arm/unaligned-argument-2.c
> ===================================================================
> --- gcc/testsuite/gcc.target/arm/unaligned-argument-2.c (Revision 0)
> +++ gcc/testsuite/gcc.target/arm/unaligned-argument-2.c (Arbeitskopie)
> @@ -0,0 +1,19 @@
> +/* { dg-do compile } */
> +/* { dg-require-effective-target arm_arm_ok } */
> +/* { dg-require-effective-target arm_ldrd_strd_ok } */
> +/* { dg-options "-marm -mno-unaligned-access -O3" } */
> +
> +struct s {
> + int a, b;
> +} __attribute__((aligned(8)));
> +
> +struct s f0;
> +
> +void f(int a, int b, int c, int d, int e, struct s f)
> +{
> + f0 = f;
> +}
> +
> +/* { dg-final { scan-assembler-times "ldrd" 0 } } */
> +/* { dg-final { scan-assembler-times "strd" 0 } } */
> +/* { dg-final { scan-assembler-times "stm" 1 } } */
>
> I don't think this test is right. While we can't use an LDRD to load the argument off the stack, there's nothing wrong with using an STRD to then store the value to f0 (as that is 8-byte aligned). So the second and third scan-assembler tests are meaningless.
>
> R.
>
> (sorry, just noticed this).
So, agreed, that is really likely to change.
I would just remove those, as attached.
Is that OK for trunk?
Thanks
Bernd.
2019-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gcc.target/arm/unaligned-argument-2.c: Remove bogus test cases.
Index: gcc/testsuite/gcc.target/arm/unaligned-argument-2.c
===================================================================
--- gcc/testsuite/gcc.target/arm/unaligned-argument-2.c (revision 275409)
+++ gcc/testsuite/gcc.target/arm/unaligned-argument-2.c (working copy)
@@ -15,5 +15,3 @@ void f(int a, int b, int c, int d, int e, struct s
}
/* { dg-final { scan-assembler-times "ldrd" 0 } } */
-/* { dg-final { scan-assembler-times "strd" 0 } } */
-/* { dg-final { scan-assembler-times "stm" 1 } } */