From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by sourceware.org (Postfix) with ESMTPS id A1F813858D32; Tue, 28 Feb 2023 01:55:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A1F813858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1677549302; x=1709085302; h=from:to:cc:in-reply-to:subject:mime-version: content-transfer-encoding:references:message-id:date; bh=lE03AVZ1510nF2NErjdLCmVTwFQZuD3+WObKzAc23Og=; b=AFPankJYoV4Wzz8504T2qfQ/zsX5tm4yM2Z3i9DjU5kYVT445wvZ7GQ9 ZWwyW3prc+hJGUGzCOeWe92rqMocmaNoCPy8Hh7PXxUSRQ/ab0f5jeSw0 UQQuuwio34gJ3ln2BpmChJE4yOp6TBdwSJN6HrjnA2MR8ZmUAwvi83KdU zm1W1ZMa70r/gjUo6nm59BQmTX7K2Y0sJm+BUnIMb6PcVb26Ddo3zxLIW R27JmfVmtlI/b/9Vd3NJ/K281AAck44UicihkXiLWNG/qJWYhoc0FUGV+ pjYTEEF4VDh759ne4G8ExA9iAqjyAPKClvfFQa28izo4roFdJaLlLfGfc g==; From: Hans-Peter Nilsson To: CC: In-Reply-To: <20230216200529.AC55F2042C@pchp3.se.axis.com> (message from Hans-Peter Nilsson on Thu, 16 Feb 2023 21:05:29 +0100) Subject: Ping: [PATCH] testsuite: Tweak gcc.dg/attr-aligned.c for CRIS MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT References: <20230216200529.AC55F2042C@pchp3.se.axis.com> Message-ID: <20230228015458.8F13F2042E@pchp3.se.axis.com> Date: Tue, 28 Feb 2023 02:54:58 +0100 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,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: Ping... > From: Hans-Peter Nilsson > Date: Thu, 16 Feb 2023 21:05:29 +0100 > Asking for the lines outside the "#if __CRIS__" part. > Ok to commit? > > -- >8 -- > tm.texi says for BIGGEST_ALIGNMENT (from which > __BIGGEST_ALIGNMENT__ is derived): "Biggest alignment that > any data type can require on this machine, in bits." > > That is, using that value might be too strict for alignment > of *functions* and CRIS requires at least 16-bit alignment > for functions. But, one purpose of the test is to test that > alignment can be set to a large but valid value, so pick > 512, which has some use as a historically required alignment > for certain I/O descriptors. > > * gcc.dg/attr-aligned.c: Adjust comment for ALIGN_MAX_STATIC. > (ALIGN_MAX_STATIC): Set to 512 for CRIS. > --- > gcc/testsuite/gcc.dg/attr-aligned.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/gcc/testsuite/gcc.dg/attr-aligned.c b/gcc/testsuite/gcc.dg/attr-aligned.c > index 887bdd0f3799..4f0c885dc812 100644 > --- a/gcc/testsuite/gcc.dg/attr-aligned.c > +++ b/gcc/testsuite/gcc.dg/attr-aligned.c > @@ -18,6 +18,10 @@ > # else > # define ALIGN_MAX_STATIC ALIGN_MAX_HARD > # endif > +#elif __CRIS__ > +/* __BIGGEST_ALIGNMENT__ doesn't cover functions (16 bits for CRIS). */ > +# define ALIGN_MAX_STATIC 512 > +# define ALIGN_TOO_BIG_OFILE (ALIGN_MAX_HARD << 1) > #elif pdp11 > # define ALIGN_MAX_STATIC 2 > /* Work around a pdp11 ICE (see PR target/87821). */ > @@ -29,7 +33,9 @@ > /* Is this processor- or operating-system specific? */ > # define ALIGN_MAX_STATIC ALIGN_MAX_HARD > #else > - /* Guaranteed to be accepted regardless of the target. */ > + /* Guaranteed to be accepted regardless of the target for objects. > + This might not be true for alignment of functions though, so > + may need to be set to a target-specific value above. */ > # define ALIGN_MAX_STATIC __BIGGEST_ALIGNMENT__ > /* Guaranteed to be rejected regardless of the target. */ > # define ALIGN_TOO_BIG_OFILE (ALIGN_MAX_HARD << 1) > -- > 2.30.2 >