From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 9489E3858C50 for ; Tue, 22 Nov 2022 10:57:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9489E3858C50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BC2581FB; Tue, 22 Nov 2022 02:58:02 -0800 (PST) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CB1DA3F587; Tue, 22 Nov 2022 02:57:55 -0800 (PST) From: Richard Sandiford To: Christophe Lyon via Gcc-patches Mail-Followup-To: Christophe Lyon via Gcc-patches ,Christophe Lyon , richard.sandiford@arm.com Cc: Christophe Lyon Subject: Re: [PATCH] aarch64: Fix test_dfp_17.c for big-endian [PR 107604] References: <20221122090114.38090-1-christophe.lyon@arm.com> Date: Tue, 22 Nov 2022 10:57:54 +0000 In-Reply-To: <20221122090114.38090-1-christophe.lyon@arm.com> (Christophe Lyon via Gcc-patches's message of "Tue, 22 Nov 2022 10:01:14 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-40.0 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Christophe Lyon via Gcc-patches writes: > gcc.target/aarch64/aapcs64/test_dfp_17.c has been failing on > big-endian, because the _Decimal32 on-stack argument is not padded in > the same direction depending on endianness. > > This patch fixes the testcase so that it expects the argument in the > right stack location, similarly to what other tests do in the same > directory. > > gcc/testsuite/ChangeLog: > > PR target/107604 > * gcc.target/aarch64/aapcs64/test_dfp_17.c: Fix for big-endian. OK, thanks. Richard > --- > gcc/testsuite/gcc.target/aarch64/aapcs64/test_dfp_17.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_dfp_17.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_dfp_17.c > index 22dc462bf7c..3c45f715cf7 100644 > --- a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_dfp_17.c > +++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_dfp_17.c > @@ -32,6 +32,10 @@ struct z b = { 9.0dd, 10.0dd, 11.0dd, 12.0dd }; > ANON(struct z, a, D1) > ANON(struct z, b, STACK) > ANON(int , 5, W0) > +#ifndef __AAPCS64_BIG_ENDIAN__ > ANON(_Decimal32, f1, STACK+32) /* Note: no promotion to _Decimal64. */ > +#else > + ANON(_Decimal32, f1, STACK+36) /* Note: no promotion to _Decimal64. */ > +#endif > LAST_ANON(_Decimal64, 0.5dd, STACK+40) > #endif